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

Method Music_Play

Source/Amiga/Sound_Amiga.cpp:216–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216void cSound_Amiga::Music_Play( int16 pTrack, int16 pSong) {
217
218 if (mPlayingTrack == pTrack && mPlayingSong == pSong)
219 return;
220
221 int16 Number = Track_Load( &mSound_Music, pTrack, pSong);
222
223 Music_Stop();
224 mPlayingTrack = pTrack;
225 mPlayingSong = pSong;
226
227 if (mSound_Music.mCurrentMusicSongData && mSound_Music.mCurrentMusicInstrumentData) {
228 if (mSound_Music.mCurrentMusicSongData->size() && mSound_Music.mCurrentMusicInstrumentData->size())
229 mCurrentMusic = Audio::makeRjp1Stream(mSound_Music.mCurrentMusicSongData, mSound_Music.mCurrentMusicInstrumentData, Number);
230 }
231
232 SDL_PauseAudioDevice(mVal, 0);
233}
234
235void cSound_Amiga::Music_Stop() {
236 mPlayingTrack = -1;

Callers

nothing calls this directly

Calls 2

makeRjp1StreamFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected