[Stk] Stream underflow errors on Windows

Matt Day matt.day at york.ac.uk
Sun Jun 16 11:56:42 PDT 2013


Referring back to my first post and clarifying some points:

The issue occurs with an example program included with STK:
projects\examples\duplex.cpp. I have only built this on one Windows
machine, but I have tried both MSVC and MinGW compilers. I have run it on
several Windows machines and observed the issue on all. I have not observed
the issue under Linux.

I was rather hoping one of the STK devs might be able to add something
further.

Thanks,
Matt



On 14 June 2013 20:51, Jeremy Jurksztowicz <jurksztowicz at gmail.com> wrote:

> Without seeing your code, it's impossible to tell what is wrong. There is
> always the possibility that there is a buggy component in the audio graph,
> I guess you've tried the app on another OS? How about another machine? If
> you have narrowed the problem to be OS specific, then I'd suggest trying to
> use a different driver for the audio stream, although I can't imagine a
> better one to use than directX.
>
> At the risk of sounding patronizing, have you written realtime software
> before? There are some common errors that beginners make, especially
> regarding memory management, that cause underflows. Pardon me if I'm way
> off the mark.
>
> Regards, and good luck,
> Jeremy J.
>
>
> On Fri, Jun 14, 2013 at 11:44 AM, Matt Day <matt.day at york.ac.uk> wrote:
>
>> Thanks, this sounds very plausible. However, I stepped through the
>> initialisation code in STK and everything looks
>> OK. In fact, I can't see how STK could be using anything other than the
>> dsound calls, unless you are suggesting that Windows decides to delegate
>> these calls to winmm?
>>
>> I have also tried building under MinGW and I get the same issue.
>>
>> Thanks,
>> Matt
>>
>>
>> On 12 June 2013 14:21, Jeremy Jurksztowicz <jurksztowicz at gmail.com>wrote:
>>
>>> Audio problems such as this are often caused by using a very old windows
>>> sound driver, I think it's called WINMM? I had the same problem, regardless
>>> of how generously I buffered, with SDL_Mixer. After tracing out app
>>> initialization, I realized that the old crusty windows audio system was
>>> being used. After fiddling with t he setup I got DirectX to handle the
>>> sound and it is flawless.
>>>
>>> I don't know if this is your problem, but it's worth a shot.
>>>
>>> Good luck,
>>> Jeremy J.
>>>
>>>
>>>  On Wed, Jun 12, 2013 at 4:42 AM, Matt Day <matt.day at york.ac.uk> wrote:
>>>
>>>> Hi Gary,
>>>>
>>>> Thanks for the suggestion, but even with 64 buffers of 4096 frames I
>>>> still see underflow.
>>>>
>>>> Matt
>>>>
>>>>
>>>> Gary Scavone wrote:
>>>> > Hi Matt,
>>>> >
>>>> > You might try modifying the "number of buffers" parameter.
>>>> >
>>>> > --gary
>>>> >
>>>> > On 2013-06-10, at 11:15 AM, Matt Day <matt.day at york.ac.uk> wrote:
>>>> >
>>>> >
>>>> >> I suspect this may be a common issue although my searches did not
>>>> reveal
>>>> >> any discussion of it. Apologies if I have missed something.
>>>> >>
>>>> >> When building applications under Windows that use full-duplex
>>>> realtime
>>>> >> audio, I always see stream underflow errors which result in
>>>> >> discontinuities in the output audio. I have tried increasing the
>>>> buffer
>>>> >> size, and this usually reduces how often it occurs, but it will still
>>>> >> invariably occur once. The issue can be seen just by building and
>>>> >> running the duplex example under the free version of Visual Studio. I
>>>> >> have run this example on 3 different machines and all three exhibit
>>>> the
>>>> >> issue (either running WinXP or WinXP x64 edition).
>>>> >>
>>>> >> I would be most grateful if anyone can point me to any information on
>>>> >> the issue and why it might occur.
>>>> >>
>>>> >> Many thanks,
>>>> >> Matt
>>>> >>
>>>> >> _______________________________________________
>>>> >> Stk mailing list
>>>> >> Stk at ccrma.stanford.edu
>>>> >> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>>>> >>
>>>>
>>>> _______________________________________________
>>>> Stk mailing list
>>>> Stk at ccrma.stanford.edu
>>>> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20130616/3089ab1c/attachment.html 


More information about the Stk mailing list