Open rh101 opened 7 years ago
@rh101, thanks for your feedback, I will check this issue. Mark it in the v3.15. :)
@dumganhar I appreciate that, thank you!
@rh101
This issue isn't as easy as it seems to be, mark it in next
milestone.
I will continue to investigate.
@dumganhar For me personally this is not an issue any more, since your work on the OGG playback has solved the issue of using OGG files, which seem to work with all platforms, so I'm using that format again. If I'm the only one who has mentioned this specific issue, and no-one else cares about it, then there is no rush at all to get it sorted.
Steps to Reproduce:
When AudioEngine::play2d is called, it always returns a valid ID even if the audio file format is not supported on that platform (such as AAC/M4A format on Windows). If the audio format is not supported, the audio player instance is removed, then the sound finishedCallback is never actually called.
If the game code gets a valid ID from play2d, then it expects the sound finished callback to be triggered, but if the sound was not actually played, then the game will be stuck waiting for an event that will never happen.
If AudioEngine::play2d instead returned AudioEngine::INVALID_AUDIO_ID if an unsupported audio format is used, then that would solve the problem completely.