本文整理汇总了C++中Mix_PausedMusic函数的典型用法代码示例。如果您正苦于以下问题:C++ Mix_PausedMusic函数的具体用法?C++ Mix_PausedMusic怎么用?C++ Mix_PausedMusic使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Mix_PausedMusic函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: unpause_music
void Sound::unpause_music()
{
if (Mix_PausedMusic())
{
Mix_ResumeMusic();
}
}
开发者ID:JohnBurchell,项目名称:Games,代码行数:7,代码来源:sound.cpp
示例2: SoundToggleMusicPaused
void SoundToggleMusicPaused(void)
{
if (Mix_PausedMusic())
Mix_PauseMusic();
else
Mix_ResumeMusic();
}
开发者ID:JayWalker512,项目名称:SpacePong,代码行数:7,代码来源:Sound.c
示例3: Resume
void Music::Resume() {
if (Mix_PlayingMusic() == 1) {
if (Mix_PausedMusic() == 1) {
Mix_ResumeMusic();
}
}
}
开发者ID:Naimikan,项目名称:Rise_of_Viwx,代码行数:7,代码来源:cMusic.cpp
示例4: mix_pause_resume_music
void mix_pause_resume_music()
{
if (Mix_PausedMusic())
Mix_ResumeMusic();
else if (Mix_PlayingMusic())
Mix_PauseMusic();
}
开发者ID:CDarrow,项目名称:DXX-Retro,代码行数:7,代码来源:digi_mixer_music.c
示例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());
}
}
开发者ID:tcvicio,项目名称:PGE-Project,代码行数:29,代码来源:SdlMusPlayer.cpp
示例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:;
}
}
}
开发者ID:ohargro,项目名称:capstone,代码行数:29,代码来源:base.cpp
示例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");
}
}
开发者ID:bdragon917,项目名称:mPULSE,代码行数:31,代码来源:Sound.cpp
示例8: resumeMusic
void SoundManager::resumeMusic()
{
if (Mix_PausedMusic() == 1)
{
Mix_ResumeMusic();
}
}
开发者ID:deepbansal15,项目名称:Game-Engine,代码行数:7,代码来源:SoundManager.cpp
示例9: pause_music
void Sound::pause_music()
{
if (!Mix_PausedMusic())
{
Mix_PauseMusic();
}
}
开发者ID:JohnBurchell,项目名称:Games,代码行数:7,代码来源:sound.cpp
示例10: Pause
void Music::Pause() {
if (Mix_PlayingMusic() == 1) {
if (Mix_PausedMusic() == 0) {
Mix_PauseMusic();
}
}
}
开发者ID:Naimikan,项目名称:Rise_of_Viwx,代码行数:7,代码来源:cMusic.cpp
示例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);
}
}
开发者ID:tcvicio,项目名称:PGE-Project,代码行数:28,代码来源:SdlMusPlayer.cpp
示例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();
}
}
}
开发者ID:MensInvictaManet,项目名称:Projects,代码行数:30,代码来源:main.cpp
示例13: musicPaused
bool SDLManager::musicPaused()
{
if (Mix_PausedMusic())
return true;
else
return false;
}
开发者ID:alexdantas,项目名称:sdl-toe,代码行数:7,代码来源:SDLManager.cpp
示例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();
}
}
}
开发者ID:TinyMan,项目名称:warfare-of-heroes,代码行数:25,代码来源:SoundService.cpp
示例15: soundSetMusVol
void soundSetMusVol(int v)
{
if(v==0)
{
if( !Mix_PausedMusic() )
{
Mix_PauseMusic();
}
} else {
if( Mix_PausedMusic() )
{
Mix_ResumeMusic();
}
}
Mix_VolumeMusic(setting()->musicVol);
}
开发者ID:DusteDdk,项目名称:Wizznic,代码行数:16,代码来源:sound.c
示例16: Stop
void AudioSource::Stop()
{
if (Mix_PausedMusic()==0)
{
Mix_PauseMusic();
}
}
开发者ID:kira000,项目名称:PixelFighters,代码行数:7,代码来源:AudioSource.cpp
示例17: toggleMusic
void audio::toggleMusic()
{
if (Mix_PausedMusic())
Mix_ResumeMusic();
else
Mix_PauseMusic();
}
开发者ID:zurn,项目名称:Zakes,代码行数:7,代码来源:audio.cpp
示例18: on_play_clicked
void MusPlayer_WinAPI::on_play_clicked()
{
if(Mix_PlayingMusic())
{
if(Mix_PausedMusic())
{
Mix_ResumeMusic();
SetWindowTextW(m_buttonPlay, L"Pause");
return;
}
else
{
Mix_PauseMusic();
SetWindowTextW(m_buttonPlay, L"Resume");
return;
}
}
char trackIDtext[1024];
memset(trackIDtext, 0, 1024);
GetWindowTextA(m_gme.m_trackNum, trackIDtext, 1024);
int trackID = atoi(trackIDtext);
m_prevTrackID = trackID;
SetWindowTextW(m_buttonPlay, L"Play");
if(currentMusic.empty())
return;
if(PGE_MusicPlayer::MUS_openFile(currentMusic +"|"+trackIDtext ) )
{
PGE_MusicPlayer::MUS_playMusic();
SetWindowTextW(m_buttonPlay, L"Pause");
}
ShowWindow(m_groupGME, SW_HIDE);
ShowWindow(m_groupMIDI, SW_HIDE);
ShowWindow(m_groupADLMIDI, SW_HIDE);
switch(PGE_MusicPlayer::type)
{
case MUS_MID:
ShowWindow(m_groupMIDI, SW_SHOW);
ShowWindow(m_groupADLMIDI, SW_SHOW);
m_height = 350;
break;
case MUS_SPC:
ShowWindow(m_groupGME, SW_SHOW);
m_height = 220;
break;
default:
m_height = 170;
break;
}
SetWindowPos(m_hWnd, HWND_TOP, 0, 0, 350, m_height, SWP_NOMOVE|SWP_NOZORDER);
SetWindowTextW(m_labelTitle, Str2Wstr(PGE_MusicPlayer::MUS_getMusTitle()).c_str());
SetWindowTextW(m_labelArtist, Str2Wstr(PGE_MusicPlayer::MUS_getMusArtist()).c_str());
SetWindowTextW(m_labelAlboom, Str2Wstr(PGE_MusicPlayer::MUS_getMusAlbum()).c_str());
SetWindowTextW(m_labelCopyright, Str2Wstr(PGE_MusicPlayer::MUS_getMusCopy()).c_str());
SetWindowTextA(m_formatInfo, PGE_MusicPlayer::musicTypeC());
}
开发者ID:jpmac26,项目名称:PGE-Project,代码行数:59,代码来源:musplayer_winapi.cpp
示例19: pause
void GsMusic::pause(void)
{
if (!Mix_PlayingMusic())
return;
if (Mix_PausedMusic())
return;
Mix_PauseMusic();
}
开发者ID:rxtsolar,项目名称:engine2d,代码行数:8,代码来源:sound.cpp
示例20: Resume
void Music::Resume()
{
if (Audio::GetInstance()->GetCurrentMusic() != this)
return;
if (Mix_PausedMusic() == 1)
Mix_ResumeMusic();
}
开发者ID:SZSilence06,项目名称:THXYY,代码行数:8,代码来源:THMusic.cpp
注:本文中的Mix_PausedMusic函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论