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
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
Chris Robinson
2face3d0a9
Combine duplicate code
9 years ago
Chris Robinson
1407366e51
Use a premade SoundStream object for the output's streamSound functions
9 years ago
Chris Robinson
2ee3265b66
Use a premade Sound object for the output's playSound functions
9 years ago
Chris Robinson
2883cdba5c
Initialize the Sound object before modifying the pitch variable
9 years ago
Chris Robinson
a6db96b2d8
Update sound and stream parameters
9 years ago
Chris Robinson
4bd235284b
Rename a couple members to avoid confusion
9 years ago
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.
9 years ago
Chris Robinson
816015d6e6
Avoid inheriting from Sound for sound types
9 years ago
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.
9 years ago
Chris Robinson
0f05ccf72a
Use a non-recursive mutex and properly end the streaming thrread
9 years ago
Chris Robinson
b5ed2e65f8
Add a method to get the sound stream delay
...
This helps avoid a lock during the movie player's read method, since it needs
to sync with the current playback position which would otherwise need to get
the movie decoder's current position.
9 years ago
Chris Robinson
f3c035907c
Rename Sound::update to Sound::applyUpdates
9 years ago
Chris Robinson
9568aa6a84
Use a condition variable to wake up the audio stream thread
...
This should make starting streams a bit more responsive, and allows us to do
more in it that really shouldn't wait for its next wake up.
9 years ago
Chris Robinson
82f3651f81
Treat the sound offset as the offset in seconds
9 years ago
Chris Robinson
8f08ca9cba
Revert "Avoid unsafe sizeof(x)/sizeof(x[0]) constructs for array counting"
...
This reverts commit 0d4fea896c
.
9 years ago
Chris Robinson
0d4fea896c
Avoid unsafe sizeof(x)/sizeof(x[0]) constructs for array counting
9 years ago
Chris Robinson
a1bdb544db
Avoid an unnecessary string copy
9 years ago
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.
9 years ago
Chris Robinson
ea70b0baee
Don't store the buffer in the sound struct
9 years ago
Chris Robinson
45628316f8
Remove an unnecessary check
9 years ago
Chris Robinson
5ad772c3b3
Fix streaming sound time
9 years ago
Chris Robinson
f7218f5a25
Use proper mutex mechanisms and don't check al errors in the stream thread
9 years ago
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.
9 years ago
Chris Robinson
eee6a19e31
Add a method to stream sounds in 3D
9 years ago
Chris Robinson
f1a1dc8408
Pass relevant sound parameters to the OpenAL_SoundStream constructor
9 years ago
Chris Robinson
83721092f2
Refactor the audio streaming code to be a bit saner
9 years ago
Chris Robinson
16f72886e9
Use separate lists for openal sounds and streams
9 years ago
Chris Robinson
22a6811425
Limit the sound buffer cache to 15MB
9 years ago
Chris Robinson
495e138907
Load sound loudness and store it with the Sound_Buffer
...
Still not used for say yet, though
9 years ago
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.
9 years ago
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.
9 years ago
scrawl
84fd682e4e
Fix for unnecessary exceptions when opening sounds
...
This would throw often during normal play, even though the throws are caught and ignored, can be annoying when the debugger is set to 'catch throw'.
10 years ago
scrawl
7a3bc69df7
Readded sound listener
10 years ago
scrawl
8c7c89a4aa
Port SoundManager
10 years ago
dteviot
e197f5318b
fixing MSVC 2013 warning C4244: & C4305
...
conversion from 'const float' to 'int', possible loss of data
conversion from 'double' to 'int', possible loss of data
conversion from 'float' to 'int', possible loss of data
10 years ago
scrawl
855fe33c59
Add vanilla-compatible range limiting for playloopsound ( Fixes #244 , Fixes #1342 )
10 years ago
scrawl
cf85cbbc8e
Switch sound distance model to AL_INVERSE_DISTANCE
10 years ago
scrawl
a59620f643
Cache loudness vector in the buffer cache
11 years ago
scrawl
598c0c4ae7
Implement mouth animation for NPCs based on say sound ( Fixes #642 )
11 years ago
slothlife
f33559fead
Fixes for MSVC warnings, less overall changes
...
Kept some fixes from the first round of review. Found out that several
targets weren't being built with the same basic warnings disabled.
Disabled a few warnings for external libraries specifically, rather than
applying them to all targets.
11 years ago
slothlife
c160a04ede
Revert "Fixes for warnings when building with MSVC"
...
This reverts commit 46eb20b98c
.
11 years ago
slothlife
46eb20b98c
Fixes for warnings when building with MSVC
...
Most warnings are innocuous (wrong type-specifier for forward
declarations, conversion of literals into unsigned integers, warnings
about methods optimized out), but I believe actual bugs were revealed in
vartypedelegate.cpp and combat.cpp.
11 years ago
Bret Curtis
ab224f93c9
remove our stdint.h version that uses boost and force usage of system stdint.h
11 years ago
Marc Zinnschlag
736644de05
Revert "#1041 in progress: decode first sample batch right in OpenAL_SoundStream::play()"
...
This reverts commit 51fb9f65ea
.
11 years ago
Nikolay Kasyanov
51fb9f65ea
#1041 in progress: decode first sample batch right in OpenAL_SoundStream::play()
11 years ago
Nikolay Kasyanov
5e8cb2e466
Another attempt to fix #1041 . This time I'm sending real data from decoder
...
once after playback started.
11 years ago