Commit graph

74 commits

Author SHA1 Message Date
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
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
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
deb18c53b7
Implement streaming support for OpenAL
See #333, and #324
2024-08-12 20:26:17 +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
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
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