mirror of
https://github.com/UberGames/ioef.git
synced 2024-12-02 17:12:16 +00:00
parent
5079343ecd
commit
d47be89f0a
1 changed files with 2 additions and 6 deletions
|
@ -1353,17 +1353,13 @@ void S_UpdateBackgroundTrack( void ) {
|
||||||
byte raw[30000]; // just enough to fit in a mac stack frame
|
byte raw[30000]; // just enough to fit in a mac stack frame
|
||||||
int fileBytes;
|
int fileBytes;
|
||||||
int r;
|
int r;
|
||||||
static float musicVolume = 0.5f;
|
|
||||||
|
|
||||||
if(!s_backgroundStream) {
|
if(!s_backgroundStream) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// graeme see if this is OK
|
|
||||||
musicVolume = (musicVolume + (s_musicVolume->value * 2))/4.0f;
|
|
||||||
|
|
||||||
// don't bother playing anything if musicvolume is 0
|
// don't bother playing anything if musicvolume is 0
|
||||||
if ( musicVolume <= 0 ) {
|
if ( s_musicVolume->value <= 0 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1397,7 +1393,7 @@ void S_UpdateBackgroundTrack( void ) {
|
||||||
{
|
{
|
||||||
// add to raw buffer
|
// add to raw buffer
|
||||||
S_Base_RawSamples( 0, fileSamples, s_backgroundStream->info.rate,
|
S_Base_RawSamples( 0, fileSamples, s_backgroundStream->info.rate,
|
||||||
s_backgroundStream->info.width, s_backgroundStream->info.channels, raw, musicVolume );
|
s_backgroundStream->info.width, s_backgroundStream->info.channels, raw, s_musicVolume->value );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue