openal-soft/android.git
12 years agoRemoved duplicate file in Android.mk file list.master
Martins Mozeiko [Sun, 5 Feb 2012 21:11:28 +0000 (5 13:11 -0800)]
Removed duplicate file in Android.mk file list.

12 years agoFixed incorrect pthread_key usage.
Martins Mozeiko [Sun, 5 Feb 2012 20:15:42 +0000 (5 12:15 -0800)]
Fixed incorrect pthread_key usage.

12 years agoUpdated android backend.
Martins Mozeiko [Fri, 3 Feb 2012 05:08:05 +0000 (2 21:08 -0800)]
Updated android backend.

12 years agoMerge branch 'master' of git://repo.or.cz/openal-soft
Martins Mozeiko [Fri, 3 Feb 2012 05:07:17 +0000 (2 21:07 -0800)]
Merge branch 'master' of git://repo.or.cz/openal-soft

12 years agoRemoved project files that are generated by "android update project" step.
Martins Mozeiko [Fri, 3 Feb 2012 04:22:17 +0000 (2 20:22 -0800)]
Removed project files that are generated by "android update project" step.

12 years agoUse an enum for static const values
Chris Robinson [Tue, 31 Jan 2012 11:43:52 +0000 (31 03:43 -0800)]
Use an enum for static const values

12 years agoMake the EFX preset values explicit floats
Chris Robinson [Tue, 31 Jan 2012 10:57:22 +0000 (31 02:57 -0800)]
Make the EFX preset values explicit floats

12 years agoImplement capture for the DirectSound backend
Chris Robinson [Tue, 31 Jan 2012 09:47:59 +0000 (31 01:47 -0800)]
Implement capture for the DirectSound backend

Based on a patch by Jeffrey Knockel <jeff250.at.gmail.com>

12 years agoOnly initialize the default reverb effect when a slot is available
Chris Robinson [Mon, 30 Jan 2012 06:49:17 +0000 (29 22:49 -0800)]
Only initialize the default reverb effect when a slot is available

12 years agoReorder a couple effect presets
Chris Robinson [Mon, 30 Jan 2012 06:16:39 +0000 (29 22:16 -0800)]
Reorder a couple effect presets

12 years agoav_find_stream_info is also deprecated, in favor of avformat_find_stream_info
Chris Robinson [Mon, 30 Jan 2012 04:06:30 +0000 (29 20:06 -0800)]
av_find_stream_info is also deprecated, in favor of avformat_find_stream_info

12 years agoUse AVMEDIA_TYPE_AUDIO instead of the deprecated CODEC_TYPE_AUDIO
Chris Robinson [Mon, 30 Jan 2012 00:21:57 +0000 (29 16:21 -0800)]
Use AVMEDIA_TYPE_AUDIO instead of the deprecated CODEC_TYPE_AUDIO

12 years agoAdd some more reverb presets
Chris Robinson [Sat, 28 Jan 2012 07:15:16 +0000 (27 23:15 -0800)]
Add some more reverb presets

12 years agoUse sizeof(ALfloat) when finding the max stepping value
Chris Robinson [Fri, 27 Jan 2012 06:33:36 +0000 (26 22:33 -0800)]
Use sizeof(ALfloat) when finding the max stepping value

The mixer always reads from floats, so the size of the storage type is
unimportant.

12 years agoPass the uncompressed sample count to LoadData and ConvertData for IMA4
Chris Robinson [Fri, 27 Jan 2012 00:49:11 +0000 (26 16:49 -0800)]
Pass the uncompressed sample count to LoadData and ConvertData for IMA4

12 years agoMake sure context attributes are specified for loopback devices
Chris Robinson [Fri, 27 Jan 2012 00:31:46 +0000 (26 16:31 -0800)]
Make sure context attributes are specified for loopback devices

