示例#1
0
void Sound::play(int name)
{
	if (f_enabled) {
		Sound* sound = f_sound_objects.value(name);
		if (sound && sound->isValid() && (mix_PlayChannel(-1, f_chunks.at(sound->m_id), 0) == -1)) {
			qWarning("Unable to play WAV file: %s", mix_GetError());
		}
	}
}
示例#2
0
void Sound::play()
{
	if (isValid() && (mix_PlayChannel(-1, f_chunks.at(m_id), 0) == -1)) {
		qWarning("Unable to play WAV file: %s", mix_GetError());
	}
}