ScummVM API documentation
amiga.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 IMUSE_DRV_AMIGA_H
23#define IMUSE_DRV_AMIGA_H
24
25#include "audio/mididrv.h"
26#include "audio/mods/paula.h"
27#include "audio/mixer.h"
28
29namespace Scumm {
30
31class IMusePart_Amiga;
32class SoundChannel_Amiga;
33struct Instrument_Amiga;
34
36friend class SoundChannel_Amiga;
37public:
39 ~IMuseDriver_Amiga() override;
40
41 int open() override;
42 bool isOpen() const override { return _isOpen; }
43 void close() override;
44
45 void send(uint32 b) override;
46
47 void setTimerCallback(void *timer_param, Common::TimerManager::TimerProc timer_proc) override;
48
49 uint32 getBaseTempo() override;
50 MidiChannel *allocateChannel() override;
51 MidiChannel *getPercussionChannel() override;
52
53 void interrupt() override;
54
55private:
56 void updateParser();
57 void updateSounds();
58
59 void loadInstrument(int program);
60 void unloadInstruments();
61
62 IMusePart_Amiga **_parts;
63 SoundChannel_Amiga **_chan;
64
66 void *_timerProcPara;
67
68 Audio::Mixer *_mixer;
69 Audio::SoundHandle _soundHandle;
70
71 int32 _ticker;
72 bool _isOpen;
73
74 Instrument_Amiga *_instruments;
75 uint16 _missingFiles;
76
77 const int32 _baseTempo;
78 const int32 _internalTempo;
79 const uint8 _numParts;
80};
81
82}
83
84#endif
Definition: mixer.h:70
Definition: paula.h:36
Definition: mixer.h:49
void(* TimerProc)(void *refCon)
Definition: timer.h:42
Definition: mididrv.h:541
Definition: mididrv.h:313
Definition: amiga.h:35
void send(uint32 b) override
bool isOpen() const override
Definition: amiga.h:42
void close() override
uint32 getBaseTempo() override
Definition: actor.h:30