Commit Graph

604 Commits (master)

Author SHA1 Message Date
jeremy c8c06ceee9 Fixed SoundManager::stopSound when output is not initialized (bug #4600 probably) 6 years ago
Capostrophic e095d51999 More queue handling adjustments 6 years ago
Capostrophic c975dab7c3 Update say sound queue explicitly once per frame 6 years ago
Capostrophic 4c2b694b29 Make SayDone return 1 on the frame speech is started (bug #4879) 6 years ago
Capostrophic 6e98cd8eaa Increase music crossfade time to 1 second 6 years ago
Bret Curtis 7808cbbfe8
Merge pull request #2292 from akortunov/fallback
Make fallback map static to simplify constructors
6 years ago
Capostrophic af80eddc0e Use loudness data for 2D voiceover (bug #4947) 6 years ago
Andrei Kortunov a302ec9c65 Make fallback map static to simplify constructors 6 years ago
Capostrophic abae35e88b Loop title screen music (bug #4896) 6 years ago
Capostrophic d1967562a3 Fix the last audio packet getting lost 6 years ago
Andrei Kortunov 3032b177a1 Remove redundant includes 6 years ago
Ilya Zhuravlev 07e9ce84b3 Replace volatile bools with std::atomic<bool> 6 years ago
Bret Curtis 419e7ea5a2
Merge pull request #2035 from akortunov/coverity
Fix many Coverity Scan warnings
6 years ago
Andrei Kortunov 4ee15ddcb9 Fix many Coverity Scan warnings 6 years ago
Andrei Kortunov d2613e35a2 Fix some Clang 7 warnings 6 years ago
Andrei Kortunov f88d5e808c Rewrite media decoder to use FFMpeg 3.2+ API (task #4686) 6 years ago
Andrei Kortunov 8fa0ffcfe4 Catch exceptions inside the loadVoice() (bug #4685) 6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago
Andrei Kortunov 70ed8fd1a9 Use constants instead of widely used magic numbers (task #4645) 6 years ago
Andrei Kortunov d5bcc49079 Initialize missing struct fields 6 years ago
Capostrophic 7ef6fa9f61 Remove deprecated GMST get* functions 6 years ago
Chris Robinson c2b3ca9638 Update some comments
It wasn't actually a bug in OSX like the comment said, but intended behavior.
6 years ago
Chris Robinson 4e3ae85c11 Set the OpenAL source offset after setting the buffer
This is to work around a bug in the Rapture3D driver.
6 years ago
Andrei Kortunov 5a4d0cec3a Use new logging system for game itself 6 years ago
Capostrophic 16af1a6c1c Replace 0 sound range values separately 7 years ago
Andrei Kortunov 359e748c28 Initialize some missing fields in constructors 7 years ago
Andrei Kortunov 2854f6ca83 Handle exception if we try to play non-music file (bug #4416) 7 years ago
Bret Curtis 67c381df4e
Merge pull request #1708 from akortunov/refidfix
fix GCC warnings
7 years ago
Andrei Kortunov a68de93308 Initialize srate variable in openal_output 7 years ago
Andrei Kortunov e5db5e2651 Fix 'maybe-uninitialized' warning in openal_output 7 years ago
Andrei Kortunov b15bed8e22 Avoid excessive loadSound calls 7 years ago
Andrei Kortunov 4872edc5ed Prevent PlaySound overlapping 7 years ago
scrawl f0507e6b46
Merge pull request #1686 7 years ago
Capostrophic 9073e4d4ba Initialize playlist file list in playPlaylist (fixes #4134) 7 years ago
Harald H d3b623b5d3 http to https for supported urls (#1625)
* http to https for supported urls

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http tp https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* some url fixes

* http to https
7 years ago
Chris Robinson 08e947319a Restore exception throwing to the decoder 7 years ago
Chris Robinson 06ae61479a If a sound effect fails to load, substitute silence. 7 years ago
Chris Robinson aecf74e7bb Don't throw exceptions from the audio decoder 7 years ago
Chris Robinson 074be7d7c6 Remove a function from the sound manager interface 7 years ago
Chris Robinson 41bb35655b Avoid an extra call to get the buffer size 7 years ago
Chris Robinson 5c53ee42a1 Prepare all Sound_Buffers when retrieving the first one 7 years ago
Chris Robinson 4b448c74d2 Use range-for loops instead of for_each 7 years ago
Chris Robinson 1e729e8da9 Avoid more explicit loops 7 years ago
Chris Robinson 9dbb713b7c Print a bit more information for sound initialization 7 years ago
Chris Robinson acd6d9cd72 Try opening the default device fallback in OpenAL_Output 7 years ago
Chris Robinson d68e1581ee Use an std::array for the OpenAL stream buffers 7 years ago
Chris Robinson 780e82480d Make the PlayMode and PlayType enums scoped
Also shorten them by putting them in the MWSound namespace
7 years ago
Chris Robinson 0c1ad7c74e Replace a few more explicit loops 7 years ago
Chris Robinson 1e123a22e1 Avoid some explicit loops 7 years ago
Chris Robinson 3757571d46 Set HRTF when initializing the device 7 years ago
Chris Robinson c17edfd547 Don't be so throw-happy in the sound manager 7 years ago
Chris Robinson abe80f5868 Move the soundlist when updating a Ptr instead of copying 7 years ago
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.
7 years ago
Chris Robinson 6f57233ba1 Avoid copying the same Ptr with each iteration 7 years ago
Chris Robinson edfba68eb5 Apply reverb and a low-pass filter when underwater
This replaces the pitch-shift effect when available.
7 years ago
Chris Robinson 27eeaf90d0 Use unordered_map for the music playlist and sound buffer caches 7 years ago
Chris Robinson 033303b911 Properly update the near water sound volume 7 years ago
Chris Robinson 0b720cd90c Set the appropriate meter/unit scale for sound 7 years ago
Chris Robinson c790fedd3f Load an effect and filter for underwater 7 years ago
Chris Robinson 3d37cb3cf6 Load EFX functions when available 7 years ago
Chris Robinson c5a3fb7ccd Simplify checking for near water sfx change
Rather than checking every frame you're near the water, only check when the
current cell changed (the sfx will only change when moving between interior and
exterior). It also doesn't need to look through all playing sounds, as it's a
local one not attached to a Ptr.
7 years ago
Chris Robinson 617c05f557 Make Sound and Stream sibling types
To avoid being able to accidentally cast a Stream* to a Sound*, or vice-versa.
7 years ago
Chris Robinson 9e45f6d05f Make a note that stopTrack needs to be called for a stopping track 7 years ago
Chris Robinson 9e7a49f66e Include alext.h to get OpenAL extension definitions 7 years ago
Chris Robinson 1fe60dd8e2 Replace some shared_ptrs with pointers to deque entries 7 years ago
Andrei Kortunov 1aaa8a76c5 Allow to play only one copy of given sound at time (bug #3647) 7 years ago
Harry 86ae2ae395 Improved shuffle (#1412) 7 years ago
scrawl f0dea8b8e6 Revert "Implement a Fisher-Yates shuffle on background music" 7 years ago
Harry 2a85c5f011 Implement a Fisher-Yates shuffle on background music
This fixes sometimes getting repetitive background music
7 years ago
Lennart Bernhardt 546352dbe3 avoid starting sound updates more than necessary 8 years ago
Lennart Bernhardt 7b8278ae45 remove redundant mMusicFader variable 8 years ago
Lennart Bernhardt 60a7d3d6e0 Fade out music before change occurs 8 years ago
Allofich 42402976e3 Fixes for building in MSVC 8 years ago
Bret Curtis d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 8 years ago
Bret Curtis 07f75e1104 replace boost::shared_ptr in extern and components 8 years ago
Ewan Higgs 38a2de3c51 convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 8 years ago
MiroslavR d24bcbac15 Do not apply underwater effects to player's voice (Fixes #3850) 8 years ago
scrawl 5a939418fc Add missing avcodec_close (Fixes #3741) 8 years ago
Jules Blok e9d8ff532f OpenAL_Output: When a source is finished, rewind it instead of stopping it.
This works around a bug in the MacOS OpenAL implementation.
8 years ago
MiroslavR c34d85ffc2 Implement water sounds (Closes #451) 8 years ago
scrawl 530fb61ad0 Use OpenThreads instead of boost thread
This should allow OpenMW to work better with git versions of openscenegraph. OSG dev version 3.5.5 added the setting of thread affinity for the main thread. The problem is that in the boost/standard threading libraries, the affinity of a thread is inherited by any further threads launched from that thread, leading to these threads always running on the same core as the main thread unless you tell them not to.

With OpenThreads, the default affinity of a thread is none, no matter what parent thread it was launched from.

So, when using custom threading with OSG 3.6+, we have these options:
1. explicitely tell OSG to *not* set the thread affinity
or 2. explicitely set the thread affinity of additional threads created (possible with boost, but not possible with std::thread)
or 3. use OpenThreads
or 4. accept the suboptimal performance of non-OSG threads (in OpenMW's case the sound streaming & video threads) running on the same core as the main thread

This patch opts for 3.)

Reference: http://forum.openscenegraph.org/viewtopic.php?t=16158
8 years ago
scrawl 509e5dfe4d Include cleanup 9 years ago
scrawl 4699a8098b Include fix 9 years ago
scrawl 1739351b7a Remove now unused Sound_Decoder::rewind() 9 years ago
scrawl dc1b010cf0 Don't analyze the loudness for sounds that don't need it 9 years ago
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 .
9 years ago
scrawl dfc2f3469a Don't play music if no playlist is set 9 years ago
scrawl 90a99991d1 Use empty() instead of !size() 9 years ago
scrawl 604b5d24e9 Use a ConstPtr in SoundManager 9 years ago
scrawl 4553db7b43 Merge pull request #861 from scrawl/soundcrash
Fix crash when running out of sound sources
9 years ago
scrawl 6a749e77f2 Fix crash when running out of sound sources 9 years ago
Chris Robinson cddea4a99c Start underwater sound after updating sounds
In between the startUpdate/finishUpdate calls, changes are deferred so that
they can happen all at once. This includes starting sounds, so when the
underwater sound is started it will be immediately checked to see if it's
playing. Since it's not yet playing, it'll be seen as stopped and get cleaned
up before ever playing.
9 years ago
Chris Robinson f47f0a996f Stop the object's old say sound before playing the new one 9 years ago
Chris Robinson 7fc2df153a Rename stopSound/stopStream to finishSound/finishStream
Since they're also used to clean up output resources, not just stopping.
9 years ago
Chris Robinson 808f701013 Use the actor's Head position for Say streams 9 years ago
Chris Robinson a00a4bce77 Avoid some unnecessary indirection 9 years ago
scrawl 1264651af7 Fix coverity defects 9 years ago
scrawl e69750905a Fix gcc warning about function casts 9 years ago
Chris Robinson c75303b652 Add an option to select and enable HRTF 9 years ago
scrawl 53158d29b1 stopSound crash fix 9 years ago