12 years agoMake sure InitializeEffect on the default slot doesn't set a context error
Chris Robinson [Thu, 26 Jan 2012 22:46:52 +0000 (26 14:46 -0800)]
Make sure InitializeEffect on the default slot doesn't set a context error

12 years agoReturn the error code from UpdateDeviceParams
Chris Robinson [Thu, 26 Jan 2012 04:00:34 +0000 (25 20:00 -0800)]
Return the error code from UpdateDeviceParams

12 years agoMake sure the attributes list specifies a format for loopback devices
Chris Robinson [Thu, 26 Jan 2012 03:54:55 +0000 (25 19:54 -0800)]
Make sure the attributes list specifies a format for loopback devices

12 years agoAvoid a bit of code duplication
Chris Robinson [Thu, 26 Jan 2012 03:32:10 +0000 (25 19:32 -0800)]
Avoid a bit of code duplication

12 years agoDon't process a default device slot if it doesn't exist
Chris Robinson [Thu, 26 Jan 2012 02:48:26 +0000 (25 18:48 -0800)]
Don't process a default device slot if it doesn't exist

12 years agoFix a typo
Chris Robinson [Tue, 24 Jan 2012 23:11:23 +0000 (24 15:11 -0800)]
Fix a typo

12 years agoSome cleanups for the reverb list
Chris Robinson [Tue, 24 Jan 2012 21:29:33 +0000 (24 13:29 -0800)]
Some cleanups for the reverb list

12 years agoSet the source's slot send parameter to NULL if it's the AL_EFFECT_NULL type
Chris Robinson [Mon, 23 Jan 2012 14:29:03 +0000 (23 06:29 -0800)]
Set the source's slot send parameter to NULL if it's the AL_EFFECT_NULL type

12 years agoLink with AudioToolbox.framework for the CoreAudio backend if it's found
Chris Robinson [Mon, 23 Jan 2012 11:45:04 +0000 (23 03:45 -0800)]
Link with AudioToolbox.framework for the CoreAudio backend if it's found

12 years agoAvoid duplicating some initialization code
Chris Robinson [Sat, 21 Jan 2012 00:23:15 +0000 (20 16:23 -0800)]
Avoid duplicating some initialization code

12 years agoHonor the disabled effects for the default reverb
Chris Robinson [Fri, 20 Jan 2012 23:56:32 +0000 (20 15:56 -0800)]
Honor the disabled effects for the default reverb

12 years agoNot all devices will have a default effect slot
Chris Robinson [Fri, 20 Jan 2012 20:53:41 +0000 (20 12:53 -0800)]
Not all devices will have a default effect slot

12 years agoFix WaveIn shutdown for real
Chris Robinson [Fri, 20 Jan 2012 20:36:23 +0000 (20 12:36 -0800)]
Fix WaveIn shutdown for real

The processing thread must be messaged when shutting down, and depending on the
state of the device, waveInReset may not do it. Additionally, all buffers must
be removed from the device before they can be unprepared and the device closed.

12 years agoRemove an unnecessary else statement
Chris Robinson [Fri, 20 Jan 2012 20:20:24 +0000 (20 12:20 -0800)]
Remove an unnecessary else statement

12 years agoAlways message the WinMM processing thread when a buffer is done
Chris Robinson [Fri, 20 Jan 2012 20:06:31 +0000 (20 12:06 -0800)]
Always message the WinMM processing thread when a buffer is done

So the processing thread can keep track of completed buffers when shutting
down, too.

12 years agoFix a possible race condition when shutting down WinMM devices
Chris Robinson [Fri, 20 Jan 2012 11:02:21 +0000 (20 03:02 -0800)]
Fix a possible race condition when shutting down WinMM devices

If the processing threads are interrupted between the shutdown check and re-
adding the buffer back to the device, the device can be left with a buffer that
will get unprepared and freed while in use.

