Example #1
0
void SoundEngine::playGameMusic() {
	pauseChannel(loadingChannel_);
	pauseChannel(menuChannel_);
	pauseChannel(endChannel_);
	pauseChannel(gravityChannel_);

	if (gameChannel_) {
		bool paused;
		gameChannel_->getPaused(&paused);
		if (paused) {
			gameChannel_->setPaused(false);
		}
		return;
	}

	result_ = system_->playSound(gameMusic_, 0, false, &gameChannel_);
}
Example #2
0
void SoundManager::pauseChannel(ChannelHandle &handle, bool pause) {
	Common::StackLock lock(_mutex);

	Channel *channel = getChannel(handle);
	if (!channel || !channel->stream)
		throw Common::Exception("Invalid channel");

	pauseChannel(channel, pause);
}
Example #3
0
void SoundManager::pauseAll(bool pause) {
	Common::StackLock lock(_mutex);

	for (uint16 i = 1; i < kChannelCount; i++)
		pauseChannel(_channels[i], pause);
}