Help playing sounds using arsd.simpleaudio
Murilo
murilomiranda92 at hotmail.com
Sat Sep 28 19:38:23 UTC 2019
On Saturday, 28 September 2019 at 14:03:53 UTC, Adam D. Ruppe
wrote:
> On Saturday, 28 September 2019 at 03:21:38 UTC, Murilo wrote:
>> Can anyone just please show me how to play a background
>> sound(like those in games) using arsd.simpleaudio? I'd like
>> something simple with a code snippet please.
>
> it is really minimal be warned
>
> but at the beginning of main() set it up with
>
>
> auto audio = new AudioPcmOutThread();
> audio.start();
> scope(exit) {
> audio.stop();
> audio.join();
> }
>
>
> and then when you want it to make sounds, call its functions
> like
>
> audio.beep();
>
> or
>
> audio.playOgg("my-file.ogg");
>
> you can convert things like wav and mp3 into the ogg format
> with various tools of the internet.
>
>
>
> that's about all it does.
Thank you sooo much. Now it works. That is pretty much what I was
looking for.
More information about the Digitalmars-d-learn
mailing list