12 years agoAdd a default-reverb config option, and rename __ALSOFT_FORCE_REVERB to match
Chris Robinson [Fri, 20 Jan 2012 09:51:27 +0000 (20 01:51 -0800)]
Add a default-reverb config option, and rename __ALSOFT_FORCE_REVERB to match

12 years agoInstall efx-presets.h
Chris Robinson [Fri, 20 Jan 2012 06:30:12 +0000 (19 22:30 -0800)]
Install efx-presets.h

12 years agoAdd the ability to specify a preset for forced reverb
Chris Robinson [Fri, 20 Jan 2012 04:02:57 +0000 (19 20:02 -0800)]
Add the ability to specify a preset for forced reverb

12 years agoAdd a global option to apply a reverb effect on source send 0
Chris Robinson [Fri, 20 Jan 2012 03:30:03 +0000 (19 19:30 -0800)]
Add a global option to apply a reverb effect on source send 0

A special slot on the device is created and processed, so it can be shared
across all contexts on the device. Sources that don't have a slot set on send 0
will use this special slot instead.

12 years agoAvoid printing messages about device parameter changes in the backends
Chris Robinson [Wed, 18 Jan 2012 00:38:58 +0000 (17 16:38 -0800)]
Avoid printing messages about device parameter changes in the backends

12 years agoReport parameter request changes in UpdateDeviceParams
Chris Robinson [Tue, 17 Jan 2012 23:55:37 +0000 (17 15:55 -0800)]
Report parameter request changes in UpdateDeviceParams

12 years agoChange the default output format to 32-bit float
Chris Robinson [Tue, 17 Jan 2012 23:38:36 +0000 (17 15:38 -0800)]
Change the default output format to 32-bit float

12 years agoRetry opening the PortAudio device with 16-bit short if 32-bit float output fails
Chris Robinson [Tue, 17 Jan 2012 23:26:22 +0000 (17 15:26 -0800)]
Retry opening the PortAudio device with 16-bit short if 32-bit float output fails

12 years agoRetry opening the DSound device with 16-bit short if 32-bit float output fails
Chris Robinson [Tue, 17 Jan 2012 20:38:47 +0000 (17 12:38 -0800)]
Retry opening the DSound device with 16-bit short if 32-bit float output fails

12 years agoRetry opening the WinMM device with 16-bit short if 32-bit float output fails
Chris Robinson [Tue, 17 Jan 2012 20:21:52 +0000 (17 12:21 -0800)]
Retry opening the WinMM device with 16-bit short if 32-bit float output fails

12 years agoSupport 32-bit float in the WinMM backend
Chris Robinson [Tue, 17 Jan 2012 20:17:41 +0000 (17 12:17 -0800)]
Support 32-bit float in the WinMM backend

12 years agoSafely insert the new context into the list
Chris Robinson [Thu, 12 Jan 2012 14:13:24 +0000 (12 06:13 -0800)]
Safely insert the new context into the list

12 years agoAdd some casts
Chris Robinson [Wed, 11 Jan 2012 08:55:02 +0000 (11 00:55 -0800)]
Add some casts

12 years agoThere's no need to pass a buffer to avio_alloc_context
Chris Robinson [Wed, 11 Jan 2012 08:43:24 +0000 (11 00:43 -0800)]
There's no need to pass a buffer to avio_alloc_context

12 years agoHandle a couple of special AVSEEK_ seek modes
Chris Robinson [Wed, 11 Jan 2012 08:32:16 +0000 (11 00:32 -0800)]
Handle a couple of special AVSEEK_ seek modes

12 years agoFix compiling the example program, and support AL_SOFT_buffer_samples with it
Chris Robinson [Tue, 10 Jan 2012 10:12:54 +0000 (10 02:12 -0800)]
Fix compiling the example program, and support AL_SOFT_buffer_samples with it

12 years agoFinalize AL_SOFT_buffer_samples
Chris Robinson [Tue, 10 Jan 2012 09:14:02 +0000 (10 01:14 -0800)]
Finalize AL_SOFT_buffer_samples

