axmol/tests/cpp-tests/Classes/NewAudioEngineTest
James Chen bb004c5e22 [audio] Fixes some issues while stop/uncache right after play/preload on OSX/iOS platform. (#16147)
* [audio] Fixes some issues while stop/uncache right after play/preload on OSX/iOS platform.

* Better state control in AudioCache.

* Adds State enum class which contains INITIAL, LOADING, READY, FAILED states.
* AudioPlayer::destroy should check AudioCache::_isAudioLoaded flag, otherwise, app will freeze in cpp-tests/NewAudioEngineTest/6:Test invalid audio file.

* Should check whether state is INITIAL in the destructor of AudioCache.

* Adds test case for switching play state frequently.

* Skips invoking reading data callback if cache's state is INITIAL.

* Variables initialization for AudioCache class and fixes protential missing delete AL buffers.
2016-07-21 14:57:59 +08:00
..
NewAudioEngineTest.cpp [audio] Fixes some issues while stop/uncache right after play/preload on OSX/iOS platform. (#16147) 2016-07-21 14:57:59 +08:00
NewAudioEngineTest.h [audio] Fixes some issues while stop/uncache right after play/preload on OSX/iOS platform. (#16147) 2016-07-21 14:57:59 +08:00