diff options
| author | Max Horn | 2005-01-28 22:05:51 +0000 |
|---|---|---|
| committer | Max Horn | 2005-01-28 22:05:51 +0000 |
| commit | abd12dd1b63d9e680bdc157fd5aa1fdb579e111e (patch) | |
| tree | da026a16edefcc56119ef2376eb0b26f7ec9d500 /sword1 | |
| parent | c62d82450b7fc4d64bf6102cb8074457e3d0cb47 (diff) | |
| download | scummvm-rg350-abd12dd1b63d9e680bdc157fd5aa1fdb579e111e.tar.gz scummvm-rg350-abd12dd1b63d9e680bdc157fd5aa1fdb579e111e.tar.bz2 scummvm-rg350-abd12dd1b63d9e680bdc157fd5aa1fdb579e111e.zip | |
Use class Mutex instead of MutexRef
svn-id: r16679
Diffstat (limited to 'sword1')
| -rw-r--r-- | sword1/music.cpp | 6 | ||||
| -rw-r--r-- | sword1/music.h | 5 | ||||
| -rw-r--r-- | sword1/sword1.cpp | 2 |
3 files changed, 4 insertions, 9 deletions
diff --git a/sword1/music.cpp b/sword1/music.cpp index 99166ed2e6..34ef5b48c9 100644 --- a/sword1/music.cpp +++ b/sword1/music.cpp @@ -251,11 +251,9 @@ void MusicHandle::stop() { _looping = false; } -Music::Music(OSystem *system, SoundMixer *pMixer) { - _system = system; +Music::Music(SoundMixer *pMixer) { _mixer = pMixer; _sampleRate = pMixer->getOutputRate(); - _mutex = _system->createMutex(); _converter[0] = NULL; _converter[1] = NULL; _volumeL = _volumeR = 192; @@ -266,8 +264,6 @@ Music::~Music() { _mixer->setupPremix(0); delete _converter[0]; delete _converter[1]; - if (_mutex) - _system->deleteMutex(_mutex); } void Music::mixer(int16 *buf, uint32 len) { diff --git a/sword1/music.h b/sword1/music.h index 1a898e80f3..1920edd0f1 100644 --- a/sword1/music.h +++ b/sword1/music.h @@ -84,7 +84,7 @@ public: class Music : public AudioStream { public: - Music(OSystem *system, SoundMixer *pMixer); + Music(SoundMixer *pMixer); ~Music(); void startMusic(int32 tuneId, int32 loopFlag); void fadeDown(); @@ -104,10 +104,9 @@ private: st_volume_t _volumeL, _volumeR; MusicHandle _handles[2]; RateConverter *_converter[2]; - OSystem *_system; SoundMixer *_mixer; uint32 _sampleRate; - Common::MutexRef _mutex; + Common::Mutex _mutex; static void passMixerFunc(void *param, int16 *buf, uint len); void mixer(int16 *buf, uint32 len); diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp index 4e4eca1d37..6be538516e 100644 --- a/sword1/sword1.cpp +++ b/sword1/sword1.cpp @@ -170,7 +170,7 @@ int SwordEngine::init(GameDetector &detector) { _mixer->setVolumeForSoundType(SoundMixer::kMusicAudioDataType, SoundMixer::kMaxMixerVolume); _mouse = new Mouse(_system, _resMan, _objectMan); _screen = new Screen(_system, _resMan, _objectMan); - _music = new Music(_system, _mixer); + _music = new Music(_mixer); _sound = new Sound("", _mixer, _resMan); _menu = new Menu(_screen, _mouse); _logic = new Logic(_objectMan, _resMan, _screen, _mouse, _sound, _music, _menu, _system, _mixer); |
