ScummVM API documentation
clip_my_midi.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 AGS_ENGINE_MEDIA_AUDIO_CLIP_MYMIDI_H
23 #define AGS_ENGINE_MEDIA_AUDIO_CLIP_MYMIDI_H
24 
25 #include "ags/engine/media/audio/sound_clip.h"
26 #include "ags/engine/media/audio/audio_defines.h"
27 
28 namespace AGS3 {
29 
30 // MIDI
31 struct MYMIDI : public SOUNDCLIP {
32  Audio::Mixer *_mixer;
34  int lengthInSeconds;
35  SoundClipState _state;
36 
37  MYMIDI(Common::SeekableReadStream *data, bool repeat);
38  ~MYMIDI() override;
39 
40  void poll() override;
41 
42  void seek(int pos) override;
43  void seek_ms(int pos_ms) override;
44 
45  int get_pos() override;
46 
47  int get_pos_ms() override;
48 
49  int get_length_ms() override;
50 
51  void pause() override;
52 
53  void resume() override;
54 
55  int get_sound_type() const override {
56  return MUS_MIDI;
57  }
58 
59  int play() override;
60  int play_from(int position) override;
61  bool is_playing() override;
62  bool is_paused() override;
63  void set_panning(int newPanning) override;
64  void set_speed(int new_speed) override;
65  void adjust_volume() override;
66 };
67 
68 } // namespace AGS3
69 
70 #endif
Definition: stream.h:745
int get_pos_ms() override
Definition: sound_clip.h:53
Definition: mixer.h:59
int get_pos() override
Definition: clip_my_midi.h:31
void seek_ms(int pos_ms) override
void seek(int pos) override
int get_length_ms() override
int get_sound_type() const override
Definition: clip_my_midi.h:55
Definition: ags.h:40