12 years agoRemove the unnecessary AL_MULAW_SOFT, AL_ALAW_SOFT, and AL_IMA4_SOFT defines
Chris Robinson [Tue, 10 Jan 2012 08:58:07 +0000 (10 00:58 -0800)]
Remove the unnecessary AL_MULAW_SOFT, AL_ALAW_SOFT, and AL_IMA4_SOFT defines

12 years agoAppend _SOFT to the AL_SOFT_buffer_samples enums
Chris Robinson [Tue, 10 Jan 2012 08:41:05 +0000 (10 00:41 -0800)]
Append _SOFT to the AL_SOFT_buffer_samples enums

12 years agoMake LockDevice, LockContext, etc, inline
Chris Robinson [Tue, 10 Jan 2012 07:37:03 +0000 (9 23:37 -0800)]
Make LockDevice, LockContext, etc, inline

12 years agoCheck earlier for ffmpeg
Chris Robinson [Mon, 2 Jan 2012 19:52:20 +0000 (2 11:52 -0800)]
Check earlier for ffmpeg

12 years agoRemove the warning when a context being released is globally current
Chris Robinson [Sun, 1 Jan 2012 23:36:31 +0000 (1 15:36 -0800)]
Remove the warning when a context being released is globally current

Just about every implementation allows this, and there's no direct harm caused
by it. However, leave the warnings for when it's still current on specific
threads, as this can cause issues.

12 years agoUse the device lock when removing the context from the device's list
Chris Robinson [Sun, 1 Jan 2012 23:22:58 +0000 (1 15:22 -0800)]
Use the device lock when removing the context from the device's list

12 years agoUse a proper typedef for handling atomic pointer swaps
Chris Robinson [Sun, 1 Jan 2012 23:00:03 +0000 (1 15:00 -0800)]
Use a proper typedef for handling atomic pointer swaps

12 years agoAdd an example program that streams audio using ffmpeg
Chris Robinson [Sun, 1 Jan 2012 20:36:41 +0000 (1 12:36 -0800)]
Add an example program that streams audio using ffmpeg

12 years agoUpdate some config option descriptions
Chris Robinson [Tue, 20 Dec 2011 09:45:29 +0000 (20 01:45 -0800)]
Update some config option descriptions

12 years agoUse a string to specify the resampler config option
Chris Robinson [Tue, 20 Dec 2011 09:36:01 +0000 (20 01:36 -0800)]
Use a string to specify the resampler config option

12 years agoUse a struct to associate channel enums and their angles
Chris Robinson [Tue, 20 Dec 2011 09:17:11 +0000 (20 01:17 -0800)]
Use a struct to associate channel enums and their angles

12 years agoRestore the old FPU mode if the effects fail to update with new device parameters
Chris Robinson [Tue, 20 Dec 2011 08:35:32 +0000 (20 00:35 -0800)]
Restore the old FPU mode if the effects fail to update with new device parameters

12 years agoUse an explicit 0 for the "no error" enums
Chris Robinson [Sat, 3 Dec 2011 16:27:51 +0000 (3 08:27 -0800)]
Use an explicit 0 for the "no error" enums

12 years agoReset the ALSA device if the number of available samples grows too large
Chris Robinson [Mon, 28 Nov 2011 18:24:24 +0000 (28 10:24 -0800)]
Reset the ALSA device if the number of available samples grows too large

12 years agoMake ALSA XRUN when the number of available samples exceeds the buffer size
Chris Robinson [Mon, 28 Nov 2011 17:12:30 +0000 (28 09:12 -0800)]
Make ALSA XRUN when the number of available samples exceeds the buffer size

12 years agoDon't fail to insert a map entry when the key exists and the limit is reached
Chris Robinson [Sat, 26 Nov 2011 11:52:07 +0000 (26 03:52 -0800)]
Don't fail to insert a map entry when the key exists and the limit is reached

