Commit graph

333 commits

Author SHA1 Message Date
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