Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
Fixed string reading problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
sw17ch committed Oct 30, 2010
1 parent 4a8a211 commit 2fac308
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Sound/PortAudio/Base.hsc
Expand Up @@ -408,8 +408,7 @@ instance Storable PaHostApiInfo where
peek p = do
sv <- #{peek PaHostApiInfo, structVersion} p
ty <- #{peek PaHostApiInfo, type} p
np <- return $ #{ptr PaHostApiInfo, name} p :: IO CString
nm <- peekCString np
nm <- (peek $ #{ptr PaHostApiInfo, name} p) >>= peekCString
dc <- #{peek PaHostApiInfo, deviceCount} p
di <- #{peek PaHostApiInfo, defaultInputDevice} p
dd <- #{peek PaHostApiInfo, defaultOutputDevice} p
Expand Down Expand Up @@ -443,7 +442,7 @@ instance Storable PaDeviceInfo where
alignment _ = #{const __alignof__(PaDeviceInfo)}
peek p = do
sv <- #{peek PaDeviceInfo, structVersion} p
nm <- peekCString $ #{ptr PaDeviceInfo, name} p
nm <- (peek $ #{ptr PaDeviceInfo, name} p) >>= peekCString
ha <- #{peek PaDeviceInfo, hostApi} p
mi <- #{peek PaDeviceInfo, maxInputChannels} p
mo <- #{peek PaDeviceInfo, maxOutputChannels} p
Expand Down

0 comments on commit 2fac308

Please sign in to comment.