コード例 #1
0
spp_AudioManager::~spp_AudioManager()
{
	//deleting all the stored buffers
	UnloadAllSounds();

	RemoveAllProcessingPlugIns();

	//deleting the listener
	delete mpListener;

	StopDebugMode();

	//closing OpenAL
	alcMakeContextCurrent(NULL);
	alcDestroyContext(mpContext);
	alcCloseDevice(mpDevice);
	alcCaptureCloseDevice(mpRecordingDevice);
}
コード例 #2
0
void SoundManager::SetParameters(const Parameters& parameters)
{
	if (initialized)
	{
		bool initial_state = active;

		// If it was initially on, turn off the sound manager
		if (initial_state)
			SetStatus(false);

		// We need to get rid of the sounds we have in memory
		UnloadAllSounds();

		// Stuff in our new parameters
		this->parameters = parameters;
		this->parameters.Verify();

		// If it was initially on, turn the sound manager back on
		if (initial_state && parameters.volume)
			SetStatus(true);		
	}

}