You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How can I tell if my device is now playing sound? #489
When you call ma_device_start() it is continuously running and firing the data callback. Whatever you copy to the output buffer in the data callback is what will be playing. If you're not copying anything to the buffer, nothing will come out of the speakers, but the device will still be running in the background. Likewise, if you haven't yet called ma_device_start() or have called ma_device_stop(), nothing will be playing.
If you're using the engine, just use ma_sound_at_end() to know if the sound is at the end yet.
(Moving this to the Discussion section.)
Repository owner locked and limited conversation to collaborators on Jun 24, 2022
Activity
mackron commentedon Jun 24, 2022
When you call
ma_device_start()it is continuously running and firing the data callback. Whatever you copy to the output buffer in the data callback is what will be playing. If you're not copying anything to the buffer, nothing will come out of the speakers, but the device will still be running in the background. Likewise, if you haven't yet calledma_device_start()or have calledma_device_stop(), nothing will be playing.If you're using the engine, just use
ma_sound_at_end()to know if the sound is at the end yet.(Moving this to the Discussion section.)