History log of /system/media/opensles/libopensles/IPresetReverb.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9a889c24ace7bbc9659e1531d7a61dc43452d7c0 06-Oct-2010 Glenn Kasten <gkasten@google.com> Interface testing and bug fixes

Add some new tests, and fix the bugs they found.

New and improved tests:
Added output mix API test with focus on interfaces.
Add mute solo and seek test cases to the automated buffer queue test.
Buffer queue configuration test is now listenable:
Buffer queue configuration test now generates a sequence of sine
waves in order so that the listener can tell if each format is
supported correctly.

Bug fixes:
Engine::Create... was not checking if the interface was available
for a particular class. Fixing that bug showed some other bugs
in the class/interface configuration tables.
The effects interfaces is available on an output mix.
The Volume interface is not available on an output mix.
The Object interface can do GetInterface before realized.
OutputMix interface is available on an OutputMix;
needed by the demos/examples in back of book
OutputMix::ReRoute fails if number of output device IDs is not 1.
Improve interface checks on a buffer queue source.
Don't allow mute solo interface on a mono buffer queue.
The earlier code to check for seek interface on a buffer queue
compared by address, which didn't work if application
used a private copy of the GUID. Now compares using the
MPH which will work in all cases.
Buffer queue, effect send, and mute solo are explicit interfaces on audio player.
slCreateEngine was not publishing the engine object.

Miscellaneous cleanup:
Removed the hard-coded fake device ID constants in
OutputMix::ReRoute that were there just for testing.
In Engine::Create..., log an error for all unsupported interfaces, not just the first one.
Make hash generator build again:
It turns out interfaces.c is needed, even though it duplicates
OpenSLESUT.c. Restore from 1a6bb4f8e738c9387dc9629db294ea5de618a53c.
Remove some redundant comments.

Change-Id: Iddabe73e298b69a44f3b43ed224c918eb95961a1
/system/media/opensles/libopensles/IPresetReverb.c
2a25d97e40dbd5dd9195195a3a269095a4932097 05-Oct-2010 Glenn Kasten <gkasten@google.com> Object an interface initialization/destroy cleanup

Prior to this, object and interface fields were being initialized
and deinitialized in random places. This resulted in some real and
potential leaks, especially in the case of partial object construction.
There were even some places where fields were not being initialized
at all.

Details:

Move destructor for AndroidEffectCapabilities from CEngine::Destroy
to IAndroidEffectCapabilities deinit hook.
Move destructor for equalizer preset names from CEngine::Destroy
to IEngine deinit hook.
In Object::Destroy, call deinitializer for each initialized interface,
regardless whether it was ever exposed.
Remove double initialization of mStepSize in IPlaybackRate constructor.
Remove obsolete logs.
Add expose hooks that are called when interface is requested in
Engine::Create... or by DynamicInterface::AddInterface.
Always initialize all interfaces, even if not exposed
Fix typos in same-line comments on INTERFACE_ constants.
Add new interface state INITIALIZED: uninitialized -> initialized -> exposed.
DynamicInterface::Remove sets interface state to initialized (but
not exposed), instead of uninitialized.
Add explicit constructor calls to initialize fields in C structs
(e.g. smart pointers), using placement new. See also build warning
which was turned off with -Wno-invalid-offsetof.
Add comments about per-instance fields not associated with an interface.
Add default initializations for all per-instance fields that are
not associated with an interface, in case the object is only partially
constructed and then needs to be destroyed due to an error.
Add placement new comments.
Update comments on private per-instance fields not associated with an interface.
Move effect clears from the containing object destructor
(CAudioPlayer_Destroy and COutputMix_Destroy) to the interface
destructor. In this process this caught a bug that environmental
reverb and preset reverb were not being destroyed properly for an
audio player.
Add comments on interface hooks.
Add entries for interface destructors.
Add placement new (explicit constructor) and explicit destructor calls
for C++ fields in C struct.
Fix template instantiation error.
Move explicit calls to IBufferQueue_Destroy (now renamed to
IBufferQueue_deinit) from CAudioPlayer_Destroy and CAudioRecorder_Destroy
to be implicit via the BufferQueue interface deinit hook.
ThreadSync interface destructor now logs a warning if
ThreadSync::EnterCriticalSection was active at Engine::Destroy
Add some comments.
Clean up gMonitorFp close code.
Fix typo in log message.
Fix DynamicInterface to handle distinction between UNINITIALIZED and
INITIALIZED states for an interface, and to call the optional expose hook.
Do not use memset per interface, because the size of the last interface is unknown.
Set the v-table pointer while lock is held.
Add curlies to if statements.
Log errors if interfaces active during Object::Destroy, instead of asserting.
Log a warning if interface requests an interface but it is not available,
and is optional.
Add log with the class name and address of each new object.
Mark only interfaces with init hooks as INITIALIZED; others are UNINITIALIZED.

