How to play multiple sound files? Not at the same time. #392
Unanswered
patrikpatrik
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Decoders and devices are 100% decoupled from each other. Initialise 1 device and 2 decoders - one for bird and one for dog. When playing bird, read from that decoder; when playing dog read from that one. Rewind the decoders back to the start when you want to play them a second time (by seeking to frame 0). |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry for asking such a noobish question but I can't find any documentation on this or my brain is kind of not functioning right. I just want to load up lets say a bird wav file and a dog barkding wav file.
I read that I'm not supposed to create another device but then how would I load both of them and play either one if I press B for bird or D for dog barking? I know about the callback but how do I distinguish 'ma_device_start(&device);' to start the one I want?
Beta Was this translation helpful? Give feedback.
All reactions