HoverRace  2.0
SoundServer.h
Go to the documentation of this file.
1 
2 // SoundServer.h
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 <string>
26 
27 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
28 # ifdef MR_ENGINE
29 # define MR_DllDeclare __declspec( dllexport )
30 # else
31 # define MR_DllDeclare __declspec( dllimport )
32 # endif
33 #else
34 # define MR_DllDeclare
35 #endif
36 
37 namespace HoverRace {
38 namespace VideoServices {
39 
40 class ShortSound;
41 class ContinuousSound;
42 
43 namespace SoundServer {
44 
45 MR_DllDeclare bool Init();
46 MR_DllDeclare void Close();
47 
49 MR_DllDeclare const std::string &GetInitError();
50 
51 MR_DllDeclare ShortSound *CreateShortSound(const char *pData, int pNbCopy);
53 
54 MR_DllDeclare void Play(ShortSound * pSound, int pDB = 0, double pSpeed = 1.0, int pPan = 0);
55 
56 // Continous play
57 MR_DllDeclare ContinuousSound *CreateContinuousSound(const char *pData, int pNbCopy);
59 
60 MR_DllDeclare void Play(ContinuousSound * pSound, int pCopy, int pDB = 0, double pSpeed = 1.0, int pPan = 0);
61 
63 
64 } // namespace SoundServer
65 
66 } // namespace VideoServices
67 } // namespace HoverRace
68 
69 #undef MR_DllDeclare
MR_DllDeclare void Play(ShortSound *pSound, int pDB=0, double pSpeed=1.0, int pPan=0)
Definition: SoundServer.cpp:609
MR_DllDeclare void DeleteShortSound(ShortSound *pSound)
Definition: SoundServer.cpp:604
#define MR_DllDeclare
Definition: SoundServer.h:34
MR_DllDeclare ShortSound * CreateShortSound(const char *pData, int pNbCopy)
Definition: SoundServer.cpp:594
MR_DllDeclare ContinuousSound * CreateContinuousSound(const char *pData, int pNbCopy)
Definition: SoundServer.cpp:616
MR_DllDeclare void Close()
Definition: SoundServer.cpp:559
Definition: SoundServer.cpp:148
MR_DllDeclare const std::string & GetInitError()
Retrieve the error message from the initialization.
Definition: SoundServer.cpp:589
MR_DllDeclare bool Init()
Definition: SoundServer.cpp:513
Definition: SoundServer.cpp:135
Definition: SoundServer.h:43
MR_DllDeclare void DeleteContinuousSound(ContinuousSound *pSound)
Definition: SoundServer.cpp:626
MR_DllDeclare bool IsDisabled()
Determine if the sound is currently disabled.
Definition: SoundServer.cpp:579
Definition: Announcement.h:24
MR_DllDeclare void ApplyContinuousPlay()
Definition: SoundServer.cpp:638