MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Music_PlayFile

Method Music_PlayFile

Source/PC/Sound_PC.cpp:143–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143void cSound_PC::Music_PlayFile( const std::string& pFilename ) {
144
145 if (mSound == false)
146 return;
147
148 Mix_FreeMusic( mMusicPlaying );
149 SDL_Delay( 100 );
150 mMusicPlaying = 0;
151
152 if(g_ResourceMan->FileExists(pFilename.c_str()))
153 mMusicPlaying = Mix_LoadMUS(pFilename.c_str());
154
155 Mix_VolumeMusic( 0x70 );
156
157 if (mMusicPlaying)
158 Mix_PlayMusic( mMusicPlaying, -1 );
159}
160
161void cSound_PC::Music_Stop() {
162 mPlayingTrack = -1;

Callers

nothing calls this directly

Calls 1

FileExistsMethod · 0.80

Tested by

no test coverage detected