1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:49:55 +00:00
Commit graph

72 commits

Author SHA1 Message Date
Capostrophic
af80eddc0e Use loudness data for 2D voiceover (bug #4947) 2019-04-04 19:07:29 +03:00
Andrei Kortunov
d5bcc49079 Initialize missing struct fields 2018-09-11 11:11:24 +04:00
Chris Robinson
41bb35655b Avoid an extra call to get the buffer size 2017-09-16 16:25:32 -07:00
Chris Robinson
3757571d46 Set HRTF when initializing the device 2017-09-14 16:00:43 -07:00
Chris Robinson
c17edfd547 Don't be so throw-happy in the sound manager 2017-09-14 16:00:43 -07:00
Chris Robinson
605c937572 Ensure 3D sources are spatialized
Standard OpenAL does not spatialize non-mono sounds, although the game has some
stereo sounds meant to play in 3D. The desired behavior can be achieved with
the AL_SOFT_source_spatialize extension.
2017-09-14 16:00:43 -07:00
Chris Robinson
edfba68eb5 Apply reverb and a low-pass filter when underwater
This replaces the pitch-shift effect when available.
2017-09-14 16:00:42 -07:00
Chris Robinson
c790fedd3f Load an effect and filter for underwater 2017-09-14 16:00:41 -07:00
Chris Robinson
9e7a49f66e Include alext.h to get OpenAL extension definitions 2017-09-14 16:00:40 -07:00
Chris Robinson
1fe60dd8e2 Replace some shared_ptrs with pointers to deque entries 2017-09-14 16:00:30 -07:00
Ewan Higgs
38a2de3c51 convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
scrawl
dc1b010cf0 Don't analyze the loudness for sounds that don't need it 2016-06-27 21:37:13 +02:00
scrawl
965aaebbdb Analyze the loudness data as the stream is decoded for playback
Instead of getting the loudness data for the whole file in advance, we now get it piece by piece as the sound is streamed.

The benefit is that we need to decode the audio just once instead of twice.

We no longer need to rewind() the stream when the first decoding is done, this should hopefully fix bug #3453 .
2016-06-27 21:32:54 +02:00
Chris Robinson
7fc2df153a Rename stopSound/stopStream to finishSound/finishStream
Since they're also used to clean up output resources, not just stopping.
2015-12-11 15:13:14 -08:00
Chris Robinson
c75303b652 Add an option to select and enable HRTF 2015-12-05 17:14:53 -08:00
Chris Robinson
2face3d0a9 Combine duplicate code 2015-12-02 16:09:25 -08:00
Chris Robinson
1407366e51 Use a premade SoundStream object for the output's streamSound functions 2015-12-02 16:09:25 -08:00
Chris Robinson
2ee3265b66 Use a premade Sound object for the output's playSound functions 2015-12-02 16:09:25 -08:00
Chris Robinson
a6db96b2d8 Update sound and stream parameters 2015-12-02 16:09:24 -08:00
Chris Robinson
4bd235284b Rename a couple members to avoid confusion 2015-12-02 16:09:24 -08:00
Chris Robinson
1ce3e7f5b9 Use a separate type for streams
They're basically the same, but it's to help avoid accidents with passing non-
streaming sounds to the stream functions, or vice-versa.
2015-12-02 16:09:24 -08:00
Chris Robinson
816015d6e6 Avoid inheriting from Sound for sound types 2015-12-02 16:09:24 -08:00
Chris Robinson
4ee409af84 Load loudness data asynchronously
Currently abuses the output audio streams' background processing thread to do
the work, since there's no generalized threaded processing mechanism.
2015-11-27 09:47:14 -08:00
Chris Robinson
82f3651f81 Treat the sound offset as the offset in seconds 2015-11-27 02:01:17 -08:00
Chris Robinson
669b7a2295 Batch update changes together, when possible
Certain OpenAL implementations, including Rapture3D, Creative's hardware
drivers, and more recent versions of OpenAL Soft, can batch together changes so
that they all occur at once, avoiding potential discontinuities with one sound
being changed before another, or the listeenr being changed before sounds are.

On other implementaitons, this is a no-op and maintains existing behavior.
2015-11-25 04:24:26 -08:00
Chris Robinson
fbfcc4050f Stream voice clips
Voices tend to be a bit long, and not individually replayed often. So it's
better to stream them instead of loading theminto a sound buffer. The loudness
data is very small, though, so that can be kept buffered indefinitely.
2015-11-25 04:24:24 -08:00
Chris Robinson
eee6a19e31 Add a method to stream sounds in 3D 2015-11-25 04:24:24 -08:00
Chris Robinson
16f72886e9 Use separate lists for openal sounds and streams 2015-11-25 04:24:23 -08:00
Chris Robinson
22a6811425 Limit the sound buffer cache to 15MB 2015-11-25 04:24:23 -08:00
Chris Robinson
495e138907 Load sound loudness and store it with the Sound_Buffer
Still not used for say yet, though
2015-11-25 04:24:22 -08:00
Chris Robinson
4571218827 Load the sound as needed and pass it directly to the play methods
This breaks say sounds, loudness handling, and the cache limit. Fixes are
forthcoming.
2015-11-25 04:24:22 -08:00
scrawl
7a3bc69df7 Readded sound listener 2015-05-12 19:02:56 +02:00
dteviot
407cd50890 fixed warning C4099:
type name first seen using 'class' now seen using 'struct'
2015-03-06 21:36:42 +13:00
scrawl
a59620f643 Cache loudness vector in the buffer cache 2014-07-29 14:32:44 +02:00
scrawl
598c0c4ae7 Implement mouth animation for NPCs based on say sound (Fixes #642) 2014-07-29 01:15:22 +02:00
PLkolek
f297c21e4d Old door sound fades out on door open/close. Door sound is synchronised to angle on action. 2013-07-31 15:46:23 +02:00
Chris Robinson
85850c7440 Fix DEFAULT_OUTPUT declaration 2012-12-18 10:43:04 -08:00
Chris Robinson
3b7edae7c3 Don't hold a list of all sound sources 2012-12-18 05:19:32 -08:00
Chris Robinson
2f8daec379 Allow pausing only certain types of sounds 2012-12-18 04:19:35 -08:00
Chris Robinson
dd3e568a00 Set the sound properties at initialization 2012-12-17 23:35:20 -08:00
Chris Robinson
20321c4552 Keep track of the actual active sounds 2012-12-17 21:50:01 -08:00
Chris Robinson
86bf6388c6 Pass a decoder to the playStream sound output method 2012-12-12 22:32:02 -08:00
Chris Robinson
2c1eceb9f0 Add methods to pause and stop all playing sounds (and music) 2012-12-12 02:33:12 -08:00
Chris Robinson
973b5faf25 Keep track of all allocated sources 2012-12-12 01:32:16 -08:00
Marc Zinnschlag
35d099a638 disabling gcc extensions 2012-10-09 17:10:25 +02:00
Marc Zinnschlag
6bd48d12af Issue #107: SoundManager is accessed only through the interface class from now on 2012-08-09 14:33:21 +02:00
Chris Robinson
cbf6c0404a Implement a basic underwater sound environment 2012-03-31 10:06:12 -07:00
Chris Robinson
575474ff69 Pass the mode flags to the sound output play methods 2012-03-31 08:14:39 -07:00
Chris Robinson
b01289128b Split OpenAL_Sound into separate classes for 2D and 3D sounds 2012-03-31 01:15:27 -07:00
Chris Robinson
fc167dbc83 Pass Ogre Vector3s to playSound3D and updateListener 2012-03-30 11:42:11 -07:00