本文整理汇总了C++中Mix_PausedMusic函数的典型用法代码示例。如果您正苦于以下问题:C++ Mix_PausedMusic函数的具体用法?C++ Mix_PausedMusic怎么用?C++ Mix_PausedMusic使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Mix_PausedMusic函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: unpause_music
void Sound::unpause_music()
{
if (Mix_PausedMusic())
{
Mix_ResumeMusic();
}
}
示例2: SoundToggleMusicPaused
void SoundToggleMusicPaused(void)
{
if (Mix_PausedMusic())
Mix_PauseMusic();
else
Mix_ResumeMusic();
}
示例3: Resume
void Music::Resume() {
if (Mix_PlayingMusic() == 1) {
if (Mix_PausedMusic() == 1) {
Mix_ResumeMusic();
}
}
}
示例4: mix_pause_resume_music
void mix_pause_resume_music()
{
if (Mix_PausedMusic())
Mix_ResumeMusic();
else if (Mix_PlayingMusic())
Mix_PauseMusic();
}
示例5: MUS_playMusicFadeIn
void PGE_MusPlayer::MUS_playMusicFadeIn(int ms)
{
if(!isLoaded) return;
if(play_mus)
{
if(Mix_PausedMusic()==0)
{
// Reset music sample count
if (SDL_LockMutex(sampleCountMutex) == 0)
{
musSCount = 0;
SDL_UnlockMutex(sampleCountMutex);
}
if(Mix_FadingMusic()!=MIX_FADING_IN)
if(Mix_FadeInMusic(play_mus, -1, ms)==-1)
{
PGE_MsgBox::warn(std::string(std::string("Mix_FadeInMusic:")+std::string(Mix_GetError())).c_str());
}
}
else
Mix_ResumeMusic();
}
else
{
PGE_MsgBox::warn(std::string(std::string("Play nothing:")+std::string(Mix_GetError())).c_str());
}
}
示例6: handleMusic
void handleMusic()
{
if (event.type == SDL_KEYDOWN)
{
switch(event.key.keysym.sym)
{
case SDLK_9:
{
if( Mix_PlayingMusic() == 0 ) //No music playing
{
if( Mix_PlayMusic( music, -1 ) == -1 )
break;;
}
//If music is being played
else
{
if( Mix_PausedMusic() == 1 )
Mix_ResumeMusic();
//If the music is playing
else
Mix_PauseMusic();
}
}
break;
case SDLK_0: Mix_HaltMusic(); break;
default:;
}
}
}
示例7: playPause
//only plays if there is a track running as well.
void Sound::playPause()
{
if( check() )
{
if (Mix_PlayingMusic() == 0)
{
//if (musicTrack == 0)
//startMusic2();
//else if (musicTrack == 1)
//startMusic1();
}
else
{
//If the music is paused
if( Mix_PausedMusic() == 1 )
{ //Resume the music
Mix_ResumeMusic();
} //If the music is playing
else
{ //Pause the music
Mix_PauseMusic();
}
}
}
else
{
printf("music OFF\n");
}
}
示例8: resumeMusic
void SoundManager::resumeMusic()
{
if (Mix_PausedMusic() == 1)
{
Mix_ResumeMusic();
}
}
示例9: pause_music
void Sound::pause_music()
{
if (!Mix_PausedMusic())
{
Mix_PauseMusic();
}
}
示例10: Pause
void Music::Pause() {
if (Mix_PlayingMusic() == 1) {
if (Mix_PausedMusic() == 0) {
Mix_PauseMusic();
}
}
}
示例11: SDL_UnlockMutex
void PGE_MusPlayer::MUS_playMusic()
{
if(!isLoaded) return;
if(play_mus)
{
if (Mix_PlayingMusic() == 0)
{
// Reset music sample count
if (SDL_LockMutex(sampleCountMutex) == 0)
{
musSCount = 0;
SDL_UnlockMutex(sampleCountMutex);
}
Mix_PlayMusic(play_mus, -1);
}
else
if(Mix_PausedMusic()==1)
{
Mix_ResumeMusic();
}
}
else
{
//MessageBoxA(0, std::string(std::string("Play nothing:")+std::string(Mix_GetError())).c_str(), "Error", 0);
}
}
示例12: Set_Text_Block
void Set_Text_Block( void )
{
static int new_value = 0;
new_value++;
char value_string[4];
_itoa_s(new_value, value_string, 4, 10);
MenuElement_TextBlock* text_block_test = (MenuElement_TextBlock*)test_dialog->Get_Element("TextBlockTest");
if (text_block_test != NULL)
{
text_block_test->Set_Text(std::string(value_string));
}
// Simple music playing
if( Mix_PlayingMusic() == 0 )
{
Mix_PlayMusic( music, -1 );
}
else
{
if (Mix_PausedMusic())
{
Mix_ResumeMusic();
}
else
{
Mix_PauseMusic();
}
}
}
示例13: musicPaused
bool SDLManager::musicPaused()
{
if (Mix_PausedMusic())
return true;
else
return false;
}
示例14: Mix_PlayMusic
void SoundService::toggleMusic()
{
//If there is no music playing
if (Mix_PlayingMusic() == 0)
{
//Play the music
Mix_PlayMusic(_music, -1);
}
//If music is being played
else
{
//If the music is paused
if (Mix_PausedMusic() == 1)
{
//Resume the music
Mix_ResumeMusic();
}
//If the music is playing
else
{
//Pause the music
Mix_PauseMusic();
}
}
}
示例15: soundSetMusVol
void soundSetMusVol(int v)
{
if(v==0)
{
if( !Mix_PausedMusic() )
{
Mix_PauseMusic();
}
} else {
if( Mix_PausedMusic() )
{
Mix_ResumeMusic();
}
}
Mix_VolumeMusic(setting()->musicVol);
}