Christoph Oelckers
e662e4321a
- fixed: Creating an OPL MIDI device can fail if no GENMIDI lump is found, and an exception is thrown. We need to handle this exception to prevent an abort.
2014-10-24 22:56:10 +02:00
Chris Robinson
b8e3f99ce6
Merge remote-tracking branch 'zdoom/master' into openal
...
Conflicts:
src/s_sound.cpp
2014-09-22 18:24:55 -07:00
Christoph Oelckers
4be9a71636
- fixed: The VOC reader didn't advance the read index correctly.
2014-09-15 11:32:40 +02:00
Chris Robinson
4b68891de7
Rename 'near', because microsoft
2014-09-14 11:15:32 -07:00
Chris Robinson
ce678caab6
Include algorithm for std::min/max
2014-09-13 11:51:53 -07:00
Chris Robinson
1baf355ecd
Use the properly-sized type for ssize_t
2014-09-12 19:36:13 -07:00
Chris Robinson
713846f27a
Fix use of ssize_t with MSVC
2014-09-12 04:26:54 -07:00
Chris Robinson
ca22f2dd3f
Fix a PrintMidiDevice call
2014-09-11 14:16:56 -07:00
Chris Robinson
ff6eb6df5c
Merge remote-tracking branch 'zdoom/master' into openal
...
Conflicts:
src/s_sound.cpp
2014-09-09 14:45:53 -07:00
alexey.lysiuk
51d7340288
Fixed crash on music volume change when no track is played using FluidSynth device
2014-08-23 16:35:05 +03:00
Chris Robinson
e8233d7e87
Merge remote-tracking branch 'zdoom/master' into openal
2014-07-16 08:31:12 -07:00
Chris Robinson
d43226631d
Set reverb density based on the environment size
2014-07-15 23:04:53 -07:00
Braden Obrzut
fa5dfe79ae
- Disable cubic and spline resamplers on 64-bit with fmod 4.26 since they crash.
2014-07-15 21:07:07 -04:00
Chris Robinson
90fa215da2
Replace another std::vector with a TArray
2014-06-28 23:30:58 -07:00
Chris Robinson
ae95a2d5cf
Fix creating effect map entries
...
TMap apparently doesn't clear the memory for new entries like std::map...
2014-06-28 05:41:11 -07:00
Chris Robinson
7f3be7bf14
Show the name of unsupported sound formats with OpenAL
2014-06-28 01:25:25 -07:00
Chris Robinson
afcada4a3b
Remove an unused field
2014-06-28 00:46:45 -07:00
Chris Robinson
7908116fef
Use a separate function to update an openal stream's volume
2014-06-28 00:37:12 -07:00
Chris Robinson
c73d97af44
Use TArray and TMap instead of std::vector and std::map
2014-06-28 00:33:15 -07:00
Chris Robinson
6f8545e694
Use a TArray for SoundDecoder::readAll
2014-06-27 21:51:05 -07:00
Chris Robinson
a16f9d061c
Work around a libsndfile bug related to converting float samples to shorts
...
Do the conversion ourselves to ensure it's properly clamped.
2014-06-27 01:29:34 -07:00
Chris Robinson
1a40c95f84
Rename some FMOD references to be generic sound system
...
Since they relates to other sound backends as well, there's no need to single
out FMOD in these places.
2014-06-26 16:58:18 -07:00
Chris Robinson
0adfdf31dd
Fix calling SetPosition when not playing
2014-06-25 21:50:52 -07:00
Chris Robinson
a6900b48ba
Use AL_SOFT_deferred_updates to sync updates when availeble
2014-06-25 21:48:13 -07:00
Chris Robinson
c6bb52c866
Get the length from sounds when possible
2014-06-25 21:14:35 -07:00
Chris Robinson
fd25ec2a62
Implement GetPosition for OpenAL streams, and display it in the stats
2014-06-25 20:03:24 -07:00
Chris Robinson
3d33f565a4
Use a proper, more unique, pointer formatter for the open callback
2014-06-25 17:10:17 -07:00
Chris Robinson
7f5b538110
Implement SetPosition for OpenAL streams
2014-06-25 04:59:18 -07:00
Chris Robinson
9c12abeb2d
Better report the amount buffered in an OpenAL stream
2014-06-25 04:53:08 -07:00
Chris Robinson
0017e1e6e8
Use a FileReader to handle music resources and audio decoding
...
Instead of the previous method where there'd be a filename and offset, and/or a
memory pointer, this uses a class to access resource data regardless of its
underlying form.
2014-06-25 04:25:36 -07:00
Chris Robinson
075c5d872d
Always use the pitch multiplier when underwater
2014-06-22 22:22:45 -07:00
Chris Robinson
b2f9430fb1
Use the correct diffusion value for reverb
...
I don't know what the Density and Diffusion values correspond to, but
EnvDiffusion is the actual diffusion setting.
2014-06-22 19:38:47 -07:00
Chris Robinson
a434af92ee
Handle sounds marked as 'area sounds'
...
Note, the area radius is 128 units for it to actually do something, unlike FMOD
where it's only 32.
2014-06-22 19:35:09 -07:00
Chris Robinson
845e369b87
Don't set a room rolloff factor
...
The reverb engine already handles an initial attenuation based on the
attenuation of the dry path.
2014-06-20 05:03:20 -07:00
Chris Robinson
f0c9aae670
Rework manual rolloff handling
...
For distance models OpenAL doesn't handle, alter the source's distance to get
the appropriate attenuation instead of the source's gain.
2014-06-20 04:38:48 -07:00
Chris Robinson
ef7ce41d07
Don't purge sources in an initial state
2014-06-20 01:17:48 -07:00
Chris Robinson
fb07f7ef07
Cast OpenAL IDs to/from void*
2014-06-20 01:12:47 -07:00
Chris Robinson
906b828d87
Partially implement OpenALSoundRenderer::SetInactive
2014-06-20 00:41:19 -07:00
Chris Robinson
42fdc3c059
Use structs to store available extensions
2014-06-19 23:49:46 -07:00
Chris Robinson
0f234fb36d
Remove an unused function
2014-06-19 23:10:36 -07:00
Chris Robinson
4f6861d798
Move specific decoder classes to separate headers
2014-06-19 23:03:13 -07:00
Chris Robinson
e2708c8b3e
Cleanup creating decoders
2014-06-19 22:46:46 -07:00
Chris Robinson
9f493fca5f
Move the generic DecodeSample implementation to the base class
2014-06-19 22:42:12 -07:00
Chris Robinson
72ddc0d935
Remove a non-existent friend class
2014-06-19 22:33:39 -07:00
Chris Robinson
a661797aa8
Be less noisey about loop points
2014-06-19 22:31:19 -07:00
Chris Robinson
73d8659f23
Remove an unnecessary cast
2014-06-19 22:21:05 -07:00
Chris Robinson
07a50c604e
Use the correct formatter type
2014-06-19 22:13:20 -07:00
Chris Robinson
e39165655d
Don't call the sfx volume cvar callback in the OpenALSoundRenderer constructor
...
I_InitSound already does that after creating it.
2014-06-19 21:51:16 -07:00
Chris Robinson
364065f121
Handle file sources with mpg123
2014-06-19 20:14:16 -07:00
Chris Robinson
1310a4a814
Fix libsndfile file handler
2014-06-19 18:35:12 -07:00
Chris Robinson
eeae36fbf7
Rename the decoder sources
2014-06-19 17:53:37 -07:00
Chris Robinson
b1c98acf33
Close the file handle in the sndfile decoder
2014-06-19 17:50:03 -07:00
Chris Robinson
73d51a4446
Check for ID3 tags in MPG123Decoder::open
2014-06-19 17:19:59 -07:00
Chris Robinson
77b1febd0e
Add an mp3 decoder using libmpg123
...
Does not currently handle direct file sources
2014-06-19 06:40:27 -07:00
Chris Robinson
14618cbf30
Remove use of SDL_sound
2014-06-19 04:33:00 -07:00
Chris Robinson
b38589e2dc
Implement and use a libsndfile decoder
2014-06-19 04:13:42 -07:00
Chris Robinson
5370a1cb46
Add a SoundDecoder base class and a stub method to create one
2014-06-19 01:00:46 -07:00
Chris Robinson
b94a2949e5
Don't use air absorption for being underwater
2014-06-18 23:41:45 -07:00
Chris Robinson
34c9a47435
Fix some typos
2014-06-17 23:11:19 -07:00
Chris Robinson
7ff7c151a8
Merge remote-tracking branch 'origin/master' into openal
...
Conflicts:
src/CMakeLists.txt
2014-06-15 12:04:15 -07:00
Chris Robinson
0e21057a2a
Merge remote-tracking branch 'origin/openal' into openal
...
Conflicts:
src/sound/fmodsound.cpp
src/sound/oalsound.cpp
src/sound/oalsound.h
2014-06-15 09:59:24 -07:00
Chris Robinson
160e70f8f2
Fix getting the actual device name
2014-06-15 09:27:00 -07:00
Randy Heit
8b02bb55aa
Fix compiling with FMOD 4.36
...
- That stuff I thought that went poof in FMOD Ex 4.37 was apparently
already gone in 4.36.
2014-01-30 20:30:40 -06:00
Braden Obrzut
d8ff4ec281
- Fixed: All clang 5.0 warnings.
...
- Renamed autostart/autozend since Xcode’s build process links in strictly alphabetical order.
2014-01-05 19:50:09 -05:00
Christoph Oelckers
7cb70f60b3
- removed duplicate #define warning in fmodsound.cpp.
...
- commented out output of Cr0NpxState for floating point state because this variable was renamed in most recent Windows headers.
- added CMAKE option to generate assembly output for release builds.
- added my CMake-based project directory to .gitignore.
2013-11-28 11:03:19 +01:00
Braden Obrzut
f0b946c3cf
- Allow use of system GME library. It defaults to forcing the use of the internal library at least for now though.
2013-11-06 13:37:34 -05:00
Braden Obrzut
2142e857a9
- Applied VoidMage's OpenAL patch.
2013-10-23 19:41:58 -04:00
Braden Obrzut
97d7b1e59e
Merge branch 'origin/maint'
...
Conflicts:
src/sound/fmodsound.cpp
2013-10-23 19:39:22 -04:00
Edoardo Prezioso
4ce0574b3f
- Use a more conformant C++ preprocessor macro identifier for Unix systems.
...
The 'unix' identifier isn't defined when '-std' is passed to the compiler (tested with gcc and clang), so use '__unix__' which is well enough documented.
2013-07-30 11:46:14 +02:00
Christoph Oelckers
db562142f0
- Fix c++11 literal suffix warnings / patch by Edward-san.
2013-07-22 22:25:44 +02:00
Chris Robinson
665d685a44
Implement GetStats for OpenAL streams
2013-06-30 20:31:41 -07:00
Chris Robinson
68988ab93c
Handle S8 and U16 samples from SDL_sound
2013-06-30 08:16:49 -07:00
Chris Robinson
c4492f88ee
Make sure streams are "pumped"
2013-06-30 08:04:41 -07:00
Chris Robinson
ba3cc38d09
Support float stream callbacks with AL_EXT_FLOAT32
2013-06-30 08:04:08 -07:00
Chris Robinson
69af01d629
Use SDL_sound when available to decode files
2013-06-30 07:45:57 -07:00
Chris Robinson
99209c4a2a
Remove an unnecessary function
2013-06-30 04:47:10 -07:00
Chris Robinson
5d1cd7b7fe
Small fixups
...
find -> std::find
AL_EXT_loop_points -> AL_SOFT_loop_points
2013-06-30 01:32:48 -07:00
Chris Robinson
4f2e367ec6
Remove GStreamer support
2013-06-30 01:07:09 -07:00
Chris Robinson
b31a729ab8
Fix compilation with OpenAL
2013-06-29 22:44:46 -07:00
Chris Robinson
18597a93a7
Merge remote-tracking branch 'origin' into openal
...
Conflicts:
src/sound/fmodsound.cpp
2013-06-29 19:02:04 -07:00
Christoph Oelckers
a6ba2ce8b9
- added DavidPH's patch for compiling with FModEx 4.44.01.
2013-06-23 18:47:39 +02:00
Randy Heit
1b9c71b252
- Added S_ChangeSoundVolume() to change the volume of an already playing sound, accessible
...
through the new ACS function SoundVolume.
SVN r4318 (trunk)
2013-06-01 17:46:50 +00:00
Randy Heit
612d16e11c
- Added Oktalyzer loading support to ZDoom.
...
SVN r4081 (trunk)
2013-02-08 00:25:30 +00:00
Randy Heit
f45c624769
- Changed default FluidSynth reverb and chorus parameters to the ones suggested here: http://forums.scummvm.org/viewtopic.php?p=72972&sid=d139e99a13359541ead07073112e3888#72972
...
SVN r3995 (trunk)
2012-12-21 23:59:55 +00:00
Randy Heit
3123925fa8
- Fixed: Changing fluid_chorus and fluid_reverb did not take effect until the next song started.
...
SVN r3994 (trunk)
2012-12-21 23:58:33 +00:00
Randy Heit
849f30daab
- Changed synth.chorus.active and synth.reverb.active settings to use fluid_settings_setint(),
...
since they're int and not string settings.
- Fixed: FluidSynthMIDIDevice::FluidSettingInt() interpreted the return value from fluid_settings_setint() wrongly.
SVN r3993 (trunk)
2012-12-21 23:22:59 +00:00
Randy Heit
93bd380fee
- Optimize the Java-based OPL3 emulator some by not calling expensive math functions liberally during the rendering loop.
...
SVN r3968 (trunk)
2012-11-16 06:27:03 +00:00
Randy Heit
e59d7bc8b8
- Since we have two OPL cores now, what's one more? Added a straight, (highly) unoptimized port
...
of the Java OPL3 emulator.
SVN r3967 (trunk)
2012-11-15 05:23:24 +00:00
Randy Heit
3ec387ac32
- Renamed opl_stereo to opl_fullpan, since DOSBox's core is emulating an OPL3, which is stereo
...
but only supports three pan positions and not the full 127 MIDI pan positions.
- Added opl_core cvar to select emulator core. 0 is MAME and 1 is DOSBox.
- Added DOSBox's LGPL OPL core, distantly related to one adlibemu.c written by Ken Silverman
(not to be confused with the ancient MAME-derived and GPL-licensed core also found in DOSBox).
I believe this corresponds to their "compat" emulator, but I'm not sure.
SVN r3946 (trunk)
2012-11-08 05:45:58 +00:00
Randy Heit
12ee3271c4
- Replaced the opl_onechip cvar with opl_numchips. You can now emulate up to 8 of them for MIDI
...
playback. (Raw OPL playback will still clamp it to 2, since there's no use for more than that
with any of the raw OPL formats.)
SVN r3945 (trunk)
2012-11-06 06:10:04 +00:00
Randy Heit
3b0ad55285
- Since our OPL chips are emulated, we can give them a feature that real OPL2 chips lacked:
...
Full stereo panning for the MIDI player. (The raw OPL players are unaffected.) To get the
mono output back, you can set opl_stereo to false.
- Changed SoftSynthMIDIDevice::OpenStream() to allocate the same number of samples for stereo
and mono streams.
SVN r3929 (trunk)
2012-11-02 03:25:50 +00:00
Randy Heit
4f71176ed6
- Support loading either fluidsynth.dll or libfluidsynth.dll on Windows.
...
SVN r3927 (trunk)
2012-11-01 03:01:04 +00:00
Randy Heit
3ddac32b4f
- Because setting a DSP unit inactive completely ceases all processing on it, including timing,
...
sounds queued up while the Channel Group Target Unit is inactive will all play at the same time
once the unit is made active. To avoid this, it is now only deactivated when the gamestate is
GS_LEVEL. Otherwise, it just gets muted. Fixes http://forum.zdoom.org/viewtopic.php?f=2&t=33592 "Strife voices overlap"
SVN r3818 (trunk)
2012-08-10 03:49:50 +00:00
Randy Heit
6e81216bbd
- Fixed: The softsynths did not reset the tempo to its initial value when restarting a song.
...
SVN r3804 (trunk)
2012-08-04 02:14:32 +00:00
Randy Heit
26f9540d3c
- Fixed: I missed a nuance of the MIDI spec when writing MIDIStreamer::CreateSMF(): Running status
...
is supposed to be canceled by sysex events and meta events. This confused FMOD when the
resulting song used used running status right after these events.
SVN r3803 (trunk)
2012-08-04 01:42:49 +00:00
Randy Heit
12ef53a2ff
- snd_midipatchset and fluid_patchset are now processed through NicePath() for variable
...
substitution. In addition, on Windows, if they contain no path separator, they will
automatically have $PROGDIR prepended to them.
SVN r3781 (trunk)
2012-07-21 03:46:36 +00:00
Randy Heit
fd784b05c2
- Fix some GCC 4.7.1 warnings.
...
SVN r3747 (trunk)
2012-07-07 03:43:11 +00:00
Randy Heit
a85b751f7a
- Fix warnings warned by GCC.
...
SVN r3552 (trunk)
2012-04-11 04:44:12 +00:00
Randy Heit
d6c3d77a38
- Fixed: Stereo sound volume reduction should only be done for stereo sounds played in 3D. Head-
...
relative ones should remain full volume.
SVN r3540 (trunk)
2012-04-08 04:57:59 +00:00
Randy Heit
bff5a9b8d8
- Fixed: Trying to init FMOD with profiling enabled when the network socket was in use would fail.
...
We now fallback to no profiling when this happens.
SVN r3468 (trunk)
2012-03-22 22:40:30 +00:00