sw17ch / portaudio

Haskell bindings to the portaudio library.
MIT License
10 stars 5 forks source link

getStreamTime always returns an error #6

Open raymoo opened 9 years ago

raymoo commented 9 years ago

getStreamTime always yields "Left BadPtr" when I try to use it, regardless of whether the stream has started playing or not, which I guess means that pa_GetStreamTime always returns 0. However, startStream appears to work normally for me. I have the BadPtr problem whether I run it in ghci or compile it first.

I am running on x64 Debian with GHC 7.10.2, and I get the error regardless whether I use -threaded.

Also, what is the output for getStreamTime supposed to be for a opened but not yet started Stream?

raymoo commented 9 years ago

Turns out the underlying pa_GetStreamTime was just always returning 0. I'm guessing this problem isn't caused by the haskell bindings, so I'm just working around by manually adding up sample counts.