I have looked through the FMOD Ex examples and tried to implement a simple car sound (just for learning).
Therefore I have 5 sounds, each for a certain rpm-range. When the rpm goes above a certain value, the next sound is started and the old one is paused. The starting of a new sound works, but I don’t get the old ones pausing so the old and new sounds are played back.
Here is a code snipped:
FMOD::Sound* CSoundManager::AddSound(const char* pFilename, bool loop)
m_result = m_system->createSound(pFilename, FMOD_HARDWARE, 0, &sound1);
if (!ERRCHECK(m_result)) return 0;
if (loop) sound1->setMode(FMOD_LOOP_NORMAL); m_sounds.push_back(sound1); return sound1;
// Start a sound
// Stop a sound
[EDIT]: I get an error 33 (“Invalid sound handle”) for “m_pSoundChannel”.
- dnaxx asked 13 years ago
- You must login to post comments