Commit Graph

146 Commits (move)

Author SHA1 Message Date
Chris Robinson 1ccddefe28 Properly report the default device when opening sound fails 13 years ago
Chris Robinson 2f0af42261 Use the ALC_ENUMERATE_ALL_EXT extension with OpenAL when available 13 years ago
Chris Robinson 15317796bf Handle the wav -> mp3 extension conversion in the sound output backend 13 years ago
Chris Robinson f11e3e39a1 Add an enumerate method to the sound output interface 13 years ago
Chris Robinson 8c5f85ca83 Use a local variable to mark sound streams as finished while processing
This avoids a race condition where the source can underrun while the final
buffers are being queued and the sound can be detected as stopped
13 years ago
Chris Robinson 0d973ac8ff Use the vector's data field instead of the address of the first element
Same thing really, but less convoluted
13 years ago
Chris Robinson 26a441f29a Add a readAll method to the sound decoder, for potentially more efficient reading 13 years ago
Chris Robinson fd37a4827c Enforce a 15MB limit on the sound buffer cache 13 years ago
Chris Robinson 6c45d6668b Cache OpenAL buffers for easy reuse 13 years ago
Chris Robinson 91821ccd8c Add the sound stream to the thread after resetting the mIsFinished flag 13 years ago
Chris Robinson db46bf39b3 Add a rewind method to the sound decoder 13 years ago
Chris Robinson afa2cb6de7 Stop trying to read decoded audio once it's finished 13 years ago
Chris Robinson 4f69972a9c Add a method to stream a sound in 3D 13 years ago
Chris Robinson ae8218bf03 Allocate OpenAL sources when opening the device
This allows sources to be more efficiently retrieved and returned
13 years ago
Chris Robinson 8f9d4ff841 Use 6 125ms buffers for OpenAL streams 13 years ago
Chris Robinson dc6354b2f9 Add functions to get string names for sample types and channel configs 13 years ago
Chris Robinson 4a0b5b7918 Increase the sound stream thread sleep time to 50ms 13 years ago
Chris Robinson 4698e8c0a2 Make the sound stream thread object per-device 13 years ago
Chris Robinson 2c27827e4f Add some comment markers to the OpenAL sound classes 13 years ago
Chris Robinson e234b90173 Use a loop to find the OpenAL format from the decoder format 13 years ago
Chris Robinson 6a256d3993 Make sure the OpenAL stream list is clear before shutting down 13 years ago
Chris Robinson 7194114669 Use a background thread to keep OpenAL streams fed
Maybe this could be moved to the SoundManager instead of in OpenAL, but it's
good enough for now.
13 years ago
Chris Robinson b938fd7b36 Make the sound output init return void 13 years ago
Chris Robinson 1965b5bc79 Rename some Sound class member functions 13 years ago
Chris Robinson 403e51cef3 Move the sample type and channel config enums to MWSound and give use appropriate names for the values 13 years ago
Chris Robinson efae7dfe83 Rename some sound decoder class member variables and functions 13 years ago
Chris Robinson 9656456d30 Make sure the sound decoders are closed when they're finished with 13 years ago
Chris Robinson 362e254720 Rename some more sound class member variables and functions 13 years ago
Chris Robinson 2f92559fc7 Use OpenAL's linear attenuation model
We should use the inverse distance clamped model (the default), but we first
need to handle muting sounds that are beyond their max distance. Linear
attenuation doesn't give a proper rolloff, but it makes the sounds silent at
max distance.
13 years ago
Chris Robinson f7ac94d686 Pass the new position to the sound update method 13 years ago
Chris Robinson 44fc204864 Avoid passing a sound decoder to the play methods 13 years ago
Chris Robinson 7160d20db3 Be more consistent with the vector orientations given the sound handler 13 years ago
Chris Robinson 87adf6002a Fix a copy-paste typo in the openal output 13 years ago
Chris Robinson 5563f583ff Add and implement methods to update tracked sounds on an object 13 years ago
Chris Robinson 979ae89aab Pass volume and pitch parameters to streamed sounds 13 years ago
Chris Robinson cac07d0fbf Remove some unnecessary methods 13 years ago
Chris Robinson d57051375d Implement non-streaming sounds with OpenAL 13 years ago
Chris Robinson 656863ec6e Add functions to play sounds 13 years ago
Chris Robinson a46f8ced05 Keep the sound output's listener updated with the camera position 13 years ago
Chris Robinson 2dabdcb9e5 Add a function to update the sound listener 13 years ago
Chris Robinson 2429755bf1 Make the sound's Play method return void 13 years ago
Chris Robinson caf5d71d44 Make the sound decoder's Open method return void
Errors are thrown, not returned
13 years ago
Chris Robinson 1b41987e18 Move OpenAL_SoundStream function definitions out of the class 13 years ago
Chris Robinson 1ade01edc8 Add a function to stream sounds 13 years ago
Chris Robinson 1322b1e160 Move Sound_Output's definition to a separate header 13 years ago
Chris Robinson 45b612ab3b Add a skeleton output classs using OpenAL 13 years ago