I have 2 audio files that I want to play at different times: background.wav a sneeze.wav. I believe that I have to convert both wav files into mp3, caf and ogg files. Then I do this:
static const int FILE_COUNT = 2;
std::string _audioBackgroundFiles[FILE_COUNT];
_audioBackgroundFiles[0] = "background.mp3";
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
_audioBackgroundFiles[1] = "background.caf";
#else
_audioBackgroundFiles[1] = "background.ogg";
#endif
for(int index = 0; index < FILE_COUNT; ++index){
auto id = AudioEngine::play2d(_files[index], false, 1.0f, &_audioProfile);
}
I don't understand how to create an audio profile? Do you create a profile for every sound? I'm very confused.