Cédric Mocquillon
512d64e514
Extract correctSoundPath method to avoid code duplication. Add unit test for the new method
2021-11-10 23:06:35 +01:00
psi29a
295ebbebbd
Merge branch 'astoecke-fix-6354-sfx-distance-attenuation' into 'master'
...
Fade sounds when performing distance-based culling (Fixes #6354 )
Closes #6354
See merge request OpenMW/openmw!1341
2021-11-09 14:33:52 +00:00
Alexei Dobrohotov
7a0c13fcf8
Make better use of std::clamp
2021-11-06 08:47:32 +03:00
Andreas Stöckel
3ee4aadd88
Heuristic for fading environment sounds in
2021-11-04 16:05:31 -04:00
Andreas Stöckel
1cafef7bdb
Fade water sounds more softly
2021-11-04 16:05:31 -04:00
Andreas Stöckel
9cfa2eeab8
Remove hard maximum distance in the OpenAL driver
...
Hard sound source culling is now handled by the SoundManager.
2021-11-04 16:05:31 -04:00
Andreas Stöckel
6f2e311c58
Fade out sound sources that are no longer close
...
* Handle culling of all sound sources in a separate function cull3DSound
* Add two new settings Sound::sfx fade in duration and Sound::sfx fade out duration
2021-11-04 16:05:31 -04:00
Andreas Stöckel
1583252dd8
Improve sound fading
...
* Implement a more general SoundBase::setFade that can be used to fade to any desired
volume and not just fading out
* Implement SoundBase::setFadeout by using SoundBase::setFade
* Implement an exponential fade mode
2021-11-04 16:05:31 -04:00
Evil Eye
4a6464ea67
Stop trying to play non-existent music files started by scripts
2021-10-13 22:40:07 +02:00
Cédric Mocquillon
c2df0949e2
Change normalizeFilename signature
2021-09-14 18:09:55 +02:00
Cédric Mocquillon
d4e26746a3
Use recurse subdirectory iterator to iterate over the VFS without exposing internal details
2021-09-14 18:09:54 +02:00
jvoisin
5840279f16
Use default
instead of empty constructors/destructors
...
See https://pvs-studio.com/en/docs/warnings/v832/ for details
2021-06-24 00:26:15 +02:00
Dan Church
70a0229010
Fix future FFMpeg API changes
...
avcodec_find_decoder now returns const AVCodec*.
2021-06-01 10:56:48 -05:00
Andrei Kortunov
963e1b8b3f
Fix MSVC's C4244 warnings
2021-05-12 10:34:40 +04:00
fredzio
efb241f1de
Use override instead of virtual
2021-04-11 14:46:51 +02:00
elsid
9275dd2dcb
Avoid virtual dispatch in SoundManager dtor
2021-03-13 18:25:56 +01:00
elsid
b0311ce9f1
Remove DEFAULT_OUTPUT macros
2021-03-13 18:25:56 +01:00
elsid
e30a59772c
Remove DEFAULT_DECODER macros
2021-03-13 18:25:48 +01:00
Gleb Mazovetskiy
1db7d2ec4e
Restore compatibility with FFMpeg < 57.80.100
...
This should fix macOS Travis build broken by 58d33aa95b729d81c236a587b59352c6a7c7f017
2021-03-08 19:29:34 +00:00
Gleb Mazovetskiy
58d33aa95b
AV: Fix all memory leaks
...
The most substantial memory leak came from `PacketQueue::get`
not unreferencing its argument packet.
Other leaks came from using `av_free` instead of type-specific free
functions.
Also modifies `PacketQueue::put` for readability.
2021-03-08 03:16:55 +00:00
elsid
a6aba83741
Remove redundant SoundManager::lookupSound and loadSound
2021-01-09 14:11:49 +01:00
elsid
e4cce88142
Replace std::tie by structured binding
2021-01-09 14:09:27 +01:00
elsid
90c8e77e2c
Remove redundant default Sound_Buffer fields initialization
2021-01-09 14:08:54 +01:00
elsid
24f8a2db27
Use perfect forwarding in Sound_Buffer ctor
2021-01-09 14:07:30 +01:00
elsid
944033db4e
Separate sound buffer pool from sound manager
2021-01-09 02:45:21 +01:00
Andrei Kortunov
8084a336b5
Replace zeroes and nulls by nullptrs
2020-11-29 11:14:07 +04:00
Alexei Dobrohotov
53f91a3aa5
Merge pull request #3018 from akortunov/emplace
...
Use emplace_back instead of push_back
2020-11-01 01:58:56 +03:00
Andrei Kortunov
64ba81ecf2
Fix some issues, found by CoverityScan
2020-10-28 18:02:31 +04:00
unknown
eae9eafb8c
Merge branch 'master' of gitlab.com:OpenMW/openmw into regionsounds
2020-10-25 14:13:14 +01:00
unknown
eebb320916
Wait for the previous sound to stop
2020-10-25 12:20:14 +01:00
Bret Curtis
f6bead88a9
purge boost/optional.hpp headers
2020-10-25 00:58:44 +02:00
Bret Curtis
62b0781f7d
use std::optional instead of boost::optional
2020-10-25 00:33:41 +02:00
unknown
1ce296aa7f
Use fallback values for region sounds and fix probability
2020-10-24 18:54:46 +02:00
Andrei Kortunov
065ed5138e
Use emplace_back instead of push_back
2020-10-18 10:27:35 +04:00
Andrei Kortunov
8ca3c3b123
Mark overrided methods by override keyword
2020-10-16 22:18:54 +04:00
elsid
9240833bda
Init sound by a single object
2020-07-15 19:46:34 +02:00
elsid
1c9ce03575
Lookup sound when need to fade out
2020-07-08 22:43:16 +02:00
elsid
624baa6d89
Check distance to object before load sound
2020-07-07 21:19:00 +02:00
Bret Curtis
67c2f0b26c
Merge pull request #2951 from elsid/sound_object_pool
...
Store SoundManager sounds and streams in object pool
2020-07-06 07:18:46 +02:00
Bret Curtis
0c2fea8254
Merge pull request #2932 from elsid/replace_open_threads
...
Replace OpenThreads by std types
2020-07-04 13:11:23 +02:00
elsid
02f9b44f01
Use RAII for object ptr from pool
2020-07-04 01:15:27 +02:00
elsid
6ca29c6107
Use common type for pool of sounds and streams
2020-07-04 01:09:04 +02:00
elsid
b424aac25e
Choose next action for water sound in a separate function
2020-07-03 21:04:25 +02:00
elsid
080b0d6319
Remove unused duration from updateWaterSound
2020-07-03 21:01:48 +02:00
elsid
6ab1a1f907
Make last cell a field of SoundManager and initialize
2020-07-02 19:28:58 +02:00
elsid
3fa1e7ebaf
Make time passed SoundManager field
2020-07-02 19:28:58 +02:00
elsid
a36a55bfb5
Clamp sound volume on settings update
2020-07-02 06:38:20 +02:00
elsid
439891ef53
Put logic to update water sound id and volume into a separate class
2020-07-01 17:49:39 +02:00
Bret Curtis
3d7f8a573a
Merge pull request #2941 from elsid/lookup_stop_sound
...
Lookup sound when need to stop
2020-07-01 17:30:23 +02:00
elsid
0594b7d1a0
Put logic for the next region sound selection into a separate class
2020-06-30 23:23:37 +02:00