Rename RageMusic to RageSounds.
This commit is contained in:
@@ -55,7 +55,7 @@ RageTexture.cpp RageTexture.h RageTextureManager.cpp RageTextureManager.h RageTh
|
|||||||
RageTimer.cpp RageTimer.h RageTypes.h RageUtil_FileDB.cpp RageUtil_FileDB.h RageUtil.cpp RageUtil.h \
|
RageTimer.cpp RageTimer.h RageTypes.h RageUtil_FileDB.cpp RageUtil_FileDB.h RageUtil.cpp RageUtil.h \
|
||||||
RageUtil_CharConversions.cpp RageUtil_CharConversions.h RageSoundReader_Preload.cpp RageSoundReader_Preload.h \
|
RageUtil_CharConversions.cpp RageUtil_CharConversions.h RageSoundReader_Preload.cpp RageSoundReader_Preload.h \
|
||||||
RageSoundResampler.cpp RageSoundResampler.h RageSoundReader_Resample.cpp RageSoundReader_Resample.h RageSoundReader_FileReader.h \
|
RageSoundResampler.cpp RageSoundResampler.h RageSoundReader_Resample.cpp RageSoundReader_Resample.h RageSoundReader_FileReader.h \
|
||||||
RageMusic.cpp RageMusic.h
|
RageSounds.cpp RageSounds.h
|
||||||
|
|
||||||
DataStructures = \
|
DataStructures = \
|
||||||
CodeDetector.cpp CodeDetector.h Course.cpp Course.h Font.cpp Font.h FontCharAliases.cpp FontCharAliases.h \
|
CodeDetector.cpp CodeDetector.h Course.cpp Course.h Font.cpp Font.h FontCharAliases.cpp FontCharAliases.h \
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
#ifndef RAGE_MUSIC_H
|
|
||||||
|
|
||||||
class RageSound;
|
|
||||||
class RageMusic
|
|
||||||
{
|
|
||||||
RageSound *music;
|
|
||||||
|
|
||||||
public:
|
|
||||||
RageMusic();
|
|
||||||
~RageMusic();
|
|
||||||
|
|
||||||
void Play(CString file, bool force_loop = false, float start_sec = -1, float length_sec = -1, float fade_len = 0);
|
|
||||||
void Stop() { Play(""); }
|
|
||||||
CString GetPath() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern RageMusic *MUSIC;
|
|
||||||
#endif
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageTimer.h"
|
#include "RageTimer.h"
|
||||||
|
|
||||||
#include "RageMusic.h"
|
#include "RageSounds.h"
|
||||||
|
|
||||||
#include "arch/arch.h"
|
#include "arch/arch.h"
|
||||||
#include "arch/Sound/RageSoundDriver.h"
|
#include "arch/Sound/RageSoundDriver.h"
|
||||||
@@ -260,16 +260,16 @@ void RageSoundManager::MixAudio(Sint16 *dst, const Sint16 *src, Uint32 len, floa
|
|||||||
|
|
||||||
void RageSoundManager::PlayMusic(CString file, bool force_loop, float start_sec, float length_sec, float fade_len)
|
void RageSoundManager::PlayMusic(CString file, bool force_loop, float start_sec, float length_sec, float fade_len)
|
||||||
{
|
{
|
||||||
MUSIC->Play(file, force_loop, start_sec, length_sec, fade_len);
|
SOUND->PlayMusic(file, force_loop, start_sec, length_sec, fade_len);
|
||||||
}
|
}
|
||||||
void RageSoundManager::StopMusic()
|
void RageSoundManager::StopMusic()
|
||||||
{
|
{
|
||||||
MUSIC->Stop();
|
SOUND->StopMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
CString RageSoundManager::GetMusicPath() const
|
CString RageSoundManager::GetMusicPath() const
|
||||||
{
|
{
|
||||||
return MUSIC->GetPath();
|
return SOUND->GetMusicPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RageSoundManager::SetPrefs(float MixVol)
|
void RageSoundManager::SetPrefs(float MixVol)
|
||||||
|
|||||||
@@ -1,27 +1,29 @@
|
|||||||
/* This is just a simple wrapper to handle a single music track conveniently. */
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "RageMusic.h"
|
#include "RageSoundManager.h"
|
||||||
|
#include "RageSounds.h"
|
||||||
#include "RageSound.h"
|
#include "RageSound.h"
|
||||||
|
|
||||||
RageMusic *MUSIC = NULL;
|
RageSounds *SOUND = NULL;
|
||||||
|
|
||||||
RageMusic::RageMusic()
|
RageSounds::RageSounds()
|
||||||
{
|
{
|
||||||
|
/* Init RageSoundMan first: */
|
||||||
|
ASSERT( SOUNDMAN );
|
||||||
music = new RageSound;
|
music = new RageSound;
|
||||||
}
|
}
|
||||||
|
|
||||||
RageMusic::~RageMusic()
|
RageSounds::~RageSounds()
|
||||||
{
|
{
|
||||||
delete music;
|
delete music;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CString RageMusic::GetPath() const
|
CString RageSounds::GetMusicPath() const
|
||||||
{
|
{
|
||||||
return music->GetLoadedFilePath();
|
return music->GetLoadedFilePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RageMusic::Play(CString file, bool force_loop, float start_sec, float length_sec, float fade_len)
|
void RageSounds::PlayMusic(CString file, bool force_loop, float start_sec, float length_sec, float fade_len)
|
||||||
{
|
{
|
||||||
// LOG->Trace("play '%s' (current '%s')", file.c_str(), music->GetLoadedFilePath().c_str());
|
// LOG->Trace("play '%s' (current '%s')", file.c_str(), music->GetLoadedFilePath().c_str());
|
||||||
if(music->IsPlaying())
|
if(music->IsPlaying())
|
||||||
@@ -58,6 +60,16 @@ void RageMusic::Play(CString file, bool force_loop, float start_sec, float lengt
|
|||||||
music->StartPlaying();
|
music->StartPlaying();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RageSounds::PlayOnce( CString sPath )
|
||||||
|
{
|
||||||
|
SOUNDMAN->PlayOnce( sPath );
|
||||||
|
}
|
||||||
|
|
||||||
|
void RageSounds::PlayOnceFromDir( CString PlayOnceFromDir )
|
||||||
|
{
|
||||||
|
SOUNDMAN->PlayOnceFromDir( PlayOnceFromDir );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
Copyright (c) 2002-2003 by the person(s) listed below. All rights reserved.
|
Copyright (c) 2002-2003 by the person(s) listed below. All rights reserved.
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#ifndef RAGE_MUSIC_H
|
||||||
|
|
||||||
|
/* This contains all of the generally useful user-level SOUNDMAN calls, as well
|
||||||
|
* as some other simple helper stuff. Don't include RageSoundManager for normal
|
||||||
|
* use; it's only for drivers and sound code. This file should be very lightweight. */
|
||||||
|
*/
|
||||||
|
class RageSound;
|
||||||
|
class RageSounds
|
||||||
|
{
|
||||||
|
RageSound *music;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RageSounds();
|
||||||
|
~RageSounds();
|
||||||
|
|
||||||
|
void PlayMusic(CString file, bool force_loop = false, float start_sec = -1, float length_sec = -1, float fade_len = 0);
|
||||||
|
void StopMusic() { PlayMusic(""); }
|
||||||
|
CString GetMusicPath() const;
|
||||||
|
|
||||||
|
void PlayOnce( CString sPath );
|
||||||
|
void PlayOnceFromDir( CString sDir );
|
||||||
|
};
|
||||||
|
|
||||||
|
extern RageSounds *SOUND;
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Copyright (c) 2002-2003 by the person(s) listed below. All rights reserved.
|
||||||
|
Glenn Maynard
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageTextureManager.h"
|
#include "RageTextureManager.h"
|
||||||
#include "RageSoundManager.h"
|
#include "RageSoundManager.h"
|
||||||
#include "RageMusic.h"
|
#include "RageSounds.h"
|
||||||
#include "RageInput.h"
|
#include "RageInput.h"
|
||||||
#include "RageTimer.h"
|
#include "RageTimer.h"
|
||||||
#include "RageException.h"
|
#include "RageException.h"
|
||||||
@@ -486,7 +486,7 @@ int main(int argc, char* argv[])
|
|||||||
NOTESKIN = new NoteSkinManager;
|
NOTESKIN = new NoteSkinManager;
|
||||||
SOUNDMAN = new RageSoundManager(PREFSMAN->m_sSoundDrivers);
|
SOUNDMAN = new RageSoundManager(PREFSMAN->m_sSoundDrivers);
|
||||||
SOUNDMAN->SetPrefs(PREFSMAN->m_fSoundVolume);
|
SOUNDMAN->SetPrefs(PREFSMAN->m_fSoundVolume);
|
||||||
MUSIC = new RageMusic;
|
SOUND = new RageSounds;
|
||||||
ANNOUNCER = new AnnouncerManager;
|
ANNOUNCER = new AnnouncerManager;
|
||||||
INPUTFILTER = new InputFilter;
|
INPUTFILTER = new InputFilter;
|
||||||
INPUTMAPPER = new InputMapper;
|
INPUTMAPPER = new InputMapper;
|
||||||
@@ -572,7 +572,7 @@ int main(int argc, char* argv[])
|
|||||||
SAFE_DELETE( NOTESKIN );
|
SAFE_DELETE( NOTESKIN );
|
||||||
SAFE_DELETE( THEME );
|
SAFE_DELETE( THEME );
|
||||||
SAFE_DELETE( ANNOUNCER );
|
SAFE_DELETE( ANNOUNCER );
|
||||||
SAFE_DELETE( MUSIC );
|
SAFE_DELETE( SOUND );
|
||||||
SAFE_DELETE( SOUNDMAN );
|
SAFE_DELETE( SOUNDMAN );
|
||||||
SAFE_DELETE( FONT );
|
SAFE_DELETE( FONT );
|
||||||
SAFE_DELETE( TEXTUREMAN );
|
SAFE_DELETE( TEXTUREMAN );
|
||||||
|
|||||||
@@ -543,7 +543,7 @@ SOURCE=.\RageMath.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\RageMusic.cpp
|
SOURCE=.\RageSounds.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "StepMania - Win32 Debug"
|
!IF "$(CFG)" == "StepMania - Win32 Debug"
|
||||||
|
|
||||||
@@ -558,7 +558,7 @@ SOURCE=.\RageMusic.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\RageMusic.h
|
SOURCE=.\RageSounds.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
|||||||
@@ -1527,12 +1527,6 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
|||||||
<File
|
<File
|
||||||
RelativePath="RageMath.h">
|
RelativePath="RageMath.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="RageMusic.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="RageMusic.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="RageSound.cpp">
|
RelativePath="RageSound.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -1575,6 +1569,12 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
|||||||
<File
|
<File
|
||||||
RelativePath="RageSoundResampler.h">
|
RelativePath="RageSoundResampler.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="RageSounds.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="RageSounds.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\RageTexture.cpp">
|
RelativePath=".\RageTexture.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
Reference in New Issue
Block a user