diff options
author | Strangerke | 2013-09-18 23:59:26 +0200 |
---|---|---|
committer | Strangerke | 2013-09-18 23:59:26 +0200 |
commit | 23b225ca0d1da28a45507824edcff1c9ca0f917b (patch) | |
tree | e5bcd9a33e5abd92d179582fcf66d4e15288f0c5 /engines/avalanche/sound.h | |
parent | edc147774100ffcdfb6aeaa896151e75790564ce (diff) | |
download | scummvm-rg350-23b225ca0d1da28a45507824edcff1c9ca0f917b.tar.gz scummvm-rg350-23b225ca0d1da28a45507824edcff1c9ca0f917b.tar.bz2 scummvm-rg350-23b225ca0d1da28a45507824edcff1c9ca0f917b.zip |
AVALANCHE: Add sound class, blip(), playNote() and click()
Diffstat (limited to 'engines/avalanche/sound.h')
-rw-r--r-- | engines/avalanche/sound.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/engines/avalanche/sound.h b/engines/avalanche/sound.h new file mode 100644 index 0000000000..65dda96406 --- /dev/null +++ b/engines/avalanche/sound.h @@ -0,0 +1,54 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef AVALANCHE_SOUND_H +#define AVALANCHE_SOUND_H + +#include "audio/mixer.h" +#include "audio/midiplayer.h" +#include "audio/softsynth/pcspk.h" + +namespace Avalanche { + +class SoundHandler { +public: + SoundHandler(AvalancheEngine *vm); + ~SoundHandler(); + + void toggleSound(); + void playNote(int freq, int length); + void click(); + void blip(); + void initSound(); + void syncVolume(); + +private: + AvalancheEngine *_vm; + Audio::PCSpeaker *_speakerStream; + Audio::SoundHandle _speakerHandle; + + void stopSound(); +}; + +} // End of namespace Avalanche + +#endif //AVALANCHE_SOUND_H |