diff options
| author | wyatt8740 <wyatt8740@users.noreply.github.com> | 2023-10-01 23:53:17 -0400 |
|---|---|---|
| committer | wyatt8740 <wyatt8740@users.noreply.github.com> | 2023-10-02 00:00:01 -0400 |
| commit | 72d9253ab2e5e0630c824c7130a40b7158323bc9 (patch) | |
| tree | fc12bd36b3eb63ef6aeae213018d4f89981a08f4 /QW/client/snd_dma.c | |
| parent | 68254ebe0411236d178ead073d5c176faae732a1 (diff) | |
| download | quake-pum-72d9253ab2e5e0630c824c7130a40b7158323bc9.tar.gz | |
Got X11 QuakeWorld to build (no GLQuakeWorld yet!).
Added support for 24-bit color depth (ripped out of WinQuake, which appears
to have a newer version of vid_x.c).
Also, added SDL audio code (almost directly translated from WinQuake/netquake code).
Diffstat (limited to 'QW/client/snd_dma.c')
| -rw-r--r-- | QW/client/snd_dma.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/QW/client/snd_dma.c b/QW/client/snd_dma.c index 4168315..8554836 100644 --- a/QW/client/snd_dma.c +++ b/QW/client/snd_dma.c @@ -77,6 +77,11 @@ cvar_t volume = {"volume", "0.7", true}; cvar_t nosound = {"nosound", "0"}; cvar_t precache = {"precache", "1"}; cvar_t loadas8bit = {"loadas8bit", "0"}; +/* for sdl */ +#if defined(USE_SDL2) +cvar_t sndspeed = {"sndspeed", "11025", CVAR_NONE}; +cvar_t snd_mixspeed = {"snd_mixspeed", "44100", CVAR_NONE}; +#endif cvar_t bgmbuffer = {"bgmbuffer", "4096"}; cvar_t ambient_level = {"ambient_level", "0.3"}; cvar_t ambient_fade = {"ambient_fade", "100"}; @@ -146,8 +151,13 @@ void S_Startup (void) if (!fakedma) { +#if defined(USE_SDL2) + /* Since I borrowed a lot of the SDL2 code from Quakespasm, I + found this to be the easiest way to retrofit it: */ + rc = SNDDMA_Init(&sn); +#else rc = SNDDMA_Init(); - +#endif if (!rc) { #ifndef _WIN32 |
