Audio
Functions
eax_available
int eax_available()
Obsolete since sfall 2.1a. Always returns 0.
play_sfall_sound
int play_sfall_sound(string file, int mode)
Used to play mp3/wav/wma
files. The path given is relative to the Fallout folder. Specify mode as 1 to loop the file continuously, 2 to replace the current background game music with playing the specified file in loop mode, or 0 to play the file once. If you don’t wish to loop, play_sfall_sound
returns 0. If you do loop, it returns an ID which can be passed back to stop_sfall_sound
when you want to stop the effect. All sounds effects will be stopped on game reload, looping or not. Does not require AllowDShowSound
to be set to 1 in ddraw.ini
.
Starting from sfall 4.2.8/3.8.28, you can pass a value in the mode
argument for a reduced sound volume. To set the volume, You need to convert the number to hexadecimal and use the argument format 0xZZZZ000Y
, where ZZZZ
is the volume reduction value in range from 0 to 32767 (the value 32767 is mute), and Y
is the playback mode.
set_eax_environment
void set_eax_environment(int environment)
Obsolete since sfall 2.1a. Has no effect.
stop_sfall_sound
void stop_sfall_sound(int soundID)
Stops looping mp3/wav/wma
files previously launched by play_sfall_sound
. All sounds effects will be stopped on game reload, looping or not. Does not require AllowDShowSound
to be set to 1 in ddraw.ini
.