Emergency 20 Dokumentation  4.2.0
AudioProxy.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
15 #include <qsf/audio/AudioProxy.h>
16 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23  namespace multiplayer
24  {
25  namespace server
26  {
27  class Host;
28  }
29  }
30 }
31 
32 
33 //[-------------------------------------------------------]
34 //[ Namespace ]
35 //[-------------------------------------------------------]
36 namespace em5
37 {
38 
39 
40  //[-------------------------------------------------------]
41  //[ Classes ]
42  //[-------------------------------------------------------]
48  {
49 
50 
51  //[-------------------------------------------------------]
52  //[ Public methods ]
53  //[-------------------------------------------------------]
54  public:
59  AudioProxy();
60 
65  virtual ~AudioProxy();
66 
77  void synchronizeWithMultiplay(bool onlyDataUpdate = false);
78 
83  const uint32 getId() const;
84 
85 
86  //[-------------------------------------------------------]
87  //[ Protected virtual qsf::AudioProxy methods ]
88  //[-------------------------------------------------------]
89  protected:
90  virtual void onPlay() override;
91  virtual void onStop() override;
92  virtual void onContextChanged(qsf::Entity* contextEntity) override;
93  virtual void onDetach() override;
94 
95 
96  //[-------------------------------------------------------]
97  //[ Private data ]
98  //[-------------------------------------------------------]
99  private:
100  multiplayer::server::Host* mMultiplayerHost;
101  uint32 mId;
102  bool mIsStart;
103  bool mIsDetached;
104  bool mIsStop;
105  uint64 mContextEntityId;
106 
107 
108  //[-------------------------------------------------------]
109  //[ Private static data ]
110  //[-------------------------------------------------------]
111  private:
112  static uint32 mNextFreeId;
113 
114 
115  };
116 
117 
118 //[-------------------------------------------------------]
119 //[ Namespace ]
120 //[-------------------------------------------------------]
121 } // qsf
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
uint64_t uint64
Definition: PlatformTypes.h:184
EMERGENCY 5 multiplayer host class.
Definition: Host.h:82
The audio proxy resembles the playback of an audio asset.
Definition: AudioProxy.h:71
Extended audio proxy for easier multiplay usage.
Definition: AudioProxy.h:47