12 years agoInitialize listener matrix to identity
Chris Robinson [Sat, 26 Nov 2011 11:37:37 +0000 (26 03:37 -0800)]
Initialize listener matrix to identity

12 years agoDefine TlsDestructor for Windows static builds, too
Chris Robinson [Sun, 13 Nov 2011 00:00:37 +0000 (12 16:00 -0800)]
Define TlsDestructor for Windows static builds, too

12 years agoUse loops to write reverb output
Chris Robinson [Wed, 2 Nov 2011 15:15:10 +0000 (2 08:15 -0700)]
Use loops to write reverb output

12 years agoUse a loop to write the modulator effect output
Chris Robinson [Wed, 2 Nov 2011 00:12:56 +0000 (1 17:12 -0700)]
Use a loop to write the modulator effect output

12 years agoUse panning for echo instead of specifying discrete channels
Chris Robinson [Tue, 1 Nov 2011 23:55:28 +0000 (1 16:55 -0700)]
Use panning for echo instead of specifying discrete channels

12 years agoAppend _SOFT to the ALC loopback format enums
Chris Robinson [Tue, 1 Nov 2011 23:00:47 +0000 (1 16:00 -0700)]
Append _SOFT to the ALC loopback format enums

12 years agoCalculate the listener matrix when a new orientation is specified
Chris Robinson [Sun, 30 Oct 2011 15:27:24 +0000 (30 08:27 -0700)]
Calculate the listener matrix when a new orientation is specified

This is so the matrix isn't derived each time a source is updated, and it will
make supporting user-defined matrices easier.

12 years agoDon't translate the listener velocity
Chris Robinson [Sun, 30 Oct 2011 12:49:17 +0000 (30 05:49 -0700)]
Don't translate the listener velocity

12 years agoDon't transform/translate vectors with an invalid listener orientation
Chris Robinson [Sun, 30 Oct 2011 12:47:14 +0000 (30 05:47 -0700)]
Don't transform/translate vectors with an invalid listener orientation

12 years agoAdd a work-around for cross-compiling with MinGW
Chris Robinson [Fri, 28 Oct 2011 04:22:00 +0000 (27 21:22 -0700)]
Add a work-around for cross-compiling with MinGW

12 years agoInitialize/Uninitialize COM as needed
Chris Robinson [Tue, 25 Oct 2011 05:11:16 +0000 (24 22:11 -0700)]
Initialize/Uninitialize COM as needed

12 years agoDon't close devices that are left open on lib shutdown
Chris Robinson [Mon, 24 Oct 2011 15:23:41 +0000 (24 08:23 -0700)]
Don't close devices that are left open on lib shutdown

12 years agoDon't update the device update parameters when PulseAudio does an async buffer update
Chris Robinson [Wed, 19 Oct 2011 23:07:56 +0000 (19 16:07 -0700)]
Don't update the device update parameters when PulseAudio does an async buffer update

It risks a deadlock, and though the UpdateSize won't change, we'll still fill
as much of the buffer as we can up to a multiple of it

12 years agoSet AL_STOPPED after setting AL_PLAYING when a source has nothing to play
Chris Robinson [Sat, 15 Oct 2011 17:33:30 +0000 (15 10:33 -0700)]
Set AL_STOPPED after setting AL_PLAYING when a source has nothing to play

12 years agoUse the local Device variable
Chris Robinson [Wed, 12 Oct 2011 05:30:58 +0000 (11 22:30 -0700)]
Use the local Device variable

12 years agoUse the local variable instead of re-reading the source property
Chris Robinson [Wed, 12 Oct 2011 05:29:06 +0000 (11 22:29 -0700)]
Use the local variable instead of re-reading the source property

