| 191 | } |
| 192 | |
| 193 | void cSound_Amiga::Sound_Play( int16 pTileset, int16 pSoundEffect, int16 pVolume, int16 pIndex) { |
| 194 | |
| 195 | Track_Load( &mSound_Sfx, pTileset + 0x32 ); |
| 196 | |
| 197 | if (SDL_LockMutex( mLock ) == 0) { |
| 198 | if (mSound_Sfx.mCurrentMusicSongData && mSound_Sfx.mCurrentMusicInstrumentData) { |
| 199 | Audio::AudioStream* Sfx = Audio::makeRjp1Stream( mSound_Sfx.mCurrentMusicSongData, mSound_Sfx.mCurrentMusicInstrumentData, -pSoundEffect ); |
| 200 | if (Sfx) { |
| 201 | Sfx->mVolume = pVolume; |
| 202 | if (mCurrentSfx[pIndex]) { |
| 203 | delete mCurrentSfx[pIndex]; |
| 204 | mCurrentSfx[pIndex] = 0; |
| 205 | } |
| 206 | mCurrentSfx[pIndex] = Sfx; |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | SDL_UnlockMutex( mLock ); |
| 211 | } |
| 212 | |
| 213 | SDL_PauseAudioDevice(mVal, 0); |
| 214 | } |
| 215 | |
| 216 | void cSound_Amiga::Music_Play( int16 pTrack, int16 pSong) { |
| 217 |
nothing calls this directly
no test coverage detected