Commit graph

914 commits

Author SHA1 Message Date
Christoph Oelckers
ace3e29473 - removed the implicit conversion operators from FName.
These were creating dangerous interdependencies. It is better to do explicit conversions when needed.
As an added plus, this means that zstring.h no longer depends on name.h which was very annoying.
2020-04-11 14:00:13 +02:00
alexey.lysiuk
13e6ea7796 - added line break to 'No GENMIDI lump' message
'ST_Init: Init startup screen.' is no longer concatenated with the given line
2020-03-13 13:33:11 +02:00
Rachael Alexanderson
178cf40428 - fix debug assertion, cleanup vestigial A_PlaySound addition 2020-03-03 22:50:01 -05:00
Rachael Alexanderson
5dfdac62ab - add checking in S_StartSound for startTime length 2020-03-02 22:15:37 +01:00
Rachael Alexanderson
1b80b7bf2f - ported over Nash's startTime for A_StartSound 2020-03-02 22:15:37 +01:00
Major Cooke
4cf7c6351d Added A_StopSounds(int chanmin, int chanmax).
- If both channels are 0, completely silences the actor.
- Adapted A_StopAllSounds to call A_StopSounds(0,0);
2020-03-01 19:42:21 +01:00
Major Cooke
55284d46bf Added A_StopAllSounds. 2020-02-29 19:19:51 +01:00
Rachael Alexanderson
04ce0b6ec6 - use GAMENAMELOWERCASE macro for music config defaults 2020-02-23 08:12:41 +01:00
alexey.lysiuk
45617043f8 - fixed arguments order for ZMusic_Start() function 2020-02-22 13:08:10 +02:00
Christoph Oelckers
5391382807 - removed CD audio support.
Mainly because this is an ancient deprecated feature on the system side that serves no good purpose anymore.
2020-02-18 21:53:30 +01:00
Christoph Oelckers
c485256c74 Merge remote-tracking branch 'remotes/origin/zmusic_dll' 2020-02-15 10:22:45 +01:00
Christoph Oelckers
85ff05c0b2 - missed these in the last commit. 2020-02-15 10:16:38 +01:00
Christoph Oelckers
6aed119403 - backported a few sound code fixes from Raze. 2020-02-15 09:32:05 +01:00
alexey.lysiuk
c80bfcf9f6 - added missing #include
src/sound/music/i_soundfont.cpp:121:12: error: no viable overloaded '='
src/sound/music/i_soundfont.cpp:127:12: error: no viable overloaded '='
src/sound/music/i_soundfont.cpp:140:14: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
2020-02-11 12:29:20 +02:00
Christoph Oelckers
2dd3c28d05 - transitioned engine to use ZMusic as a DLL. 2020-02-09 08:56:49 +01:00
Christoph Oelckers
77ed5b1fe8 - let freelook default to true. 2020-02-03 21:41:52 +01:00
Christoph Oelckers
2817bc5508 - backported fix for loading VOC files.
In NAM there is one that needed a bit of extra treatment.
2020-02-01 17:34:06 +01:00
Chris Robinson
5b4c9eb7f6 Remove FSoundLoadBuffer since it wasn't doing anything 2020-02-01 17:11:26 +01:00
Chris Robinson
3c975f18bc Remove LoadSoundBuffered since its no longer called 2020-02-01 17:11:26 +01:00
Chris Robinson
30bdd0c2d4 Get rid of the LoadSound3D method
It no longer does anything since there's no separate buffer for 3D sfx.
2020-02-01 17:11:26 +01:00
Chris Robinson
d823091446 Update a couple comments about monoized sounds 2020-02-01 17:11:26 +01:00
Chris Robinson
e88b1039a3 Stop sources immediately when the sound is forced to stop
The reason for the previous delay was to allow OpenAL Soft to fade the sound to
silence and avoid a sudden amplitude change, which can cause a "click" or "pop"
noise. However, with OpenAL Soft 1.20, this is a built-in feature of the mixer
so the extra complexity is unnecessary.
2020-02-01 17:11:26 +01:00
Chris Robinson
c095872b0a Remove the 'monoize' option from sound loading
Unnecessary with the AL_SOFT_source_spatialize extension, which has been
available for over a year.
2020-02-01 17:11:26 +01:00
Chris Robinson
42fd84a09d Remove the fallback for lack of AL_EXT_SOURCE_RADIUS
It's been available in OpenAL Soft for years and the fallback method wasn't very good.
2020-02-01 17:11:26 +01:00
alexey.lysiuk
f9fa07dca5 - restored old values for CHAN_... constants
https://forum.zdoom.org/viewtopic.php?t=66929
2020-01-11 13:27:10 +02:00
alexey.lysiuk
cad14d1c93 - fixed resolving of music aliases with full filenames
https://forum.zdoom.org/viewtopic.php?t=66815
2020-01-06 11:15:17 +02:00
Petr Mrázek
3c20d5fe88 - Run the Alsa MIDI thread every 40ms or so, use non-blocking sequencer 2020-01-04 20:19:36 +01:00
Chronos Ouroboros
a588c24c4f Fixed some incorrect parentheses in S_PlaySoundPitch. 2020-01-04 15:34:43 -03:00
Christoph Oelckers
b7e1a35e6f - cleaned up the parameters of A_StartSound.
There were two booleans that could be merged into the flag word.
This also fixes a bug with CHAN_NOSTOP not working for local sounds because it checked the wrong sound source for the playing sound.
2020-01-04 14:25:55 +01:00
alexey.lysiuk
651dfbc49f - fixed a few compilation warnings
src/d_main.cpp:280:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
src/rendering/r_videoscale.cpp:147:22: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
src/sound/s_reverbedit.cpp:250:18: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
2020-01-04 12:59:26 +02:00
Christoph Oelckers
8898448014 - refactored the MIDI list code.
Let's hope nothing got broken on the Linux side, the recent submission's code was not usable.
2020-01-02 14:21:26 +01:00
Christoph Oelckers
f442d2dc54 - made the sound decoding interface DLL friendly and added compile switches to the MIDI players so that different licenses can be uses as compile target. 2020-01-02 12:43:37 +01:00
Christoph Oelckers
71cd4ef488 Merge branch 'master' of https://github.com/coelckers/gzdoom
# Conflicts:
#	libraries/zmusic/zmusic/mididefs.h
#	libraries/zmusic/zmusic/zmusic.h
2020-01-02 08:45:48 +01:00
Petr Mrázek
ea1b8de405 - Support for MIDI on Linux via alsa sequencer 2020-01-02 08:29:39 +01:00
Christoph Oelckers
d2ca1ea4e0 - rewrote the ZMusic interface so that it is free of C++ constructs.
Now it is ready to put in a DLL.
2020-01-02 01:26:01 +01:00
Christoph Oelckers
0d000344ca - replaced the C++ based file access wrapper in ZMusic with a C compatible version. 2020-01-01 22:54:27 +01:00
Christoph Oelckers
527fb40a5f - there's no need to let the XM Vorbis decoder run through the client - all related functionality is part of ZMusic itself. 2020-01-01 20:58:15 +01:00
Christoph Oelckers
47d70c839d - made adjustments to the remaining parts of the function interface. 2020-01-01 20:47:33 +01:00
Christoph Oelckers
7923d25cce - made the ZMusic interface more DLL friendly: Reworked all functions not to throw exceptions across the library boundary and made a few definitions internal.
Not complete yet.
2020-01-01 20:01:38 +01:00
Marisa Kirisame
55e482d0fc Additional CHAN_OVERLAP awareness for StartSound and ChangeSoundVolume/Pitch. 2019-12-30 13:01:59 +01:00
Christoph Oelckers
d08bb93b84 - elimintated all cases from the ZScript code where channel indices and flags were combined into one parameter and removed all remnants of CHAN_PICKUP. 2019-12-30 09:47:25 +01:00
Christoph Oelckers
d79c6c1c0a - fixed: A_StartSound was still masking the sound channel value for checking if it plays something. 2019-12-30 09:09:56 +01:00
Christoph Oelckers
318da33e39 - sound engine update.
Notable changes:
* IsSourcePlayingSomething had undefined behavior when checking unattached and unpositioned sounds.
* loading Blood RAW sounds with different sample rates but the same backing lump may not use the same hardware sound buffer.
* when playing an unpositioned sound the attenuation is irrelevant and must be ignored. This resulted in a 3D sound being started which was mostly inaudible due to lack of valid origin.
2019-12-19 11:57:58 +01:00
Marisa Kirisame
9430e1556f Change IsSourcePlayingSomething to handle overlapping sounds. 2019-12-17 15:53:56 +01:00
Christoph Oelckers
0ba6816622 - made FSoundChan::EntChannel a full int and reordered the structure for better packing. 2019-12-17 11:43:13 +01:00
Christoph Oelckers
0a8effaf9e - fixed inverted listener check when using compatibility options. 2019-12-17 08:49:50 +01:00
Christoph Oelckers
3808e85c3e - the old bit masking for the channel needs to go, of course. 2019-12-17 00:28:32 +01:00
Christoph Oelckers
639e9d3cd4 - fixed VOC loader. Its 16 bit code did not work because it set the variable to -16 instead of 16.
- removed a few MAX calls with std::max.
2019-12-17 00:05:35 +01:00
Christoph Oelckers
e82565373f - separated the channel number from the flags in the sound interface so that the 8 channel limit can be eliminated.
- added Marisa Kirisame's CHAN_OVERLAP flag.
- exported S_IsActorPlayingSomething to ZScript.

The sound API change required deprecating A_PlaySound and S_Sound. There are now new variants S_StartSound and A_StartSound which have two distinct parameters for channel and flags.
2019-12-16 23:52:39 +01:00
Christoph Oelckers
b09e9f10ed - sound engine update. 2019-12-16 21:45:34 +01:00