Change-Id: Ibb9c1b5f21e6195af6b20b2f7a5c7157905b735b
/system/media/opensles/libopensles/IPresetReverb.c
68817ee6ff2ede1dac61078894d8920fb961061f 01-Sep-2010 Jean-Michel Trivi <jmtrivi@google.com> Support auxiliary effects on OutputMix, and direct and send levels
on AudioPlayer.

added global function for mB to attenuation conversion.

Change-Id: Ib7f92397786e4b2e21d6ad51585ac1b542ffab6c
/system/media/opensles/libopensles/IPresetReverb.c
f156301680273e71e56e898f98798f5b5b2431f6 03-Jul-2010 Glenn Kasten <gkasten@google.com> Trace debug support.

Add Enter/Leave interface macros for trace debugging.
3D interface methods do not block for now.
Line length 100.
Add blank lines between interface methods for clarity.

Change-Id: I412936e8574f95308731e41f8b854fe342cb04b6
/system/media/opensles/libopensles/IPresetReverb.c
437f9ab9914ea61112aa496a047162a0d22194cd 07-Jun-2010 Glenn Kasten <gkasten@google.com> Add note about bug in IMuteSolo channel count.

Change-Id: Iccb78019bbbffaa98eaa8877258d88a77c979e48

Remove spurious NDEBUG, init in same order as .h.

Change-Id: Ia30b30ce4dbc8f074632c275583b7ef6069141dc

Implement asynchronous Object.Realize

Added ThreadPool mechanism for asynchronous operations.
Fixed off-by-one bug in BufferQueue that didn't use the last buffer.
Added engine hooks for Realize and Destroy.
Realize hook and callback are now called with mutex unlocked.
Added new Object states realizing 1 and realizing 2, mapped to unrealized.
Asynchronous realize on an engine is forced to be synchronous.
Engine initialization now done at Realize, not during CreateEngine.

Change-Id: I9c11461dbeab97aec04f8266f268cfd16086b5a7

Port to Android.

Change-Id: I0fff9f32e4d374230ab940e00fe6b8429b143ed3

Shutdown the sync thread when engine is destroyed.

Change-Id: I197267e5eaa4a49cacb34bc6e6f9c6fa92b381b5

Mutex unlocked during the initialization phase of DynamicInterfaceManagement.AddInterface.

Change-Id: I16000a2c4f1f9e93075f08ac2eaad6a8f12ba9da

Dynamic interface removal is done with mutex unlocked.

Change-Id: I5317d859dee680ca1c96e803388f2475f7795099

Normalize SLboolean input parameters.

Store non-zero boolean value as SL_BOOLEAN_TRUE rather than original value.
Line length 100.

Change-Id: I867ae8dd328b1427be98dfd148e32fcba38ce409

More input parameter checks.

Line length 100.
Fix a few build warnings.

Change-Id: I78fb1415fed649e05a370cf60e015a7fe13ffe8c

Address code review comments.

Change-Id: Ic7f2c70ded42f3d0e5e92f173cf80e084e54fc89
/system/media/opensles/libopensles/IPresetReverb.c
050feed71109208b772e5be2e1a637b82f9d05fc 26-May-2010 Jean-Michel Trivi <jmtrivi@google.com> Move OpenSL ES library implementation to the libopensles folder.
Add an Android makefile for libopensles.

Change-Id: I1480bf46c7165cd35bb55aef1f11fb0a04fff88e
/system/media/opensles/libopensles/IPresetReverb.c