2013-09-18 23:59:26 +02:00
|
|
|
/* 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.
|
2014-02-18 02:34:18 +01:00
|
|
|
*
|
2013-09-18 23:59:26 +02:00
|
|
|
* 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.
|
2014-02-18 02:34:18 +01:00
|
|
|
*
|
2013-09-18 23:59:26 +02:00
|
|
|
* 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"
|
2016-04-14 16:10:21 +03:00
|
|
|
|
|
|
|
namespace Audio {
|
|
|
|
class PCSpeaker;
|
|
|
|
}
|
2013-09-18 23:59:26 +02:00
|
|
|
|
|
|
|
namespace Avalanche {
|
|
|
|
|
|
|
|
class SoundHandler {
|
|
|
|
public:
|
2013-09-19 00:23:59 +02:00
|
|
|
bool _soundFl;
|
|
|
|
|
2013-09-18 23:59:26 +02:00
|
|
|
SoundHandler(AvalancheEngine *vm);
|
|
|
|
~SoundHandler();
|
|
|
|
|
|
|
|
void toggleSound();
|
|
|
|
void playNote(int freq, int length);
|
|
|
|
void click();
|
|
|
|
void blip();
|
|
|
|
void syncVolume();
|
2013-09-19 19:04:01 +02:00
|
|
|
void stopSound();
|
2013-09-18 23:59:26 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
AvalancheEngine *_vm;
|
|
|
|
Audio::PCSpeaker *_speakerStream;
|
|
|
|
Audio::SoundHandle _speakerHandle;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Avalanche
|
|
|
|
|
2013-10-05 02:16:30 +02:00
|
|
|
#endif // AVALANCHE_SOUND_H
|