ScummVM API documentation
song_adplug.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 NUVIE_SOUND_SONG_ADPLUG_H
23 #define NUVIE_SOUND_SONG_ADPLUG_H
24 
25 #include "audio/mixer.h"
26 #include "ultima/nuvie/sound/song.h"
27 #include "ultima/nuvie/sound/decoder/u6_adplug_decoder_stream.h"
28 
29 namespace Ultima {
30 namespace Nuvie {
31 
32 class CEmuopl;
33 
34 class SongAdPlug : public Song {
35 public:
36  uint16 samples_left;
37 
39  ~SongAdPlug() override;
40  bool Init(const Common::Path &path, const char *fileId) override {
41  return Init(path, fileId, 0);
42  }
43  bool Init(const Common::Path &path, const char *fileId, uint16 song_num) override;
44  bool Play(bool looping = false) override;
45  bool Stop() override;
46  bool SetVolume(uint8 volume) override;
47  bool FadeOut(float seconds) override {
48  return false;
49  }
50  CEmuopl *get_opl() {
51  return opl;
52  };
53 
54 private:
55  Audio::Mixer *mixer;
56  CEmuopl *opl;
57  U6AdPlugDecoderStream *stream;
58  Audio::SoundHandle handle;
59 
60 
61 };
62 
63 } // End of namespace Nuvie
64 } // End of namespace Ultima
65 
66 #endif
Definition: u6_adplug_decoder_stream.h:38
Definition: path.h:52
Definition: detection.h:27
Definition: mixer.h:49
Definition: mixer.h:59
Definition: song_adplug.h:34
Definition: emu_opl.h:31
Definition: song.h:30