Replies: 1 comment
-
At the moment the only way to check if the sound is at the end is to poll it with For triggering at a specific frame, you could attach a custom node into the graph which acts as a trigger node. You'd configure it as a passthrough to tell miniaudio not to expect any processing of the actual audio data, and then you'd just keep track of a frame counter and do your necessary triggering. I can go into further detail about that if you like. You would probably need to be careful about what you do from inside the processing callback of your trigger node however (you wouldn't want to be detaching anything from the node graph, for example). |
Beta Was this translation helpful? Give feedback.
-
C++20, GCC 11.1.0
I'm currently utilizing the engine and ma_sound structs to play sounds.
However, I would like to set some sort of a callback system for specific frames/seconds of a sound (e.g. as soon as a sound finishes playing, it calls a function). Is there an existing implementation in
miniaudio
that allows me to do so? Do I have to use the lower-level API? Or do I have to create my own system?Note: I already had a look at the documentation and the discussions, and may have missed out on the answer.
Beta Was this translation helpful? Give feedback.
All reactions