本文整理汇总了C++中Mix_PauseMusic函数的典型用法代码示例。如果您正苦于以下问题:C++ Mix_PauseMusic函数的具体用法?C++ Mix_PauseMusic怎么用?C++ Mix_PauseMusic使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Mix_PauseMusic函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pause
void pause()
{
// Pause all sound
Mix_Pause(-1);
// Pause music
Mix_PauseMusic();
}
示例2: Mix_ResumeMusic
void SoundBank::PauseOrResume() {
if (Mix_PausedMusic()) {
Mix_ResumeMusic();
}
else {
Mix_PauseMusic();
}
}
示例3: Mix_PauseMusic
void GsMusic::pause(void)
{
if (!Mix_PlayingMusic())
return;
if (Mix_PausedMusic())
return;
Mix_PauseMusic();
}
示例4: Mix_PauseMusic
void Music::Pause()
{
if (Audio::GetInstance()->GetCurrentMusic() != this)
return;
if (Mix_PausedMusic() == 0)
Mix_PauseMusic();
}
示例5: Mix_PauseMusic
void SDL::pauseMusic()
{
if (!(SDL::startedAudio))
return;
if (SDL::musicPlaying())
Mix_PauseMusic();
}
示例6: Mix_PauseMusic
void SoundManager::toggleSound() {
notmute = !notmute;
if(!notmute)
Mix_PauseMusic();
else if(Mix_PausedMusic())
Mix_ResumeMusic();
}
示例7: Mix_ResumeMusic
void GsMusic::toggle(void)
{
if (!Mix_PlayingMusic())
return;
if (Mix_PausedMusic())
Mix_ResumeMusic();
else
Mix_PauseMusic();
}
示例8: Mix_ResumeMusic
void Music::PauseMusic() {
if(Mix_PausedMusic() == 1) {
Mix_ResumeMusic();
musicStopped = false;
} else {
Mix_PauseMusic();
musicStopped = true;
}
}
示例9: Mix_ResumeMusic
void Audio::pauseTrack()
{
//std::cout << "pauseTrack()" << std::endl;
if (!_opt._bMusic) return;
if (Mix_Paused(-1))
Mix_ResumeMusic();
else
Mix_PauseMusic();
}
示例10: freeSounds
Audio::~Audio() {
if (SOUND) {
freeSounds();
Mix_PauseMusic();
Mix_VolumeMusic(previous_volume);
Mix_HaltMusic();
Mix_FreeMusic(music);
Mix_CloseAudio();
}
}
示例11: Mix_ResumeMusic
void MySoundEffect::resumeMusic()
{
if (Mix_PausedMusic() == 1) {
Mix_ResumeMusic();
}
else
{
Mix_PauseMusic();
}
}
示例12: LOG_WARNING
void Mixer::PauseMusic()
{
if (!theBgMusic)
{
LOG_WARNING() << "Trying to pause music, but never loaded any";
return;
}
Mix_PauseMusic();
}
示例13: Mix_PauseMusic
bool Sounds::pause_audio_player(void)
{
if (Mix_PausedMusic() != 1)
{
Mix_PauseMusic();
Mix_Pause(1);
return (true);
}
return (false);
}
示例14: BGS_Pause
void SdlAudio::BGM_Pause() {
// Midi pause is not supported... (for some systems -.-)
#if SDL_MAJOR_VERSION>1
// SDL2_mixer bug, see above
if (Mix_GetMusicType(bgm.get()) == MUS_WAV) {
BGS_Pause();
return;
}
#endif
Mix_PauseMusic();
}
示例15: Mix_PauseMusic
/**
* Pauses music playback when game loses focus.
*/
void Music::pause()
{
#ifndef __NO_MUSIC
if (!Options::mute)
{
Mix_PauseMusic();
if (Mix_GetMusicType(0) == MUS_NONE)
Mix_HookMusic(NULL, NULL);
}
#endif
}