added structures for midi pause/volume

svn-id: r5591
This commit is contained in:
Oliver Kiehl 2002-11-17 17:15:29 +00:00
parent 5ae9b1e05b
commit 128580df1e
4 changed files with 28 additions and 0 deletions

View File

@ -417,6 +417,21 @@ void MidiPlayer::play()
_midiDriver->pause(false);
}
void MidiPlayer::pause(bool b)
{
_midiDriver->pause(b);
}
uint MidiPlayer::get_volume()
{
// TODO: implement me
return 0;
}
void MidiPlayer::set_volume(uint volume)
{
// TODO: implement me
}
void MidiPlayer::set_driver(MidiDriver *md)
{

View File

@ -33,6 +33,9 @@ public:
void initialize();
void shutdown();
void play();
void pause(bool b);
uint get_volume();
void set_volume(uint volume);
void set_driver(MidiDriver *md);
private:

View File

@ -153,6 +153,8 @@ SimonState::SimonState(GameDetector *detector, OSystem *syst)
_effects_sound = 0;
_voice_sound = 0;
_ambient_sound = 0;
_music_playing = false;
}
SimonState::~SimonState()
@ -4608,6 +4610,12 @@ void SimonState::delay(uint amount)
case OSystem::EVENT_KEYDOWN:
if (event.kbd.keycode == 't') {
_vk_t_toggle ^= 1;
} else if (event.kbd.keycode == '+') {
midi.set_volume(midi.get_volume() + 10);
} else if (event.kbd.keycode == '-') {
midi.set_volume(midi.get_volume() - 10);
} else if (event.kbd.keycode == 'm') {
midi.pause(_music_playing ^= 1);
} else if (event.kbd.flags == OSystem::KBD_CTRL) {
if (event.kbd.keycode == 'f') {
_fast_mode ^= 1;

View File

@ -341,6 +341,8 @@ public:
int _ambient_index;
uint _ambient_playing;
bool _music_playing;
int _timer_id;
FILE *_dump_file;