ScummVM API documentation
towns_audio.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef TOWNS_AUDIO_H
23 #define TOWNS_AUDIO_H
24 
25 namespace Audio {
26 class Mixer;
27 }
28 
29 class TownsAudioInterfaceInternal;
30 
32 public:
34  virtual void timerCallback(int timerId) = 0;
35 };
36 
38 public:
39  TownsAudioInterface(Audio::Mixer *mixer, TownsAudioInterfacePluginDriver *driver, bool externalMutex = false);
41 
42  enum ErrorCode {
43  kSuccess = 0,
44  kInvalidChannel,
45  kUnavailable,
46  kArgumentOutOfRange,
47  kNotImplemented,
48  kOutOfWaveMemory,
49  kInvalidWaveTable,
50  kChannelNotReserved,
51  kNoteOutOfRangeForInstrument,
52  kNoMatchingWaveTable,
53  kDuplicateWaveTable
54  };
55 
56  bool init();
57 
58  ErrorCode callback(int command, ...);
59 
60  void setMusicVolume(int volume);
61  void setSoundEffectVolume(int volume);
62  // Defines the channels used as sound effect channels for the purpose of ScummVM GUI volume control.
63  // The first 6 bits are the 6 fm channels. The next 8 bits are pcm channels.
64  void setSoundEffectChanMask(int mask);
65 
66 private:
67  TownsAudioInterfaceInternal *_intf;
68 };
69 
70 #endif
Definition: towns_audio.h:37
Definition: mixer.h:59
Definition: system.h:38
Definition: towns_audio.h:31