Reputation: 1229
I was looking for assistance with a bug that seems to occur on some ASIO devices while playing back audio directly to the ASIO device. If the WAV audio is not stopped before the end is reached, the application will hang and continuously play rapid-fire blips of the last audio (It sounds like a stutter effect). At that point, the UI thread will hang and the application will need to be force closed.
This issue can be recreated using the "ASIO Direct Demo" provided from NAudio's github site. All I do is open a WAV file in the demo and click play. Once the audio reaches the end, the application hangs.
I've tested this issue and found that it occurs on Behringer X-Air x18 but not M-Audio M-Track MKII. I was wondering if anyone has found a way to code around this bug? Thank You.
PS - NAudio is an AMAZING framework and Mark Heath (the author) has great tutorials on pluralsight that are totally worth the subscription fee.
Upvotes: 1
Views: 313
Reputation: 49522
Some people have reported issues with auto-stop in ASIO (where you reach the end of your input and it attempts to stop playback from within the ASIO callback). So one simple workaround is to pass a never-ending stream to AsioOut, and detect when it has got past the end of your audio, and then Stop playback from outside.
Upvotes: 0