Andrei Kortunov
b15bed8e22
Avoid excessive loadSound calls
7 years ago
Chris Robinson
074be7d7c6
Remove a function from the sound manager interface
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
27eeaf90d0
Use unordered_map for the music playlist and sound buffer caches
7 years ago
Chris Robinson
1fe60dd8e2
Replace some shared_ptrs with pointers to deque entries
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
7b8278ae45
remove redundant mMusicFader variable
8 years ago
Lennart Bernhardt
60a7d3d6e0
Fade out music before change occurs
8 years ago
Bret Curtis
d785344fad
purge all instances of <boost/shared_ptr.hpp>, clean up unused headers
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
c34d85ffc2
Implement water sounds ( Closes #451 )
8 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
604b5d24e9
Use a ConstPtr in SoundManager
9 years ago
scrawl
53158d29b1
stopSound crash fix
9 years ago
Marc Zinnschlag
e0c9265148
Merge remote-tracking branch 'origin/master'
9 years ago
scrawl
86881bcf39
In first person mode, attach sound listener to the camera
9 years ago
Chris Robinson
3a39a92b93
Keep track of audio tracks
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
Alexander "Ace" Olofsson
24340bff95
Add a space
9 years ago
Alexander "Ace" Olofsson
6823298516
Different way to solve the type deduction issue
9 years ago
Alexander "Ace" Olofsson
a69e751089
Revert "Fix windows builds"
...
This reverts commit b085c09f86
.
9 years ago
Alexander "Ace" Olofsson
b085c09f86
Fix windows builds
...
Can't instantiate a container (at least with MSVC) without knowing the exact size of the object being stored, forward-declares only work with pointers.
I couldn't see a simple way to remove the forward declare, so pointers and memory management it is.
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
21bb2e9314
Use a deque for loudness buffers with a map lookup
...
Similar to Sound_Buffer, this allows individual Sound_Loudness objects to
retain a constant pointer when new ones are inserted on to the end.
9 years ago
Chris Robinson
82f3651f81
Treat the sound offset as the offset in seconds
9 years ago
Chris Robinson
8b7587f9a6
Track whether a sound is 3D
9 years ago
Chris Robinson
d4238a6d91
Add config options for the sound buffer cache size
...
The cache size is specified with a min/max range, intended to avoid constant
unloading once the limit is reached. This way, buffers can be unloaded down to
a reasonable mimimum, allowing some more buffers to be subsequently loaded
without causing more unloading.
9 years ago
Chris Robinson
8715add72f
Store sound buffers in a deque that's filled in as needed
...
A deque allows existing Sound_Buffer references to remain valid as long as new
ones are back-inserted. These references can be used instead of indices.
9 years ago
Chris Robinson
aac903484c
Remove a really unnecessary method
9 years ago
Chris Robinson
73448c72f6
Replace Play_NoTrack with playManualSound3D, and rename the latter
9 years ago
Chris Robinson
caae305ddd
Use a sorted list for unused buffers
...
Helps ensure the buffers being unloaded due to cache limits are not likely to
be needed anytime soon.
9 years ago
Chris Robinson
3ce6aee98b
Return a decoder from the loadVoice function
9 years ago
Chris Robinson
24f8c78fca
Store sound buffer references by index instead of string
9 years ago
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.
9 years ago
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.
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
0f33f41d8d
Actually unload sounds when running over
9 years ago
Chris Robinson
22a6811425
Limit the sound buffer cache to 15MB
9 years ago
Chris Robinson
0b2747098c
Keep track of unused sound buffers
9 years ago
Chris Robinson
e362896817
Combine some duplicate code
9 years ago
Chris Robinson
febc7b510a
Remove an unneeded method
9 years ago
Chris Robinson
3fdc3c4ea9
Use a separate map for say sounds
...
Also restores lip movement
9 years ago
Chris Robinson
9d0018e1bc
Reorder active sound data to make lookup by Ptr better
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
e2beefd8b5
Store info calculated from the ESM::Sound record
9 years ago
scrawl
152d690a7a
Minor cleanup
10 years ago
scrawl
7a3bc69df7
Readded sound listener
10 years ago