HoverRace  2.0
ResSound.h
Go to the documentation of this file.
1 // ResSound.h
2 //
3 //
4 // Copyright (c) 1995-1998 - Richard Langlois and Grokksoft Inc.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 //
22 
23 #pragma once
24 
25 #include "../VideoServices/SoundServer.h"
26 #include "../Util/MR_Types.h"
27 
28 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
29 # ifdef MR_ENGINE
30 # define MR_DllDeclare __declspec( dllexport )
31 # else
32 # define MR_DllDeclare __declspec( dllimport )
33 # endif
34 #else
35 # define MR_DllDeclare
36 #endif
37 
38 namespace HoverRace {
39  namespace Parcel {
40  class ObjStream;
41  }
42 }
43 
44 namespace HoverRace {
45 namespace ObjFacTools {
46 
48 {
49 protected:
52 
53  int mNbCopy;
55  char *mData;
56 
57 public:
58  // Only available for resourceLib and construction
59  ResShortSound(int pResourceId);
60  ~ResShortSound();
61 
62  int GetResourceId() const { return mResourceId; }
63  void Serialize(Parcel::ObjStream &pArchive);
64 
65  VideoServices::ShortSound *GetSound() const { return mSound; }
66 };
67 
69 {
70 protected:
73 
74  int mNbCopy;
76  char *mData;
77 
78 public:
79  // Only available for resourceLib and construction
80  ResContinuousSound(int pResourceId);
82 
83  int GetResourceId() const { return mResourceId; }
84  void Serialize(Parcel::ObjStream &pArchive);
85 
86  VideoServices::ContinuousSound *GetSound() const { return mSound; }
87 };
88 
89 } // namespace ObjFacTools
90 } // namespace HoverRace
91 
92 #undef MR_DllDeclare
VideoServices::ContinuousSound * GetSound() const
Definition: ResSound.h:86
HoverRace::VideoServices::ContinuousSound * mSound
Definition: ResSound.h:72
VideoServices::ShortSound * GetSound() const
Definition: ResSound.h:65
char * mData
Definition: ResSound.h:76
MR_UInt32 mDataLen
Definition: ResSound.h:75
char * mData
Definition: ResSound.h:55
VideoServices::ShortSound * mSound
Definition: ResSound.h:51
#define MR_DllDeclare
Definition: ResSound.h:35
int mNbCopy
Definition: ResSound.h:74
Definition: SoundServer.cpp:148
MR_UInt32 mDataLen
Definition: ResSound.h:54
int mResourceId
Definition: ResSound.h:50
Base class for parcel serializers.
Definition: ObjStream.h:58
Definition: SoundServer.cpp:135
int GetResourceId() const
Definition: ResSound.h:83
Definition: Announcement.h:24
uint32_t MR_UInt32
Definition: MR_Types.h:44
int mResourceId
Definition: ResSound.h:71
Definition: ResSound.h:47
int GetResourceId() const
Definition: ResSound.h:62
int mNbCopy
Definition: ResSound.h:53