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
Randy Heit
cd122f944b
- Similar fix to the previous: The child TiMidity++ process quitting would not necessarily be
...
detected, so S_ChangeMusic() would not restart one-shot songs that had finished if it was
the MIDI device.
SVN r3463 (trunk)
2012-03-22 21:23:18 +00:00
Randy Heit
78d28dedda
- Fixed: S_ChangeMusic() would not necessarily restart non-looping songs that had finished playing.
...
SVN r3462 (trunk)
2012-03-22 21:09:20 +00:00
Randy Heit
ce43552ebb
- Use _exit() instead of exit() when Timidity++ cannot be execed, because
...
exit() can (and does) make the process hang. (It sure would be nice if
POSIX-land had a simple CreateProcess API, but I guess that would be too
easy, huh?)
SVN r3432 (trunk)
2012-03-12 04:05:15 +00:00
Randy Heit
162ad601ba
- Fixed bug introduced in r3412: The SetStyle() call needs to come after the scissoring check,
...
because the latter can flush the quads, including the one SetStyle() just set a style for.
SVN r3429 (trunk)
2012-03-12 01:22:19 +00:00
Randy Heit
f94b38fd7f
- Fixed: The softsynths could get stuck on the last notes of nonlooping songs.
...
SVN r3426 (trunk)
2012-03-11 04:30:35 +00:00
Randy Heit
957f67f7cc
- Fixed: FMOD as MIDI device always looped the song, even when it shouldn't (such as the title music).
...
SVN r3425 (trunk)
2012-03-11 03:56:20 +00:00
Randy Heit
9457a1b3f8
- So, apparently the XMIDI library uses a fixed 120 Hz clock for MIDI events. As a result, we
...
should ignore any tempo events in XMIDI songs that were left over from the original MIDI
files, since the converter didn't remove them.
SVN r3384 (trunk)
2012-02-23 02:22:56 +00:00
Randy Heit
c3dba9ca9a
- Added writemidi console command. If the currently playing song is a MIDI variant, this will
...
write it to disk.
SVN r3383 (trunk)
2012-02-22 03:28:33 +00:00
Randy Heit
d3ad8ca3d8
- Fixed: XMISong::ProcessInitialMetaEvents() did not set the Division for tempo events. (Why
...
does XMI modify the division based on the tempo?)
SVN r3382 (trunk)
2012-02-22 02:05:12 +00:00
Randy Heit
170284ad57
- Added Gez's HMI/XMI division fixes, and partially the XMI tempo fix (not currently used).
...
SVN r3377 (trunk)
2012-02-21 20:19:25 +00:00
Randy Heit
ebd115e7ca
- Removed snd_3dspread, because it totally does not do what I want. I was using it to preserve
...
some of the stereoness of stereo sounds played in 3D. My testing was done only with stereo
speakers, however, and I did not realize that it was moving the perceived physical location
of the sound itself (because it sounded fine with my two speakers). So when 3D spread started
working with mono sounds as well in FMOD 4.28, sound positioning was completely broken for
everything when outputting to more than two speakers, because sounds were being spread
across a 180 degree arc.
Whoops!
Stereo sounds are now completely mono when not played by you, the listener.
SVN r3357 (trunk)
2012-02-14 03:15:13 +00:00
Randy Heit
68fbd75897
- Fixed compilation with FMOD 4.38+. The removal of hardware voices and EAX was a fairly
...
major change, so I'm making no provisions for using older FMOD DLLs when compiled with the
4.38 API. However, sound positioning is still broken like in 4.28, so you are recommended
to continue building with 4.26. Also, the Freeverb-based DSP unit is no longer present in
FMOD, so the underwater effect is currently unavailable when using 4.38 until I can figure
out how to make it work with the SFX Reverb unit instead. (And on that topic, the Freeverb
DSP was officially only for stereo outputs, so I really shouldn't have been using it in the
first place.)
- Since I would like to eventually figure out the sound positioning issues with the newer
FMODs, the following have been added:
* snd_drawoutput now labels its outputs with the speakers they represent.
* DCanvas::DrawTextA was added as an alias for DrawText, since the Windows headers #define
DrawText to a Unicode/non-Unicode variant.
* The loopsound console command was added to spawn an actor at the player's location and
have it loop a sound infinitely.
Hopefully I can figure it out. FMOD's 3D example works, so I assume the problem lies with
my code, though I don't really know where to begin looking for the problem.
SVN r3350 (trunk)
2012-02-10 00:53:50 +00:00
Randy Heit
c12538c346
- Fixed crash when trying to play a MIDI file with no notes.
...
SVN r3294 (trunk)
2011-09-14 23:34:28 +00:00
Braden Obrzut
5c81cf20ba
- Merged r1236, r1237, and r1240 of GZDoom.
...
SVN r3279 (trunk)
2011-08-14 23:53:20 +00:00
Braden Obrzut
f42358ad08
- Backported FMOD Ex 4.34 fixes from gzdoom-macosx. (With changes to continue to allow compilation with 4.22-4.28.)
...
SVN r3278 (trunk)
2011-08-13 21:11:09 +00:00
Christoph Oelckers
f84368677a
- updated OpenAL branch.
...
SVN r3269 (openal)
2011-07-08 22:00:23 +00:00
Randy Heit
1579fd1c1c
- Fixed: Selecting TiMidity++ as a MIDI device without a working timidity.exe, then switching to a different MIDI device would leave music silent until a new song was started.
...
(The discrepancy between mus_playing.handle and currSong is one which should probably be handled properly at some point.)
SVN r3212 (trunk)
2011-05-20 00:26:22 +00:00
Randy Heit
37b7595db7
- Oh my goodness, maybe I need to try compiling things before committing them!
...
SVN r3181 (trunk)
2011-04-14 21:48:48 +00:00
Randy Heit
dd5e8e9333
- Add fix for MUS volume controller changes with 8-bit values.
...
SVN r3180 (trunk)
2011-04-14 16:29:57 +00:00
Randy Heit
d3b44a4172
- Fix errors/warnings from MinGW 4.5.0 (tdm-1).
...
- Disable the missing field initializers warnings that -Wextra produces from GCC.
SVN r3173 (trunk)
2011-03-29 05:20:33 +00:00
Christoph Oelckers
1993e969b7
- GCC warning fixes (GCC stupidity for the most part.)
...
SVN r3154 (trunk)
2011-02-19 08:59:43 +00:00
Randy Heit
869b9c9ccc
- Fixed: FMODSoundRenderer::DrawWaveDebug() only allocated enough space for the wavearray based
...
on the window_size, so for large numbers of output channels, it would not allocate enough
space for the spectrum data (which is definied by SPECTRUM_SIZE, not the window_size) and
write junk on the stack when drawing the spectrums, causing a crash.
SVN r3087 (trunk)
2011-01-02 18:11:48 +00:00
Christoph Oelckers
dff4553663
- fixed: When playing non-looping songs GMESong::Read could return without releasing the critical section.
...
SVN r2988 (trunk)
2010-11-07 14:25:08 +00:00
Christoph Oelckers
f3d05e2699
- applied Chriss OpenAL patch to make it uzable without GStreamer.
...
SVN r2984 (openal)
2010-11-07 07:17:57 +00:00