Help playing sounds using arsd.simpleaudio

Murilo murilomiranda92 at hotmail.com
Fri Nov 1 05:16:23 UTC 2019


On Wednesday, 30 October 2019 at 19:11:00 UTC, Adam D. Ruppe 
wrote:
> On Saturday, 26 October 2019 at 19:48:33 UTC, Murilo wrote:
>> I play a sound the program never ends, the terminal continues 
>> to run the program and I have to end it manually. Any ideas 
>> what could be causing this? I am using it just as you had 
>> instructed.
>
> That happens if you don't call .stop() and .join() in order at 
> the right time.
>
> Did you use the scope(exit) like I said?

Thanks for the help.
I did use the scope. Here is my code:
         AudioPcmOutThread audio = new AudioPcmOutThread();
         audio.start();
         scope (exit)
         {
             audio.stop();
             audio.join();
         }
         audio.playOgg("bell.ogg");
The problem persists.


More information about the Digitalmars-d-learn mailing list