<div dir="ltr"><div style>Referring back to my first post and clarifying some points:</div><div style><br></div><div style>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.</div>
<div style><br></div><div style>I was rather hoping one of the STK devs might be able to add something further.<br></div><div style><br></div><div style>Thanks,</div><div style>Matt</div><br><div class="gmail_extra"><br><br>
<div class="gmail_quote">On 14 June 2013 20:51, Jeremy Jurksztowicz <span dir="ltr"><<a href="mailto:jurksztowicz@gmail.com" target="_blank">jurksztowicz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">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.<div>
<br></div><div>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.<br>
<div><br></div><div>Regards, and good luck,</div><div>Jeremy J.</div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 14, 2013 at 11:44 AM, Matt Day <span dir="ltr"><<a href="mailto:matt.day@york.ac.uk" target="_blank">matt.day@york.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks, this sounds very plausible. However, I stepped through the initialisation code in STK and everything looks
<br>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?<br><div>
<br>I have also tried building under MinGW and I get the same issue. <br><br></div><div>Thanks,<br></div><div>Matt<br></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 12 June 2013 14:21, Jeremy Jurksztowicz <span dir="ltr"><<a href="mailto:jurksztowicz@gmail.com" target="_blank">jurksztowicz@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.<div>
<br></div><div>I don't know if this is your problem, but it's worth a shot.</div><div><br></div><div>Good luck,</div><div>Jeremy J.</div></div><div><div><div class="gmail_extra"><br><br>
<div class="gmail_quote">
On Wed, Jun 12, 2013 at 4:42 AM, Matt Day <span dir="ltr"><<a href="mailto:matt.day@york.ac.uk" target="_blank">matt.day@york.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Gary,<br>
<br>
Thanks for the suggestion, but even with 64 buffers of 4096 frames I<br>
still see underflow.<br>
<span><font color="#888888"><br>
Matt<br>
</font></span><div><div><br>
<br>
Gary Scavone wrote:<br>
> Hi Matt,<br>
><br>
> You might try modifying the "number of buffers" parameter.<br>
><br>
> --gary<br>
><br>
> On 2013-06-10, at 11:15 AM, Matt Day <<a href="mailto:matt.day@york.ac.uk" target="_blank">matt.day@york.ac.uk</a>> wrote:<br>
><br>
><br>
>> I suspect this may be a common issue although my searches did not reveal<br>
>> any discussion of it. Apologies if I have missed something.<br>
>><br>
>> When building applications under Windows that use full-duplex realtime<br>
>> audio, I always see stream underflow errors which result in<br>
>> discontinuities in the output audio. I have tried increasing the buffer<br>
>> size, and this usually reduces how often it occurs, but it will still<br>
>> invariably occur once. The issue can be seen just by building and<br>
>> running the duplex example under the free version of Visual Studio. I<br>
>> have run this example on 3 different machines and all three exhibit the<br>
>> issue (either running WinXP or WinXP x64 edition).<br>
>><br>
>> I would be most grateful if anyone can point me to any information on<br>
>> the issue and why it might occur.<br>
>><br>
>> Many thanks,<br>
>> Matt<br>
>><br>
>> _______________________________________________<br>
>> Stk mailing list<br>
>> <a href="mailto:Stk@ccrma.stanford.edu" target="_blank">Stk@ccrma.stanford.edu</a><br>
>> <a href="http://ccrma-mail.stanford.edu/mailman/listinfo/stk" target="_blank">http://ccrma-mail.stanford.edu/mailman/listinfo/stk</a><br>
>><br>
<br>
_______________________________________________<br>
Stk mailing list<br>
<a href="mailto:Stk@ccrma.stanford.edu" target="_blank">Stk@ccrma.stanford.edu</a><br>
<a href="http://ccrma-mail.stanford.edu/mailman/listinfo/stk" target="_blank">http://ccrma-mail.stanford.edu/mailman/listinfo/stk</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br>
</div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br>
</div></div>