mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- fixed mus_device CVar and reenabled WinMM device.
This commit is contained in:
parent
9648c026a9
commit
e8cf6c3d32
4 changed files with 37 additions and 4 deletions
|
@ -712,6 +712,7 @@ set (PCH_SOURCES
|
||||||
audiolib/src/driver_adlib.cpp
|
audiolib/src/driver_adlib.cpp
|
||||||
audiolib/src/driver_nosound.cpp
|
audiolib/src/driver_nosound.cpp
|
||||||
audiolib/src/driver_sdl.cpp
|
audiolib/src/driver_sdl.cpp
|
||||||
|
audiolib/src/driver_winmm.cpp
|
||||||
audiolib/src/flac.cpp
|
audiolib/src/flac.cpp
|
||||||
audiolib/src/formats.cpp
|
audiolib/src/formats.cpp
|
||||||
audiolib/src/fx_man.cpp
|
audiolib/src/fx_man.cpp
|
||||||
|
|
33
source/audiolib/src/driver_winmm.h
Normal file
33
source/audiolib/src/driver_winmm.h
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
Copyright (C) 2009 Jonathon Fowler <jf@jonof.id.au>
|
||||||
|
|
||||||
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "midifuncs.h"
|
||||||
|
|
||||||
|
int WinMMDrv_GetError(void);
|
||||||
|
const char *WinMMDrv_ErrorString( int ErrorNumber );
|
||||||
|
|
||||||
|
int WinMMDrv_MIDI_Init(midifuncs *);
|
||||||
|
void WinMMDrv_MIDI_Shutdown(void);
|
||||||
|
int WinMMDrv_MIDI_StartPlayback(void (*service)(void));
|
||||||
|
void WinMMDrv_MIDI_HaltPlayback(void);
|
||||||
|
void WinMMDrv_MIDI_SetTempo(int tempo, int division);
|
||||||
|
void WinMMDrv_MIDI_Lock(void);
|
||||||
|
void WinMMDrv_MIDI_Unlock(void);
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# include "driver_directsound.h"
|
# include "driver_directsound.h"
|
||||||
|
# include "driver_winmm.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ASS_PCMSoundDriver = ASS_AutoDetect;
|
int ASS_PCMSoundDriver = ASS_AutoDetect;
|
||||||
|
@ -139,7 +140,6 @@ static struct {
|
||||||
nullptr,
|
nullptr,
|
||||||
},
|
},
|
||||||
|
|
||||||
#if 0
|
|
||||||
// Windows MultiMedia system
|
// Windows MultiMedia system
|
||||||
{
|
{
|
||||||
"WinMM",
|
"WinMM",
|
||||||
|
@ -160,7 +160,6 @@ static struct {
|
||||||
UNSUPPORTED_COMPLETELY
|
UNSUPPORTED_COMPLETELY
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -154,12 +154,12 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus
|
||||||
if (self > 255) self = 255;
|
if (self > 255) self = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MusicDevice = 1;
|
int MusicDevice = ASS_WinMM;
|
||||||
CUSTOM_CVARD(Int, mus_device, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "selects music device")
|
CUSTOM_CVARD(Int, mus_device, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "selects music device")
|
||||||
{
|
{
|
||||||
if (self < 0) self = 0;
|
if (self < 0) self = 0;
|
||||||
else if (self > 1) self = 1;
|
else if (self > 1) self = 1;
|
||||||
else MusicDevice = self; // must be copied because it gets altered by the music code.
|
else MusicDevice = self? ASS_WinMM : ASS_OPL3; // must be copied because it gets altered by the music code.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue