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
ea70b0baee
Don't store the buffer in the sound struct
2015-11-25 04:24:25 -08:00
Chris Robinson
fd7d58fe7e
Reset the sound handle back to null after unloading
2015-11-25 04:24:25 -08:00
Chris Robinson
4801661b34
Stop all sounds of the given id
2015-11-25 04:24:25 -08:00
Chris Robinson
8a69f676ec
Remove some duplicate code
2015-11-25 04:24:25 -08:00
Chris Robinson
45628316f8
Remove an unnecessary check
2015-11-25 04:24:25 -08:00
Chris Robinson
574c1923fe
Clear unused buffers after unloading them all
2015-11-25 04:24:25 -08:00
Chris Robinson
5ad772c3b3
Fix streaming sound time
2015-11-25 04:24:25 -08:00
Chris Robinson
3ce6aee98b
Return a decoder from the loadVoice function
2015-11-25 04:24:25 -08:00
Chris Robinson
24f8c78fca
Store sound buffer references by index instead of string
2015-11-25 04:24:24 -08:00
Chris Robinson
f7218f5a25
Use proper mutex mechanisms and don't check al errors in the stream thread
2015-11-25 04:24:24 -08:00
Chris Robinson
f9e18cd966
Prepare all Sound_Buffer objects when one is needed
...
This simply sets up the Sound record data to be used by the sound output. The
actual audio buffers, stored in the Sound_Handle, are still loaded on-demand.
2015-11-25 04:24:24 -08:00
Chris Robinson
6c3953766e
Use separate lists for the sound name and its buffer
...
This should make sound lookup a bit more efficient, especially when an integer
ID can be used.
2015-11-25 04:24:24 -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
f1a1dc8408
Pass relevant sound parameters to the OpenAL_SoundStream constructor
2015-11-25 04:24:24 -08:00
Chris Robinson
83721092f2
Refactor the audio streaming code to be a bit saner
2015-11-25 04:24:23 -08:00
Chris Robinson
16f72886e9
Use separate lists for openal sounds and streams
2015-11-25 04:24:23 -08:00
Chris Robinson
0f33f41d8d
Actually unload sounds when running over
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
0b2747098c
Keep track of unused sound buffers
2015-11-25 04:24:23 -08:00
Chris Robinson
4073495070
Add some missing sound handling
2015-11-25 04:24:23 -08:00
Chris Robinson
e362896817
Combine some duplicate code
2015-11-25 04:24:23 -08:00
Chris Robinson
febc7b510a
Remove an unneeded method
2015-11-25 04:24:23 -08:00
Chris Robinson
3fdc3c4ea9
Use a separate map for say sounds
...
Also restores lip movement
2015-11-25 04:24:22 -08:00
Chris Robinson
9d0018e1bc
Reorder active sound data to make lookup by Ptr better
2015-11-25 04:24:22 -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
f4c22ec49e
Hold a separate list for voice sound buffers
...
This fixes say. Ideally voices would be streamed, but the loudness/"lip" buffer
extraction should be separated from the buffer loading code.
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
Chris Robinson
e2beefd8b5
Store info calculated from the ESM::Sound record
2015-11-25 04:24:22 -08:00
scrawl
edfcb45ad7
Fix crash when onPcEquip script removes the equipped item ( Fixes #3016 )
2015-11-24 22:55:17 +01:00
cfcohen
e0752ccdd0
Prioritize warning about user settings. Make recommendations for
...
screen number more generic. Remove resolution recommendation.
2015-11-24 00:10:23 -05:00
scrawl
1b77428c59
Use const reference, thanks ace13
2015-11-24 03:42:35 +01:00
scrawl
dca1674133
Merge remote-tracking branch 'upstream/openmw-37' into HEAD
2015-11-24 03:30:57 +01:00
cfcohen
6882e6451a
Remove tabs. :-[
2015-11-23 20:18:39 -05:00
cfcohen
9a975a2e68
Substantial rewrite of code to save settings.cfg file, allowing
...
comments to persist, ordering of settings to be retained, additional
reporting of changed settings, preservation of the settings.cfg
timestamp when no changes are made, and foundational changes for
possible future features. Due to poor interaction with the
openmw-launcher settings code, the launcher will still discard all of
these benefits.
2015-11-23 20:17:26 -05:00
cfcohen
89100088f3
The latest version of the settings.cfg without any code changes.
2015-11-23 20:07:48 -05:00
cfcohen
d7e27fa9f4
New brief comments version of settings.cfg.
2015-11-23 16:36:59 -05:00
cfcohen
89329dfbaf
Merge remote-tracking branch 'upstream/master'
2015-11-23 16:33:15 -05:00
sandstranger
16c6816a6f
add forgotten file for building on opengles
2015-11-23 20:42:30 +03:00
sandstranger
69acacefff
openmw building on Android with Opengl es
2015-11-23 20:28:35 +03:00
Marc Zinnschlag
da856eed95
Merge remote-tracking branch 'origin/master'
2015-11-23 18:17:36 +01:00
scrawl
3fe38e3556
Remove unused setting
2015-11-23 03:26:21 +01:00
cfcohen
7b64b35eb3
Added comments (and commentary) to the settings-default.cfg file.
2015-11-22 19:28:09 -05:00
scrawl
71cd57a3b5
Optimize World::getTimeStamp
...
World::getTimeStamp was searching through the globals store on every call. Not a big issue, but slow enough to show up in the profiler.
2015-11-22 23:55:21 +01:00
scrawl
38510a56c2
GeomMorpherController: do not dirty the MorphGeometry unless necessary
2015-11-22 21:24:00 +01:00
scrawl
0d49c7fa51
GeomMorpherController: fix double update of MorphGeometry
2015-11-22 21:23:46 +01:00
scrawl
28b20428b9
Remove dynamic_cast in GeomMorpherController
2015-11-22 20:33:22 +01:00
scrawl
94e8560bf8
RigGeometry: do not allocate new NodePath every frame
2015-11-22 20:01:09 +01:00
scrawl
6d5aa272fc
RigGeometry: do not update the geomToSkelMatrix more than once per frame
2015-11-22 19:54:27 +01:00