smallmodel
50e3aa1f61
Fix compilation errors with AL local headers ( #705 )
...
Build branch / build-all (push) Failing after 48s
CodeQL / Analyze (push) Has been cancelled
* Remove alext inclusion as it's included by qal.h already
* Update local AL headers
2025-03-22 23:45:41 +01:00
smallmodel
28fd0ba201
Use spline as the default source resampler for OpenAL
...
This makes sounds feel stronger, the spline resampler has slightly louder high frequencies
2025-01-09 20:36:15 +01:00
smallmodel
d396a45e64
Annoying MSVC focus mistake
2025-01-08 18:55:54 +01:00
smallmodel
4f32d436bb
Disable OpenAL limiter
2025-01-08 18:45:05 +01:00
smallmodel
4268a875fa
Revert commit b95241dcfe
2025-01-08 17:56:44 +01:00
smallmodel
b95241dcfe
Rotate audio listener by +90 degrees forward
...
This fixes wrong spatialization of 3D sources with HRTF
2025-01-07 20:49:25 +01:00
smallmodel
869075f47b
Disable audio virtualization on special audio sources such as music and ambient sounds
...
This prevents the music from being muffled by HRTF virtualization
2025-01-01 23:58:48 +01:00
smallmodel
f4a412cc24
Fix reverb toggle at runtime even if reverb is unimplemented
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 17s
2024-12-31 13:04:33 +01:00
smallmodel
d5d5c7a55d
Use bits per sample rather than bytes as there are 4-bit sounds
2024-11-30 23:23:49 +01:00
smallmodel
1e9decf193
Add support for IMA-ADPCM sounds (4-bit)
...
Sounds such as sea waves (mohaa m3l1a) and subpen (mohaas flughafen) will be played accordingly. This uses OpenAL extensions such as AL_EXT_IMA4 and SOFT features such as AL_SOFT_block_alignment
2024-11-27 20:37:56 +01:00
smallmodel
be34870a18
Copy the channel origin to the sound entity origin when loading
...
If the channel had a valid entity at the time of saving, make sure to restore the origin
2024-11-23 21:12:58 +01:00
smallmodel
4d4b9288c6
Don't update the streamed channel if the source status AL_INITIAL
...
This can occur when starting a new sound without playing it, which can happen when reloading the sound system while all sounds are paused (game paused)
2024-11-23 18:42:27 +01:00
smallmodel
953091cdc8
Move and rename macros to snd_local_new.h
2024-11-17 19:11:59 +01:00
smallmodel
5819145af8
Synchronize the entity time with the channel time when loading
...
This prevents the channel from stopping immediately during respatialization, the entity time may be updated quite some time after loading
2024-11-17 18:46:21 +01:00
smallmodel
cea0d95fee
Set the pitch to default when setting a new SFX
...
This fixes channels having an incorrect pitch when starting the sound under some circumstances
2024-11-17 17:12:36 +01:00
smallmodel
857d25825b
Remove tmvolume like other commands when shutting down OpenAL
2024-11-16 16:57:59 +01:00
smallmodel
67b285924c
Prefix OpenAL with debug prints
2024-11-14 19:49:22 +01:00
smallmodel
5edee7d12e
Add tmvolume from Spearhead and Breakthrough
2024-11-11 14:24:57 +01:00
smallmodel
f5d2fdbcad
Return an empty string if the channel is neither playing nor paused
...
It was only checking if the channel was playing. This was an issue because, in the main menu the music is paused, which means saving from main menu would not save the music filename
2024-11-05 22:16:15 +01:00
smallmodel
c650af7b55
Fix stack corruption due to an improper assignment to the alias
2024-10-29 21:37:31 +01:00
smallmodel
16bedf7e86
Warp the sample offset for small streams so it doesn't get past the stream size
2024-10-26 15:07:09 +02:00
smallmodel
a218106c8b
Reset the number of songs when freeing all songs
...
This fixes an issue where songs from previous maps get played on maps without a music file
2024-10-21 18:40:42 +02:00
Leszek Godlewski
61a2b6a837
Don't call into the OAL channel in S_OPENAL_GetMusicFilename if QAL init failed
...
Prevent a crash upon vid_restart
2024-10-13 00:25:17 +02:00
smallmodel
277ca0c951
Handle bigger offsets in sample_ms_offset()
...
This fixes an issue where when the offset was big enough, the value would overflow and start again from 0
2024-09-29 12:34:07 +02:00
smallmodel
5b567f4cba
Fix music volume not restored when the map restarts after the intermission
2024-09-22 01:39:40 +02:00
smallmodel
f9d264058b
Use safe version of sprintf and strcpy
2024-09-20 23:08:53 +02:00
smallmodel
a69d9d4483
Fix compilation errors for MacOS, and add support for MacOS
2024-09-20 21:31:27 +02:00
smallmodel
6c2c8ca2b7
Don't archive s_openaldevice and s_openaldriver
2024-09-18 22:10:33 +02:00
smallmodel
c3ef267d6d
Implement movie audio in OpenAL code
2024-09-14 21:55:15 +02:00
smallmodel
39add5ccec
Fix incorrect parsing of music volumes
2024-09-13 20:01:01 +02:00
smallmodel
10b30d74e7
Implement sample_volume()
2024-09-12 22:23:27 +02:00
smallmodel
6adad053d9
Explicitly disable looping when setting the sample loop count to a value other than 0
...
This fixes a rare occurrence where some sounds would loop forever
2024-09-09 00:15:39 +02:00
smallmodel
1022ce531a
Fix AL buffers having sound data past end of the sound buffer
2024-09-04 20:10:56 +02:00
smallmodel
7852929da3
Fix the music replaying when loading from save after it ended
2024-09-01 20:38:11 +02:00
smallmodel
010a5ffc74
Mark entities as missing until they are received
...
This fixes a bug where the plane sound in t1l1 would stop immediately because the entity isn't received at this point
2024-09-01 16:21:56 +02:00
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
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
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