This project has moved. For the latest updates, please go here.

ASIO filereader playback problem

Feb 25, 2014 at 10:16 AM
First of all (as expected from every newbie/noob as message starter expected):

Thank you for your great work on NAudio! (-:

That being set, I have a problem regarding file playback via the ASIO driver.

For getting into audio and NAudio coding, I started looking into the NAudio sources as well as the demo app(s). Playback of files using the "Audio File Playback" module works with WaveOut,DirectSound etc without problems (allthough I have to explicitly press the stop button in order to play a file again, even after EOF. I guess this is due to no explicitly EOF handling implemented, but no problem so far).

However when using ASIO (with ASIO4all as device driver on my laptop), on EOF the last sample(s?) are played in a loop. Also, the playback cannot be stopped and the Demo application has to be killed via taskmanager.
Hitting the stop button before EOF does stop the playback as expected.

Any ideas?

(plz forgive me if I haven't provided enough information, I am quite new to the whole topic)

Regards,

Harry
Coordinator
Feb 27, 2014 at 9:21 PM
hmm that doesn't sound good. When the input stream reaches its end, playback ought to stop automatically.
If you are able to debug, put a breakpoint in AsioOut.driver_BufferUpdate at the point where it calls Stop (read returned 0).
Feb 28, 2014 at 7:48 AM
well on EOF it comes up to ASIODriver.stop(), but never returning from:

return asioDriverVTable.stop(pASIOComObject);

unfortunatly this is where my debugging came to an end (-:
Coordinator
Feb 28, 2014 at 8:49 AM
oh dear, that's not good at all. I wonder if its your ASIO driver not liking being called from within the BufferUpdate callback. I know certain laptop chipsets (RealTek) have that problem with their WaveOut drivers and Function callbacks.

You could play a never-ending stream, and then call stop from outside.
Feb 28, 2014 at 8:58 AM
Well I kinda stumbled onto this problem by chance, since the application;s main function will not be playing files and the target machine will have a MADI card which will be used, so hopefully this is only a local issue with my development laptop. Didn't have the chance to test it on the target machine yet though.

Thx anyways for your input (-: