Commit graph

441 commits

Author SHA1 Message Date
smallmodel
f67a7c6621
List available devices and use Generic Software if Generic Hardware is the default 2024-08-22 13:30:04 +02:00
smallmodel
4839a2026b
Fix string casting 2024-08-22 12:43:18 +02:00
smallmodel
219dbbb5b7
Open the default device by passing in the default device name instead of NULL 2024-08-22 12:39:14 +02:00
smallmodel
13911b051a
Use OpenAL by default 2024-08-21 18:35:06 +02:00
smallmodel
a399fdf6cf
Removed useless comments 2024-08-17 21:07:25 +02:00
smallmodel
783c24d6f7
Fix sound never playing from entities that are not sent to clients 2024-08-17 17:24:17 +02:00
smallmodel
1254146223
Fix streamed sound stopping before end 2024-08-17 11:09:35 +02:00
smallmodel
f776d842d1
Don't load sound immediately if they must be streamed
This removes more hiccups
2024-08-14 19:08:20 +02:00
smallmodel
deb18c53b7
Implement streaming support for OpenAL
See #333, and #324
2024-08-12 20:26:17 +02:00
smallmodel
eb04e26823
Use the new libmad version as it seems stable enough 2024-08-09 20:33:59 +02:00
smallmodel
3af24ee0ea
Exclude new sound CPP files directly when not using the new sound system instead of using #ifdef 2024-08-09 20:30:35 +02:00
smallmodel
cd6ec5e3a7
Fix streamed sound, use 2D instead with properly implemented panning 2024-08-06 18:43:15 +02:00
smallmodel
64f4f59165
Fix vid_restart and snd_restart resetting the sound system (experimental sound system only)
This fixes #335 where one of those commands would clear all active sounds as well as the triggered music, and the soundtrack
2024-08-05 19:21:38 +02:00
smallmodel
192f9ac514
Added S_CurrentSoundtrack() 2024-08-05 19:14:30 +02:00
smallmodel
279b1413ec
Clear the active music when stopping the triggered music 2024-08-05 19:09:29 +02:00
smallmodel
9c5297882c
Renamed CHANNEL_FLAG_PLAYABLE to CHANNEL_FLAG_PLAY_DEFERRED 2024-08-05 18:49:41 +02:00
smallmodel
a6d508d791
Fix sounds replaying when unpausing
This caused some sounds to play again when saving
2024-08-05 18:49:16 +02:00
smallmodel
f8b97405ff
Fix infinite loop in DownSampleWav when s_khz is less than 44 kHz
This fixes #330 where `s_khz` below 44 (the usual sample rate of mohaa wav files) would cause an infinite loop due to improper usage of the `ii` variable in the loop where another variable would be accidentally incremented instead
2024-07-30 20:59:48 +02:00
smallmodel
c7a4e705cb
Fix libmad still producing shared libraries 2024-07-28 18:51:15 +02:00
smallmodel
bf4780bbdb
From now, load streamed sound into memory as deferred loading is currently unsupported 2024-07-25 19:49:34 +02:00
smallmodel
5af8e127f8
Added NULL sound flag 2024-07-25 19:04:08 +02:00
smallmodel
016e062fef
Fix UIReggedMaterial::ReregisterMaterial and UIReggedMaterial::GetMaterial
ReregisterMaterial() must register the material if it was registered before, and GetMaterial() must register the material if it hasn't been registered and return it
2024-07-24 21:10:46 +02:00
smallmodel
c093122764
Made code C++ compatible so UI_LoadResource() can be used 2024-07-24 20:07:22 +02:00
smallmodel
11ec6270da
Made OpenAL package required 2024-07-24 19:57:22 +02:00
smallmodel
c5ef60040a
Fix sounds not being resumed properly after loading from save 2024-07-22 20:44:00 +02:00
smallmodel
757b4849f8
Add a fix to load the music from save
This commit implements code to get/set sample offset in an OpenAL channel and saves the music filename/offset into the file. This only works by using the experimental sound system, so it partially fixes #327
2024-07-22 20:13:03 +02:00
smallmodel
2198bdec21
Added stub variables and functions for loading 2024-07-22 19:15:52 +02:00
smallmodel
8bd377ce85
Fix the save system taking a screenshot of the whole UI menu instead of just the 3D view
This fixes #328 where the save would have a screenshot of the save menu
2024-07-22 19:00:50 +02:00
smallmodel
93cd470659
Fix broken cgame state saving 2024-07-15 23:44:11 +02:00
smallmodel
eac8580f64
Add libmad 0.16.4
This new version introduces patches against crashes and exploits. CMake is also fully supported and platforms are properly detected so architecture specific optimizations are used.

To use it, USE_SOUND_NEW must be non-zero when configuring the project
2024-07-11 23:04:04 +02:00
smallmodel
5816391e9b
Fixes loopsound not properly working (not playing, or not being 3D) 2024-07-02 20:25:08 +02:00
smallmodel
543c00037a
Implements sample playback rate 2024-07-02 20:10:54 +02:00
smallmodel
d5f435ee90
Makes loops work as they should 2024-07-02 20:01:01 +02:00
smallmodel
02e2e92d36
Uses linear sound distance model 2024-07-02 19:30:29 +02:00
smallmodel
14927df9fa
Moves MAX_SUBTITLES to `q_shared.h| 2024-07-02 19:03:27 +02:00
smallmodel
a0d3333ebb
Fixes chan->bufferdata not being set to NULL when released 2024-07-02 18:45:51 +02:00
smallmodel
9615fafc1e
Fixes incorrect usage of DotProduct result in an integer 2024-07-01 19:03:21 +02:00
smallmodel
5fc2425f3a
Set the mindist/maxdist for 3D sounds 2024-07-01 18:52:04 +02:00
smallmodel
eefe8ee2d1
Allow 3D / pan with streamed or MP3 sounds 2024-07-01 18:17:04 +02:00
smallmodel
edb1cb0ebe
Renamed SFX_FLAG_NO_DATA to SFX_FLAG_STREAMED 2024-07-01 18:05:24 +02:00
smallmodel
140242a761
Fixes MP3 files like dialog improperly working 2024-07-01 18:00:20 +02:00
smallmodel
ae13be0c37
Fixes OpenAL errors 2024-07-01 17:39:47 +02:00
smallmodel
74ff3b920e
Fixes OpenAL 2D origin 2024-07-01 17:39:32 +02:00
smallmodel
2cd6b981f1
Puts the volume gain constant in a variable 2024-07-01 16:46:54 +02:00
smallmodel
f866dcbcfc
Adds triggered music support
This allows the main menu music to play, as well as single-player musics
2024-07-01 16:10:42 +02:00
smallmodel
0d394a7e67
Fixes strings printing on the same line 2024-07-01 14:15:58 +02:00
smallmodel
7059f32ecc
Don't timeout if the client hosts the game 2024-07-01 01:09:39 +02:00
smallmodel
f5aadbb788
If the loopSound has no origin, make it local
This should fix #309
2024-06-15 16:38:02 +02:00
smallmodel
141574a0d7
Ignore mouse events when paused 2024-06-15 16:22:21 +02:00
smallmodel
2df8ed10d0
Improves timeout checking, properly show the timeout menu and shutdown the server 2024-06-15 14:56:30 +02:00