/*/////////////////////////////////////////////////////////////////*/ void OgreOggStreamSound::setSource(ALuint& src) { if (src!=AL_NONE) { // Set source mSource=src; // Fill data buffers _prebuffer(); // Init source _initSource(); } else { // Unqueue buffers _dequeue(); // Set source mSource=src; // Cancel initialisation mInitialised = false; } }
/*/////////////////////////////////////////////////////////////////*/ void OgreOggStaticSound::setSource(ALuint& src) { if (src!=AL_NONE) { // Attach new source mSource=src; // Load audio data onto source _prebuffer(); // Init source properties _initSource(); } else { // Need to stop sound BEFORE unqueuing alSourceStop(mSource); // Unqueue buffer alSourcei(mSource, AL_BUFFER, 0); // Attach new source mSource=src; // Cancel initialisation mInitialised = false; } }