ScummVM API documentation
player_v2a.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_PLAYERS_PLAYER_V2A_H
23 #define SCUMM_PLAYERS_PLAYER_V2A_H
24 
25 #include "common/scummsys.h"
26 #include "scumm/music.h"
27 #include "scumm/players/player_mod.h"
28 
29 class Mixer;
30 
31 namespace Scumm {
32 
33 class ScummEngine;
34 class V2A_Sound;
35 
39 class Player_V2A : public MusicEngine {
40 public:
41  Player_V2A(ScummEngine *scumm, Audio::Mixer *mixer);
42  ~Player_V2A() override;
43 
44  void setMusicVolume(int vol) override;
45  void startSound(int sound) override;
46  void stopSound(int sound) override;
47  void stopAllSounds() override;
48  int getMusicTimer() override;
49  int getSoundStatus(int sound) const override;
50 
51 private:
52  enum {
53  V2A_MAXSLOTS = 8
54  };
55 
56  struct soundSlot {
57  int id;
58  V2A_Sound *sound;
59  };
60 
61  ScummEngine *_vm;
62  Player_MOD *_mod;
63  soundSlot _slot[V2A_MAXSLOTS];
64 
65  int getSoundSlot(int id = 0) const;
66  static void update_proc(void *param);
67  void updateSound();
68 };
69 
70 } // End of namespace Scumm
71 
72 #endif
void stopSound(int sound) override
int getMusicTimer() override
void stopAllSounds() override
Definition: music.h:40
Definition: scumm.h:518
Definition: mixer.h:59
int getSoundStatus(int sound) const override
void startSound(int sound) override
Definition: player_mod.h:39
Definition: actor.h:30
void setMusicVolume(int vol) override
Definition: player_v2a.h:39