Fix whitespace in JSInterface_Sound.*
This was SVN commit r21776.
This commit is contained in:
parent
5a34c9e570
commit
067bbb38d6
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2017 Wildfire Games.
|
/* Copyright (C) 2018 Wildfire Games.
|
||||||
* This file is part of 0 A.D.
|
* This file is part of 0 A.D.
|
||||||
*
|
*
|
||||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||||
@ -30,54 +30,54 @@
|
|||||||
|
|
||||||
namespace JSI_Sound
|
namespace JSI_Sound
|
||||||
{
|
{
|
||||||
#if CONFIG2_AUDIO
|
#if CONFIG2_AUDIO
|
||||||
|
|
||||||
void StartMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
void StartMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->SetMusicEnabled(true);
|
sndManager->SetMusicEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StopMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
void StopMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->SetMusicEnabled(false);
|
sndManager->SetMusicEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearPlaylist(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
void ClearPlaylist(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->ClearPlayListItems();
|
sndManager->ClearPlayListItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddPlaylistItem(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& filename)
|
void AddPlaylistItem(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& filename)
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->AddPlayListItem(VfsPath(filename));
|
sndManager->AddPlayListItem(VfsPath(filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartPlaylist(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), bool looping)
|
void StartPlaylist(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), bool looping)
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->StartPlayList( looping );
|
sndManager->StartPlayList(looping );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& filename, bool looping)
|
void PlayMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& filename, bool looping)
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->PlayAsMusic( filename, looping);
|
sndManager->PlayAsMusic(filename, looping);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayUISound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& filename, bool looping)
|
void PlayUISound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& filename, bool looping)
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->PlayAsUI( filename, looping);
|
sndManager->PlayAsUI(filename, looping);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayAmbientSound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& filename, bool looping)
|
void PlayAmbientSound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& filename, bool looping)
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->PlayAsAmbient( filename, looping);
|
sndManager->PlayAsAmbient(filename, looping);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MusicPlaying(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
bool MusicPlaying(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
||||||
@ -87,36 +87,36 @@ namespace JSI_Sound
|
|||||||
|
|
||||||
void SetMasterGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain)
|
void SetMasterGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain)
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->SetMasterGain(gain);
|
sndManager->SetMasterGain(gain);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMusicGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain)
|
void SetMusicGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain)
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->SetMusicGain(gain);
|
sndManager->SetMusicGain(gain);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAmbientGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain)
|
void SetAmbientGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain)
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->SetAmbientGain(gain);
|
sndManager->SetAmbientGain(gain);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetActionGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain)
|
void SetActionGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain)
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->SetActionGain(gain);
|
sndManager->SetActionGain(gain);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetUIGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain)
|
void SetUIGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain)
|
||||||
{
|
{
|
||||||
if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager )
|
if (CSoundManager* sndManager = (CSoundManager*)g_SoundManager)
|
||||||
sndManager->SetUIGain(gain);
|
sndManager->SetUIGain(gain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#else
|
|
||||||
bool MusicPlaying(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){ return false; }
|
bool MusicPlaying(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){ return false; }
|
||||||
void PlayAmbientSound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename), bool UNUSED(looping) ){}
|
void PlayAmbientSound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename), bool UNUSED(looping) ){}
|
||||||
void PlayUISound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename), bool UNUSED(looping) ) {}
|
void PlayUISound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename), bool UNUSED(looping) ) {}
|
||||||
@ -132,8 +132,7 @@ namespace JSI_Sound
|
|||||||
void SetActionGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){}
|
void SetActionGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){}
|
||||||
void SetUIGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){}
|
void SetUIGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void RegisterScriptFunctions(const ScriptInterface& scriptInterface)
|
void RegisterScriptFunctions(const ScriptInterface& scriptInterface)
|
||||||
{
|
{
|
||||||
@ -153,5 +152,3 @@ namespace JSI_Sound
|
|||||||
scriptInterface.RegisterFunction<void, float, &SetUIGain>("SetUIGain");
|
scriptInterface.RegisterFunction<void, float, &SetUIGain>("SetUIGain");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2017 Wildfire Games.
|
/* Copyright (C) 2018 Wildfire Games.
|
||||||
* This file is part of 0 A.D.
|
* This file is part of 0 A.D.
|
||||||
*
|
*
|
||||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||||
|
Loading…
Reference in New Issue
Block a user