ScummVM API documentation
macintosh.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 SCUMM_IMUSE_DRV_MAC_H
23#define SCUMM_IMUSE_DRV_MAC_H
24
25#include "audio/mididrv.h"
26#include "scumm/players/mac_sound_lowlevel.h"
27
28namespace Audio {
29class Mixer;
30}
31
32namespace IMSMacintosh {
33class IMuseChannel_Macintosh;
34class IMSMacSoundSystem;
35struct ChanControlNode;
36} // End of namespace IMSMacintosh
37
38namespace Scumm {
39
40class IMuseDriver_Macintosh final : public MidiDriver {
41 friend class IMSMacintosh::IMuseChannel_Macintosh;
42public:
43 IMuseDriver_Macintosh(ScummEngine *vm, Audio::Mixer *mixer, byte gameID);
44 virtual ~IMuseDriver_Macintosh() override;
45
46 int open() override;
47 void close() override;
48
49 bool isOpen() const override { return _isOpen; }
50 uint32 property(int prop, uint32 param) override;
51 void setTimerCallback(void *timerParam, Common::TimerManager::TimerProc timerProc) override;
52 uint32 getBaseTempo() override { return _baseTempo; }
53 void send(uint32 b) override { error("%s():: Not implemented", __FUNCTION__); }
54
55 // Channel allocation functions
56 MidiChannel *allocateChannel() override;
57 MidiChannel *getPercussionChannel() override;
58
59private:
60 void createChannels();
61 void releaseChannels();
62
63 bool _isOpen;
64 uint32 _quality;
65 uint32 _musicVolume;
66 uint32 _sfxVolume;
67
68 IMSMacintosh::IMSMacSoundSystem *_device;
69 IMSMacintosh::IMuseChannel_Macintosh **_imsParts;
70 IMSMacintosh::ChanControlNode **_channels;
71
72 byte _numChannels;
73 byte _numParts;
74 uint32 _baseTempo;
75 int8 _version;
76};
77
78} // End of namespace Scumm
79
80#endif
Definition: mixer.h:70
void(* TimerProc)(void *refCon)
Definition: timer.h:42
Definition: mididrv.h:541
Definition: mididrv.h:313
Definition: macintosh.h:40
void send(uint32 b) override
Definition: macintosh.h:53
bool isOpen() const override
Definition: macintosh.h:49
uint32 getBaseTempo() override
Definition: macintosh.h:52
uint32 property(int prop, uint32 param) override
Definition: scumm.h:536
void NORETURN_PRE error(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
Definition: system.h:39
Definition: actor.h:30