Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <music.h>
Public Types | |
enum | Playlist { NOLIST =-1, BATTLELIST =0, PEACELIST, PANICLIST, VICTORYLIST, LOSSLIST, MAXLIST } |
Public Member Functions | |
Music (Unit *parent=NULL) | |
void | Listen () |
~Music () | |
void | SetParent (Unit *parent) |
void | GotoSong (int whichlist, int whichsong, bool skip, int layer=-1) |
Music () | |
bool | Load (const char *file) |
bool | Play (float fadeout, float fadein, Music &oldmusic) |
void | Stop () |
void | Free () |
void | SetVolume (float vol) |
Music () | |
bool | Load (const char *file) |
bool | Play (float fadeout, float fadein, Music &oldmusic) |
void | Stop () |
void | Free () |
void | SetVolume (float vol) |
void | SetMasterVolume (float vol) |
Static Public Member Functions | |
static int | Addlist (std::string listfile) |
static void | SetLoops (int numloops, int layer=-1) |
static void | ChangeVolume (float inc=0, int layer=-1) |
static void | Skip (int layer=-1) |
static void | Stop (int layer=-1) |
static void | SkipRandSong (int whichlist, int layer=-1) |
static void | SkipRandList (int layer=-1) |
static void | GotoSong (std::string mus, int layer=-1) |
static void | InitMuzak () |
static void | CleanupMuzak () |
static void | MuzakCycle () |
static void | SetVolume (float vol, int layer=-1, bool hardware=false, float latency_override=-1) |
static void | Mute (bool mute=true, int layer=-1) |
Public Attributes | |
int | loopsleft |
std::vector< int > | sounds_to_stop |
Mix_Music * | m |
Friends | |
void * | Muzak::readerThread (void *input) |
enum Music::Playlist |
Music::Music | ( | Unit * | parent = NULL ) |
ERRORCHECK_MUTEX
_WIN32 USE_SOUNDSERVER
Definition at line 64 of file music.cpp.
References checkerr, VSFileSystem::datadir, fclose, fNET_startup(), fNET_Write(), fopen, g_game, Unit::GetHull(), VegaConfig::getVariable(), i, INET_ConnectTo(), INET_startup(), INET_Write(), loopsleft, MAXLIST, game_data_t::music_enabled, XMLSupport::parse_float(), PEACELIST, VsnetOSS::socket(), soundServerPipes(), TRUE, vs_config, and VSFileSystem::vs_fprintf().
Music::~Music | ( | ) |
Definition at line 813 of file music.cpp.
References checkerr, fNET_cleanup(), fNET_close(), fNET_Write(), INET_cleanup(), INET_close(), INET_Write(), micro_sleep, and soundServerPipes().
|
inline |
Definition at line 104 of file soundserver.mac.notworking.cpp.
References m.
|
inline |
|
static |
Definition at line 767 of file music.cpp.
References g_game, i, game_data_t::music_enabled, and muzak_count.
Referenced by FactionUtil::LoadFactionPlaylists(), and UniverseUtil::musicAddList().
Definition at line 236 of file music.cpp.
References g_game, i, game_data_t::music_enabled, and muzak_count.
Referenced by decmusicvol(), incmusicvol(), VolDown(), and VolUp().
|
static |
|
inline |
Definition at line 133 of file soundserver.mac.notworking.cpp.
References m.
Referenced by ForkedProcess().
|
inline |
Definition at line 173 of file soundserver.segfault.cpp.
References m.
Definition at line 679 of file music.cpp.
References g_game, VegaConfig::getVariable(), int, game_data_t::music_enabled, muzak_count, NOLIST, XMLSupport::parse_bool(), size, and vs_config.
Referenced by bootstrap_first_loop(), UniverseUtil::musicLayerPlaySong(), BaseComputer::newsPickerChangedSelection(), and UniverseUtil::playVictoryTune().
|
static |
Definition at line 610 of file music.cpp.
References g_game, VegaConfig::getVariable(), game_data_t::music_enabled, muzak_count, muzak_cross_index, XMLSupport::parse_bool(), and vs_config.
|
static |
Definition at line 867 of file music.cpp.
References VegaConfig::getVariable(), muzak_count, XMLSupport::parse_int(), and vs_config.
Referenced by main().
void Music::Listen | ( | ) |
Definition at line 511 of file music.cpp.
References AUDBufferSound(), AUDDeleteSound(), AUDIsPlaying(), AUDSoundGain(), AUDStartPlaying(), AUDStreamingSound(), checkerr, fprintf, g_game, INET_BytesToRead(), INET_fgetc(), game_data_t::music_enabled, muzak_cross_index, Muzak::readerThread(), and soundServerPipes().
Referenced by MuzakCycle().
|
inline |
Definition at line 108 of file soundserver.mac.notworking.cpp.
References m.
Referenced by ForkedProcess(), and PlayMusic().
|
inline |
Definition at line 977 of file music.cpp.
References g_game, VegaConfig::getVariable(), i, game_data_t::music_enabled, muzak_count, XMLSupport::parse_float(), and vs_config.
Referenced by UniverseUtil::musicMute().
|
static |
Definition at line 886 of file music.cpp.
References BaseInterface::CurrentBase, i, Listen(), and muzak_count.
Referenced by base_main_loop(), bootstrap_draw(), gamemenu_draw(), and main_loop().
Definition at line 113 of file soundserver.mac.notworking.cpp.
References i, m, micro_sleep, and SetVolume().
Referenced by ForkedProcess(), and PlayMusic().
Definition at line 153 of file soundserver.segfault.cpp.
References i, m, micro_sleep, and SetVolume().
Definition at line 1010 of file music.cpp.
References g_game, loopsleft, game_data_t::music_enabled, and muzak_count.
Referenced by UniverseUtil::musicLayerLoopList().
|
inline |
Definition at line 182 of file soundserver.segfault.cpp.
References SetVolume().
Referenced by main().
void Music::SetParent | ( | Unit * | parent) |
|
static |
Definition at line 966 of file music.cpp.
References i, and muzak_count.
Referenced by main(), UniverseUtil::musicLayerSetHardVolume(), UniverseUtil::musicLayerSetSoftVolume(), Play(), and SetMasterVolume().
|
inline |
Definition at line 137 of file soundserver.mac.notworking.cpp.
References GetMaxVolume(), and m.
|
inline |
Definition at line 177 of file soundserver.segfault.cpp.
References GetMaxVolume(), and m.
|
static |
Definition at line 790 of file music.cpp.
References g_game, game_data_t::music_enabled, muzak_count, and muzak_cross_index.
Referenced by UniverseUtil::musicLayerSkip(), CockpitKeys::SkipMusicTrack(), BaseComputer::switchToControls(), and BaseComputer::~BaseComputer().
|
static |
Definition at line 739 of file music.cpp.
References g_game, game_data_t::music_enabled, muzak_count, and muzak_cross_index.
Definition at line 705 of file music.cpp.
References muzak_count, and muzak_cross_index.
Referenced by GameUnit< UnitType >::Explode(), and UniverseUtil::musicLayerPlayList().
|
static |
Definition at line 901 of file music.cpp.
References muzak_count, and muzak_cross_index.
Referenced by ForkedProcess(), and UniverseUtil::musicLayerStop().
|
inline |
Definition at line 129 of file soundserver.mac.notworking.cpp.
References m.
Referenced by BaseUtil::SetDJEnabled().
|
inline |
Definition at line 169 of file soundserver.segfault.cpp.
References m.
|
friend |
int Music::loopsleft |
Definition at line 89 of file music.h.
Referenced by Music(), and SetLoops().
Mix_Music * Music::m |
Definition at line 103 of file soundserver.mac.notworking.cpp.
Referenced by ForkedProcess(), Free(), Load(), main(), Music(), Play(), PlayMusic(), SetVolume(), and Stop().