#include "system.h"#include "defs.h"#include "struct.h"#include "global.h"#include "proto.h"Go to the source code of this file.
Defines | |
| #define | MAX_SOUNDS_IN_DYNAMIC_WAV_CACHE 100 |
| #define | ALL_MOD_MUSICS 1 |
| #define | MAX_SOUND_CHANNELS 5000 |
Functions | |
| void | play_sample_using_WAV_cache (char *SoundSampleFileName, int With_Waiting, int no_double_catching) |
| void | remove_all_samples_from_WAV_cache (void) |
| void | LoadAndFadeInBackgroundMusic (void) |
| #define MAX_SOUNDS_IN_DYNAMIC_WAV_CACHE 100 |
| void LoadAndFadeInBackgroundMusic | ( | void | ) |
============================================ MUSIC ============================================ This function is intended to provide a convenient way of switching between different backround sounds in freedroid. If no background sound was yet running, the function should start playing the given background music. If some background sound was already playing, the function should shut down the old background music and start playing the new one.
Definition at line 283 of file sound.c.
References configuration_for_freedroid_s::Current_BG_Music_Volume, DebugPrintf(), find_file(), GameConfig, Loaded_MOD_Files, NewMusicTargetFileName, NULL, SILENCE, SOUND_DIR, and sound_on.
Referenced by OldMusicHasFinishedFadingOut(), and SwitchBackgroundMusicTo().
| void play_sample_using_WAV_cache | ( | char * | SoundSampleFileName, | |
| int | With_Waiting, | |||
| int | no_double_catching | |||
| ) |
| void remove_all_samples_from_WAV_cache | ( | void | ) |
When the sound sample volume is changed via the in-game controls, we need to re-sample everything, which is done only upon loading of the sound samples. Instead of RE-MIXING SOUND SAMPLES AGAIN AND AGAIN to adapt the sound sample volume to the users needs, we will just clear out the current wav file cache, so that when needed again, the sound files will be loaded again and then automatically re-sampled to proper volume from the play/load function itself. Perfect solution.
Definition at line 872 of file sound.c.
References DebugPrintf(), dynamic_WAV_cache, i, next_free_position_in_cache, and sound_names_in_dynamic_wav_chache.
Referenced by SetSoundFXVolume().
1.5.5