Commit graph

362 commits

Author SHA1 Message Date
smallmodel
2239efa439
Fix sample_offset() returning a wrong value with looping sounds
The returned offset will now be the correct when the stream has been re-read from the beginning due to the sound looping
2024-08-30 21:12:39 +02:00
smallmodel
89133bf05d
Fix looping sounds not stopped when stopping all sounds
This fixes an issue where some random looping sound (like footsteps) would be heard after restarting or when loading a saved game
2024-08-29 19:29:16 +02:00
smallmodel
194e898d90
Ignore bad SFX for 3D loop sounds 2024-08-26 13:22:40 +02:00
smallmodel
0b1a20dcff
Properly save and restore sound position, also fix loopsounds not playing properly 2024-08-26 01:29:42 +02:00
smallmodel
022181fcfd
Remove processed buffers after half of the queued buffers has been processed 2024-08-25 16:49:24 +02:00
smallmodel
91b80a8e21
Fix the sound system not restarting when modifying the speaker type to 0 2024-08-24 19:19:55 +02:00
smallmodel
d399ffd609
Set the correct sound velocity 2024-08-24 18:18:20 +02:00
smallmodel
bf2626f804
Set the pitch before playing the sound 2024-08-24 17:53:13 +02:00
smallmodel
00f27ac02d
Fix improper sound distance values 2024-08-24 17:35:35 +02:00
smallmodel
b457a84ed9
Fix AL_DISTANCE_MODEL value type, it must be an integer 2024-08-24 16:39:43 +02:00
smallmodel
8188d46ee7
Fix SetLittleLong() writing past end of bytes buffer
(even though the union was still 4-bytes because of the integer)
2024-08-24 15:10:12 +02:00
smallmodel
c70c578194
Ignore ALC_OUTPUT_MODE_SOFT if unavailable 2024-08-24 14:51:58 +02:00
smallmodel
54ceff5107
Process the value of s_speaker_type 2024-08-24 14:25:25 +02:00
smallmodel
56775399d3
Fix 3D sounds not being attached to an entity when specified 2024-08-23 23:38:52 +02:00
smallmodel
53d5dd1e40
Differentiate saves from mohaa, mohta and mohtt
Fixes #339 where Spearhead and Breakthrough would also display saves from mohaa
2024-08-23 22:25:43 +02:00
smallmodel
b2ef0fd6e3
Swap the save game struct on big endian architectures 2024-08-23 21:09:12 +02:00
smallmodel
b5ffe756d6
Fix buffers unnecessarily being unqueued after source has stopped 2024-08-23 20:38:41 +02:00
smallmodel
8c41576daa
Remove assertion as sounds can be streamed at any time 2024-08-23 12:13:17 +02:00
smallmodel
a529b37f25
Show some AL errors on developer mode only 2024-08-23 12:07:28 +02:00
smallmodel
5e60b89a0d
Fix linux compile error 2024-08-22 16:13:03 +02:00
smallmodel
e46625a52c
Added more verbosity 2024-08-22 15:39:28 +02:00
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