mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-14 00:50:38 +00:00
64e52ea80c
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@383 af15c1b1-3010-417e-b628-4374ebc0bcbd
71 lines
1.5 KiB
C
71 lines
1.5 KiB
C
/*
|
|
* Background music handling for Quakespasm
|
|
* Handle cases when we are configured for no sound and no midi driver,
|
|
* nada...
|
|
*
|
|
* Copyright (C) 1999-2005 Id Software, Inc.
|
|
* Copyright (C) 2010 O.Sezer <sezero@users.sourceforge.net>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or (at
|
|
* your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
*
|
|
* See the GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*
|
|
*/
|
|
|
|
#include "quakedef.h"
|
|
#include "bgmusic.h"
|
|
|
|
qboolean bgmloop = true;
|
|
|
|
static float old_volume = -1.0f;
|
|
|
|
qboolean BGM_Init (void)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void BGM_Play (const char *filename)
|
|
{
|
|
}
|
|
|
|
void BGM_PlayCDtrack (byte track, qboolean looping)
|
|
{
|
|
bgmloop = looping;
|
|
CDAudio_Play(track, looping);
|
|
}
|
|
|
|
void BGM_Stop (void)
|
|
{
|
|
}
|
|
|
|
void BGM_Pause (void)
|
|
{
|
|
}
|
|
|
|
void BGM_Resume (void)
|
|
{
|
|
}
|
|
|
|
void BGM_Update (void)
|
|
{
|
|
if (old_volume != bgmvolume.value)
|
|
{
|
|
if (bgmvolume.value < 0)
|
|
Cvar_Set ("bgmvolume", "0");
|
|
else if (bgmvolume.value > 1)
|
|
Cvar_Set ("bgmvolume", "1");
|
|
old_volume = bgmvolume.value;
|
|
}
|
|
}
|
|
|