17 #include "precompiled.h"
37 sndManager->SetMusicEnabled(
true);
43 sndManager->SetMusicEnabled(
false);
49 sndManager->ClearPlayListItems();
55 sndManager->AddPlayListItem(
VfsPath(filename));
61 sndManager->StartPlayList( looping );
67 sndManager->PlayAsMusic( filename, looping);
73 sndManager->PlayAsUI( filename, looping);
79 sndManager->PlayAsAmbient( filename, looping);
105 scriptInterface.RegisterFunction<void, &
StartMusic>(
"StartMusic");
106 scriptInterface.RegisterFunction<void, &
StopMusic>(
"StopMusic");
107 scriptInterface.RegisterFunction<void, &
ClearPlaylist>(
"ClearPlaylist");
108 scriptInterface.RegisterFunction<void, std::wstring, &
AddPlaylistItem>(
"AddPlaylistItem");
109 scriptInterface.RegisterFunction<void, bool, &
StartPlaylist>(
"StartPlaylist");
110 scriptInterface.RegisterFunction<void, std::wstring, bool, &
PlayMusic>(
"PlayMusic");
111 scriptInterface.RegisterFunction<void, std::wstring, bool, &
PlayUISound>(
"PlayUISound");
112 scriptInterface.RegisterFunction<void, std::wstring, bool, &
PlayAmbientSound>(
"PlayAmbientSound");
113 scriptInterface.RegisterFunction<bool, &
MusicPlaying>(
"MusicPlaying");
void PlayMusic(void *cbdata, std::wstring filename, bool looping)
void ClearPlaylist(void *cbdata)
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
Path VfsPath
VFS path of the form "(dir/)*file?".
ISoundManager * g_SoundManager
void PlayUISound(void *cbdata, std::wstring filename, bool looping)
void StartPlaylist(void *cbdata, bool looping)
void StopMusic(void *cbdata)
void StartMusic(void *cbdata)
void PlayAmbientSound(void *cbdata, std::wstring filename, bool looping)
void AddPlaylistItem(void *cbdata, std::wstring filename)
void RegisterScriptFunctions(ScriptInterface &scriptInterface)
Abstraction around a SpiderMonkey JSContext.
bool MusicPlaying(void *cbdata)