mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
Mod code cleanup
svn-id: r27690
This commit is contained in:
parent
71e696094e
commit
61af086e8e
@ -80,14 +80,6 @@ public:
|
||||
Instruments *getInstruments(void) const { return _instruments; }
|
||||
bool getRepeating(void) const { return _repCount != 0; }
|
||||
void setRepeating (int32 repCount) { _repCount = repCount; }
|
||||
virtual void startPlay(void) { _playing = true;}
|
||||
virtual void stopPlay(void)
|
||||
{
|
||||
_mutex.lock();
|
||||
_playing = false;
|
||||
_mutex.unlock();
|
||||
}
|
||||
virtual void pausePlay(bool pause) { _playing = !pause; }
|
||||
|
||||
bool load(Common::SeekableReadStream &dum);
|
||||
bool load(const char *dum) {
|
||||
@ -98,7 +90,16 @@ public:
|
||||
return false;
|
||||
}
|
||||
void unload(void);
|
||||
void restart(void) { if (_data) { stopPlay(); init(); startPlay(); } }
|
||||
void restart(void) {
|
||||
if (_data) {
|
||||
// Use the mutex here to ensure we do not call init()
|
||||
// while data is being read by the mixer thread.
|
||||
_mutex.lock();
|
||||
init();
|
||||
_playing = true;
|
||||
_mutex.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
Instruments *_instruments;
|
||||
|
@ -51,9 +51,9 @@ public:
|
||||
}
|
||||
void clearVoice(byte voice);
|
||||
void clearVoices() { for (int i = 0; i < NUM_VOICES; ++i) clearVoice(i); }
|
||||
virtual void startPlay(void) {}
|
||||
virtual void stopPlay(void) {}
|
||||
virtual void pausePlay(bool pause) {}
|
||||
void startPlay(void) { _playing = true; }
|
||||
void stopPlay(void) { _playing = false; }
|
||||
void pausePlay(bool pause) { _playing = !pause; }
|
||||
|
||||
// AudioStream API
|
||||
int readBuffer(int16 *buffer, const int numSamples);
|
||||
|
Loading…
x
Reference in New Issue
Block a user