12 years agoUse the square root to build the panning table instead of sin/cos
Chris Robinson [Mon, 10 Oct 2011 16:39:02 +0000 (10 09:39 -0700)]
Use the square root to build the panning table instead of sin/cos

12 years agoMark a couple more arrays with restrict
Chris Robinson [Sat, 8 Oct 2011 10:08:13 +0000 (8 03:08 -0700)]
Mark a couple more arrays with restrict

12 years agoReturn the key's value from the map when it's removed
Chris Robinson [Thu, 6 Oct 2011 13:39:13 +0000 (6 06:39 -0700)]
Return the key's value from the map when it's removed

12 years agoCheck for the HRTF object instead of a flag
Chris Robinson [Thu, 6 Oct 2011 08:16:07 +0000 (6 01:16 -0700)]
Check for the HRTF object instead of a flag

12 years agoAdd min/max/clamp methods for 64-bit int
Chris Robinson [Wed, 5 Oct 2011 05:39:35 +0000 (4 22:39 -0700)]
Add min/max/clamp methods for 64-bit int

12 years agoFix maximum BufferSize calculation
Chris Robinson [Wed, 5 Oct 2011 05:35:01 +0000 (4 22:35 -0700)]
Fix maximum BufferSize calculation

12 years agoRename a variable to avoid confusion
Chris Robinson [Wed, 5 Oct 2011 05:16:54 +0000 (4 22:16 -0700)]
Rename a variable to avoid confusion

12 years agoRemove some unneeded templates and parameters
Chris Robinson [Tue, 4 Oct 2011 16:55:36 +0000 (4 09:55 -0700)]
Remove some unneeded templates and parameters

12 years agoConvert samples to float when copying to the stack
Chris Robinson [Tue, 4 Oct 2011 16:47:08 +0000 (4 09:47 -0700)]
Convert samples to float when copying to the stack

12 years agoUse sample frames when handling the buffer length
Chris Robinson [Mon, 3 Oct 2011 17:07:50 +0000 (3 10:07 -0700)]
Use sample frames when handling the buffer length

12 years agoTrack the temp stack buffer using sample frames instead of bytes
Chris Robinson [Mon, 3 Oct 2011 12:58:04 +0000 (3 05:58 -0700)]
Track the temp stack buffer using sample frames instead of bytes

12 years agoMake sure GCC properly errors when checking visiblity attributes
Chris Robinson [Mon, 3 Oct 2011 05:12:31 +0000 (2 22:12 -0700)]
Make sure GCC properly errors when checking visiblity attributes

12 years agoDon't use a double when calculating the HRTF coefficients
Chris Robinson [Mon, 3 Oct 2011 05:05:03 +0000 (2 22:05 -0700)]
Don't use a double when calculating the HRTF coefficients

12 years agoMake a floating-point constant a float type
Chris Robinson [Mon, 3 Oct 2011 05:01:51 +0000 (2 22:01 -0700)]
Make a floating-point constant a float type

12 years agoDon't use inline asm with MSVC on 64-bit
Chris Robinson [Mon, 3 Oct 2011 04:44:08 +0000 (2 21:44 -0700)]
Don't use inline asm with MSVC on 64-bit

12 years agoGet rid of some unnecessary casting
Chris Robinson [Sun, 2 Oct 2011 23:54:45 +0000 (2 16:54 -0700)]
Get rid of some unnecessary casting

12 years agoRename some parameters
Chris Robinson [Sun, 2 Oct 2011 14:31:26 +0000 (2 07:31 -0700)]
Rename some parameters

12 years agoRemove the OriginalAlign buffer field, and calculate it as needed
Chris Robinson [Sun, 2 Oct 2011 02:52:07 +0000 (1 19:52 -0700)]
Remove the OriginalAlign buffer field, and calculate it as needed

12 years agoFix potential divide-by-0
Chris Robinson [Sat, 1 Oct 2011 15:37:42 +0000 (1 08:37 -0700)]
Fix potential divide-by-0