00001
00002
00003
#ifndef RAGE_SOUNDS_H
00004
#define RAGE_SOUNDS_H
00005
00006
#include "PlayerNumber.h"
00007
00008
class TimingData;
00009
class RageSound;
00010
struct RageSoundParams;
00011 class GameSoundManager
00012 {
00013
public:
00014
GameSoundManager();
00015
~GameSoundManager();
00016
void Update(
float fDeltaTime );
00017
00018 void PlayMusic(
const CString &file,
bool force_loop =
false,
float start_sec = 0,
float length_sec = -1,
float fade_len = 0,
bool align_beat =
true ) { PlayMusic( file,
"", force_loop, start_sec, length_sec, fade_len, align_beat ); }
00019
void PlayMusic(
const CString &file,
const CString &timing_file,
bool force_loop =
false,
float start_sec = 0,
float length_sec = -1,
float fade_len = 0,
bool align_beat =
true );
00020
void PlayMusic(
const CString &file,
TimingData *pTiming,
bool force_loop =
false,
float start_sec = 0,
float length_sec = -1,
float fade_len = 0,
bool align_beat =
true );
00021 void StopMusic() { PlayMusic(
""); }
00022
CString GetMusicPath() const;
00023
void Flush();
00024
00025
void PlayOnce( CString sPath );
00026
void PlayOnceFromDir( CString sDir );
00027
void PlayOnceFromAnnouncer( CString sFolderName );
00028
00029
float GetPlayLatency() const;
00030
void HandleSongTimer(
bool on=true );
00031
float GetFrameTimingAdjustment(
float fDeltaTime );
00032
00033 static
void SetPlayerBalance( PlayerNumber pn,
RageSoundParams ¶ms );
00034 };
00035
00036 extern
GameSoundManager *SOUND;
00037 #endif
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063