[Portaudio] First buffer not played correctly
Davy Wentzler
info at audio-evolution.com
Sat Dec 6 10:47:56 EST 2008
Replying to myself... additional info:
The underflow is explainable. It doesn't happen the first time I play,
but after that it's always the case.
That's because of:
static double previousTime = -1;
in pa_asio.cpp that doesn't get 'reset' to -1 after playback has
stopped. So the next time it's always generating an underflow.
Kind regards,
Davy
Davy Wentzler wrote:
> Hello,
>
> I am using PortAudio stable from dec. 2007 on Windows.
> The problem I have is that my very first block that is played is playing
> 'messed up' / with noise. This is when using ASIO for my Hoontech
> C-port. Buffer size doesn't seem to matter. When I master my project
> using the very same code, the mastered wav file has the correct sound in
> it. When using MME, the first block is playing correctly.
>
> Now I've looked at the statusFlag in the play callback and it says '4'
> (underflow) once for each time I start playback with ASIO, but not with
> MME. I have put a printf statement with the statusflag in
> patest_start_stop.c (it prints when statusFlag != 0) and it also shows
> this behavior.
>
> Any suggestions?
>
> Kind regards,
>
> Davy
> _______________________________________________
> Portaudio mailing list
> Portaudio at music.columbia.edu
> http://music.columbia.edu/mailman/listinfo/portaudio
>
More information about the Portaudio
mailing list