____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"
#include "stratagus.h"
#include <stdio.h>
#include "SDL.h"
#include "sound_server.h"
#include "script.h"
Go to the source code of this file.
Defines | |
| #define | SoundFrequency 44100 |
Functions | |
| static void | MusicFinishedCallback (void) |
| void | CheckMusicFinished (bool force) |
| < Check if music is finished and play the next song | |
| void | InitMusic (void) |
| Turn music stopped callback on. | |
Variables | |
| static SDL_mutex * | MusicFinishedMutex |
| Mutex for MusicFinished. | |
| static bool | MusicFinished |
| Music ended and we need a new file. | |
| bool | CallbackMusic |
| flag true callback ccl if stops | |
Definition in file music.cpp.
| void CheckMusicFinished | ( | bool | force | ) |
< Check if music is finished and play the next song
Check if music is finished and play the next song
Definition at line 77 of file music.cpp.
References CallbackMusic, IsMusicEnabled(), Lua, LuaCall(), MusicFinished, MusicFinishedMutex, SoundEnabled(), and StopMusic().
Referenced by EditorMainLoop(), GameMainLoop(), PatchEditorMainLoop(), and UiToggleSound().
| void InitMusic | ( | void | ) |
Turn music stopped callback on.
Init music
Definition at line 101 of file music.cpp.
References MusicFinished, MusicFinishedCallback(), MusicFinishedMutex, and SetMusicFinishedCallback().
Referenced by main1().
| static void MusicFinishedCallback | ( | void | ) | [static] |
Callback for when music has finished Note: we are in the sdl audio thread
Definition at line 67 of file music.cpp.
References MusicFinished, and MusicFinishedMutex.
Referenced by InitMusic().
| bool CallbackMusic |
flag true callback ccl if stops
global range control (max cut off distance for sound)
Definition at line 57 of file music.cpp.
Referenced by CheckMusicFinished().
bool MusicFinished [static] |
Music ended and we need a new file.
Definition at line 55 of file music.cpp.
Referenced by CheckMusicFinished(), InitMusic(), and MusicFinishedCallback().
SDL_mutex* MusicFinishedMutex [static] |
Mutex for MusicFinished.
Definition at line 54 of file music.cpp.
Referenced by CheckMusicFinished(), InitMusic(), and MusicFinishedCallback().
1.5.6