OSDN Git Service
Jean-Michel Trivi [Tue, 20 Jul 2010 22:59:13 +0000 (15:59 -0700)]
Add support for PCM audio recording in OpenSL ES.
- add support for the AudioRecorder object in Android, not just for
the conformance tests.
- map the SL AudioRecorder object to the AudioRecord class.
- only allow buffer queue data sinks.
- more work required for the recording format, and input device
selection.
Change-Id: I4c65a8fa0ab162036f0eed4b756431f465325cd3
Jean-Michel Trivi [Fri, 9 Jul 2010 20:35:02 +0000 (13:35 -0700)]
Use the AudioEffect framework to implement SLEqualizerItf.
EQ presets are stored in the engine because they need to be
available during the duration of the application, not just
during the life of the AudioPlayer that uses EQ.
Change-Id: Ib55ce32b54a4dca134831a87bc5bd2ae8c111035
Glenn Kasten [Wed, 14 Jul 2010 16:09:26 +0000 (09:09 -0700)]
Logging and comments to make testing easier.
Add utility function to print an IID.
checkDataFormat now prints a detailed log on invalid format.
Use SL_LOGE and SL_LOGV for logging instead of fprintf, we can easily redirect to standard Android logging eventually.
Add Doxygen-style comments.
Log more specific error message on invalid data format.
Use the full copyright header in one file.
Change-Id: I2342e29f57e97c3b5d94cb219d00e767a75e93fa
Glenn Kasten [Fri, 9 Jul 2010 18:50:34 +0000 (11:50 -0700)]
Bug fix and general code cleanup.
Trace debug now uses Android logging by LOGV/LOGE.
Added SL Utility Toolkit for OpenSL ES, similar to OpenAL UT.
Add a -DUSE_TRACE instead of -DNDEBUG and add it commented out to Android.mk.
LOGE for error returns, LOGV for all entry and exit.
Rename debug.c to trace.c.
slutPrintIID prints the symbolic name if known.
Fix bug in slQueryNumSupportedEngineInterfaces and
slQuerySupportedEngineInterfaces which were not
skipping over unavailable interfaces.
Use USE_CONFORMANCE to return SL_RESULT_FEATURE_UNSUPPORTED when not supported
and make some interfaces unavailable depending on USE_CONFORMANCE.
Move most FIXME to separate bug/to-do list.
Fix possible intermediate overflow in duration computation for sndfile.
Line length 100.
Address code review comments, disable LOG.
Glenn Kasten [Fri, 9 Jul 2010 19:07:00 +0000 (12:07 -0700)]
Port test apps to non-Android platform.
Change-Id: If4e8ace08b3eee8c62c375a5b238fd1ed3665a06
Jean-Michel Trivi [Fri, 9 Jul 2010 16:10:07 +0000 (09:10 -0700)]
Since SLPrefetchStatusItf is explicit, fix the playUri test to
request two interfaces (volume and prefetch) when creating the
AudioPlayer.
Change-Id: I97b18b68dac2ffacef9c709c3f1c2ee85081e07d
Glenn Kasten [Fri, 9 Jul 2010 14:27:07 +0000 (07:27 -0700)]
Fix error and warning on non-Android platforms.
sles.c:374: error: ‘for’ loop initial declaration used outside C99 mode
sles.c:374: warning: comparison between signed and unsigned
Change-Id: I344c928cb2b0302f0ed6daa74e7b7c530783c2f4
Glenn Kasten [Fri, 9 Jul 2010 14:23:25 +0000 (07:23 -0700)]
Merge "Format: preprocessor directive not in column 1." into gingerbread
Glenn Kasten [Fri, 9 Jul 2010 00:52:34 +0000 (17:52 -0700)]
Merge "Fix printf format problem." into gingerbread
Glenn Kasten [Fri, 9 Jul 2010 00:11:13 +0000 (17:11 -0700)]
Format: preprocessor directive not in column 1.
Change-Id: I33ee829c3f963c5ca2495cfa08ac400c28bd1da2
Glenn Kasten [Fri, 9 Jul 2010 00:06:51 +0000 (17:06 -0700)]
Fix printf format problem.
Change-Id: I8ced7479d29702455bf128337e24f1f4ef8aeb16
Jean-Michel Trivi [Thu, 8 Jul 2010 23:38:17 +0000 (16:38 -0700)]
Modify result related macros to not force them to be used as the
beginning and end of a variable visibility bloc.
Change-Id: I31c0fcd6dda36a4f77c1361ace79e27c97ca87fb
Yu Shan Emily Lau [Thu, 8 Jul 2010 02:13:54 +0000 (19:13 -0700)]
Added the make file for the opensles gTest.
Change-Id: Ib2750cd5ba9500d7030bf64fca99a3411bbaa74c
Jean-Michel Trivi [Wed, 7 Jul 2010 21:34:32 +0000 (14:34 -0700)]
Implement seeking on a media player.
Change-Id: I0894e79be80ded39f051c670c30ac380a74f9888
Jean-Michel Trivi [Wed, 7 Jul 2010 17:24:01 +0000 (10:24 -0700)]
Don't allow requested the SLSeekItf when the data source is a buffer
queue.
Mark SLPrefetchStatusItf and SLSeekItf as explicit interfaces.
New parameter change flag for playback position.
Change-Id: I2c45818e294ec65a1b7e741ec50e9389acd6d187
Glenn Kasten [Wed, 7 Jul 2010 15:00:07 +0000 (08:00 -0700)]
Merge "Trace debug support." into gingerbread
Glenn Kasten [Fri, 2 Jul 2010 22:58:46 +0000 (15:58 -0700)]
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
Yu Shan Emily Lau [Sat, 3 Jul 2010 00:26:11 +0000 (17:26 -0700)]
The change broke the sim build. Remove the makefile for now until find the fix.
Change-Id: I83eb123fdaec129238f62efdc5ea21f2426f7f8c
Jean-Michel Trivi [Fri, 2 Jul 2010 19:12:37 +0000 (12:12 -0700)]
Fix sim build. Proper makefile modification, not copy paste.
Change-Id: Iede8f9b07029491e76a46e500a13aff0aa6de881
Jean-Michel Trivi [Fri, 2 Jul 2010 18:23:06 +0000 (11:23 -0700)]
Fix sim build. Exclude stlport on the simulator.
Change-Id: I54f66168b75788846ee0c94216be7f487ab4c0f2
Jean-Michel Trivi [Fri, 2 Jul 2010 01:37:19 +0000 (18:37 -0700)]
Merge "Cache sample rate once known instead of querying it from the player." into gingerbread
Jean-Michel Trivi [Fri, 2 Jul 2010 01:06:26 +0000 (18:06 -0700)]
Cache sample rate once known instead of querying it from the player.
Change-Id: I23f0ca4f6b65329ac5d13cc24a080c26dbc48648
Yu Shan Emily Lau [Thu, 1 Jul 2010 23:16:52 +0000 (16:16 -0700)]
Merge "Integrated the mimeUri PlayUri native with the gTest framework." into gingerbread
Jean-Michel Trivi [Wed, 30 Jun 2010 22:32:47 +0000 (15:32 -0700)]
Let SfPlayer handle the play state with regards to decoding.
This fixes the bug where the player couldn't be resumed after being paused.
Add test of the OpenSL ES play states.
Change-Id: I3793941abf852aaca359346c656e4a8e29ed666c
Jean-Michel Trivi [Thu, 1 Jul 2010 18:18:48 +0000 (11:18 -0700)]
Merge "Fix build. Correct definition of 64bit constants." into gingerbread
Jean-Michel Trivi [Thu, 1 Jul 2010 18:16:20 +0000 (11:16 -0700)]
Fix build. Correct definition of 64bit constants.
Change-Id: I293a28f377b5e6f7ebf5e341c3317f99f78fd125
Glenn Kasten [Wed, 30 Jun 2010 00:33:26 +0000 (17:33 -0700)]
Fix miscellaneous bugs.
I3DCommit::Commit should block until generation count is updated.
IDeviceVolume_SetVolume and IDeviceVolume_GetVolume work on more device IDs.
Implement IEngine_CreateListener.
IEngine_Create3DGroup return correct status code.
IIDs were out of order in IID_to_MPH.c and OpenSLES_IID.c.
Comment out deadlock in Volume::SetMute.
Supply at least one codec descriptor for each supported codec.
Add object_cond_broadcast for use by 3DCommit::Commit.
EngineCapabilities allocates memory -- questionable.
Claim all 3 profiles temporarily.
AudioIODeviceCapabilities::GetDefaultAudioDevices should handle default audio devices.
Object::GetInterface needs to return correct status code.
Vibra interfaces are implicit not optional.
Line length 100.
Fix Android portability bug.
Update MPH perfect hash function.
MPH constants should not be ifdef.
MPH_to_index tables needed additional entries at end.
Interface ID and name tables should not be ifdef.
OUTPUTMIXEXT should not be advertised publicly.
For certain locator types, the format is permitted to be undefined.
Remove temporary workaround for Khronos bug 6331.
Engine::QueryNumSupportedInterfaces and Engine::QuerySupportedInterfaces skip unavailable interfaces.
Address code review comments.
More clear device ID handling.
Use symbolic constants instead of 0 for null data locator and data format.
Add comments about 3D commit.
Change-Id: I8d31ded6c877e71b6f5ef1e90446035da809d9a6
Jean-Michel Trivi [Wed, 30 Jun 2010 22:28:37 +0000 (15:28 -0700)]
Merge "Declaration of a new DataLocator type for OpenSL ES on Android: file descriptor. Implementation of support for SL_DATALOCATOR_ANDROIDFD. Test application to play a file from a file descriptor. Fix bug in sles_to_android.cpp where resources were never freed when destroying the player." into gingerbread
Yu Shan Emily Lau [Tue, 29 Jun 2010 22:50:44 +0000 (15:50 -0700)]
Integrated the mimeUri PlayUri native with the gTest framework.
Change-Id: I64bfc2acfdd1be7088a1536dec8033576eb11fdc
Jean-Michel Trivi [Wed, 30 Jun 2010 17:30:33 +0000 (10:30 -0700)]
Declaration of a new DataLocator type for OpenSL ES on Android: file
descriptor.
Implementation of support for SL_DATALOCATOR_ANDROIDFD.
Test application to play a file from a file descriptor.
Fix bug in sles_to_android.cpp where resources were never freed
when destroying the player.
Change-Id: I45156f41ee5ca77d3a944f8f89b75880db8b4aba
Glenn Kasten [Tue, 29 Jun 2010 23:23:18 +0000 (16:23 -0700)]
Initial draft of multiplay command-line test app.
Change-Id: I821573c7e9eef123dab3a5b00e1040ab69ea215a
Jean-Michel Trivi [Tue, 29 Jun 2010 21:50:35 +0000 (14:50 -0700)]
Add a test for GetStreamType on SLAndroidStreamTypeItf.
Change-Id: I2115488a2d4dc97a8bb1f5f01742e77d0960e394
Jean-Michel Trivi [Mon, 28 Jun 2010 23:50:42 +0000 (16:50 -0700)]
Declaration and implementation of a new OpenSL ES interface to set
to set the Android stream type on an AudioPlayer object.
Change-Id: Ic5d14e9899dfbccfc647642ae562730807bc73fe
Glenn Kasten [Tue, 29 Jun 2010 13:59:06 +0000 (06:59 -0700)]
Restore previous version of CAudioPlayer fields.
Addressed code review comments:
Move channel mute, channel solo, and channel count from IMuteSolo to CAudioPlayer.
Deferred support for IMuteSolo to CMIDIPlayer deferred until we hear back from working group.
Move comment marker to correct location.
We discussed the code review comments and agreed to restore the
previous handling of channel mute, channel solo, and channel count.
We will probably have to review this again later, depending on what
the working group says about MIDI Player. To make it easier to
examine the history later, I'm submitting the previous change as
is, followed immediately by this change which addresses the code
review comments.
Change-Id: I4d5594d70c1c2d5fb90980a8a0414177ff29d4a7
Glenn Kasten [Thu, 24 Jun 2010 18:54:41 +0000 (11:54 -0700)]
Gain and transport attributes at mutex unlock.
Update both interface and player copies of mute/solo.
Move synchronous gain and transport updates to mutex unlock exclusive.
Update sync thread logic.
Keep track of player position using tracks in PCM frame units.
Implement solo.
Various volume-related fixes.
Mute solo fields are only in IMuteSolo, but IMuteSolo is
immediately after IVolume to make it easier to find.
Move Android volume fields into audio player.
Fix printf missing newline.
Only one copy of mute and solo.
Clean up comments.
Line length 100.
SDL gain and transport updates are synchronous.
Fix unused variable warnings.
Use symbol for number of stereo channels.
Rearrange fields to save memory.
Add comments.
Fix problems introduced during the last merge.
Change-Id: I121fcbe4189b06850983941f540942a745fc51fb
Jean-Michel Trivi [Mon, 28 Jun 2010 22:50:43 +0000 (15:50 -0700)]
Fix test makefiles for OpenSL ES test apps.
Change-Id: I996bd47aad50231f8d93f48fdedac3be74295592
Jean-Michel Trivi [Fri, 25 Jun 2010 23:48:01 +0000 (16:48 -0700)]
Fix prefetching issue where decode shouldn't start before playback
starts.
Change-Id: I01b7b36b388b9bc37ea3c9d5e3f74a531f887128
Jean-Michel Trivi [Fri, 25 Jun 2010 17:26:04 +0000 (10:26 -0700)]
Implement stop for SfPlayer. Fixes crash at end of playMuteSolo test.
Change-Id: I4fb88cae71d8972b03c8d7ad3f108d6aff39ada5
Jean-Michel Trivi [Fri, 25 Jun 2010 01:44:08 +0000 (18:44 -0700)]
Merge "Implement the SLMuteSoloItf interface." into gingerbread
Jean-Michel Trivi [Fri, 25 Jun 2010 01:41:00 +0000 (18:41 -0700)]
Merge "New test / demo to exercise SLMuteSoloItf on an AudioPlayer." into gingerbread
Jean-Michel Trivi [Fri, 25 Jun 2010 00:53:38 +0000 (17:53 -0700)]
New test / demo to exercise SLMuteSoloItf on an AudioPlayer.
Change-Id: Ib3fddaea46098ed944b62d08d8ba8a657bf0174c
Jean-Michel Trivi [Thu, 24 Jun 2010 18:53:08 +0000 (11:53 -0700)]
Implement the SLMuteSoloItf interface.
Change-Id: I5ed3112046c4317fe752bc2545b3e168f7e8a18a
Glenn Kasten [Thu, 24 Jun 2010 18:49:31 +0000 (11:49 -0700)]
Normalize boolean input parameters to slCreateEngine.
Change-Id: Ia9453d9f5784ff75148e380fc3bbb03fe4ef8c40
Jean-Michel Trivi [Wed, 23 Jun 2010 18:39:56 +0000 (11:39 -0700)]
Share the same AudioTrack instance regardless of the data source
of the AudioPlayer, buffer queue or URI. Refactor code that
handles AudioTrack events so it is shared among the two implementations
of AudioTrack event callbacks.
Change-Id: Ida49fada2515acaac06bdcb42cc833c97ee20dc8
Jean-Michel Trivi [Wed, 16 Jun 2010 18:49:18 +0000 (11:49 -0700)]
Introduction of Stagefright to replace MediaPlayer.
Change-Id: I59c467ebafed6f5ceee37c2d8f6cd132b25c1459
Glenn Kasten [Mon, 21 Jun 2010 18:46:55 +0000 (11:46 -0700)]
Continued bug fixing.
Remove obsolete FIXMEs.
Fix copyright notices on two files.
Move interface ID lookup function to separate source file,
and replace O(n) linear search by O(1) perfect hash.
Use symbolic constants instead of magic numbers in SndFile and DeviceVolume.
Remove blank lines at EOF.
Pre-compute max index of devices at engine creation time.
Fix mute and gain bugs on SDL/SndFile.
Add interface name lookup function for debugging.
Change-Id: I31686c2bf874c9778e193648b74b6ab061950f8a
Jean-Michel Trivi [Mon, 21 Jun 2010 17:03:06 +0000 (10:03 -0700)]
For Android code, use ANDROID flag rather then USE_ANDROID.
Change-Id: I4b5877d8b6aee37bb472c817a2a863104271a03b
Glenn Kasten [Fri, 18 Jun 2010 17:05:08 +0000 (10:05 -0700)]
Improve platform portability.
Change-Id: I00ae4f3f4cf31d9156c274750c3582ae60450732
Glenn Kasten [Thu, 17 Jun 2010 19:45:26 +0000 (12:45 -0700)]
Minor bug fixes and FIXMEs.
3DGroup object now tracks its member Player objects.
Avoid possible integer overflow during multiplication.
Remove hard-code indices in EffectSend initialization.
Remove obsolete FIXME comments.
Localize hard-coded constants in SDL and libsndfile platforms.
Add primitive stereo positioning for SDL platform.
Glenn Kasten [Wed, 16 Jun 2010 01:21:52 +0000 (18:21 -0700)]
Add limited volume support for USE_SNDFILE platform.
Fix build warnings.
Remove obsolete FIXME.
Glenn Kasten [Thu, 17 Jun 2010 16:52:02 +0000 (09:52 -0700)]
Fix two long-standing FIXMEs: O(n) and mThis.
Replace some O(n) algorithms by O(1) using ctz.
mThis was redundant for IObject.
Change-Id: Ic2cd0345498992af06495e9f3a13211dfeb3910e
Jean-Michel Trivi [Wed, 16 Jun 2010 16:24:09 +0000 (09:24 -0700)]
Introduction of android resource states, rather than relying only
a the mPrepared field.
Change-Id: I9d532d4b8cad28743b2bef2232591a24c646be5e
Glenn Kasten [Mon, 14 Jun 2010 00:57:59 +0000 (17:57 -0700)]
More work on asynchronous operations.
Improve interface handling.
Interface state is kept using array of 4-bit fields instead of
separate bit-masks; this is simpler and uses less memory.
Better error handling in EffectSend.
Keep track of interfaces that have been gotten.
Asynchronous AddInterface and ResumeInterface.
Closures are now allocated dynamically.
Add resume hook.
Fix 2 bugs introduced during last effort.
Line length 100.
Continue asynchronous DynamicInterfaceManagement.
Implement asynchronous Object::Resume.
AbortAsyncOperation for Realize and Resume phase 1.
Implement asynchronous abort during phase 1.
ThreadPool bug fixes.
When destroying ThreadPool, free memory used by pending closures.
Don't enqueue additional closures while ThreadPool is shutting down.
Update comments and assertions.
Use 8-bits per interface state instead of 4-bits.
List official object states explicitly.
Add comments.
Glenn Kasten [Fri, 11 Jun 2010 23:19:30 +0000 (16:19 -0700)]
Improve platform portability.
Change-Id: Ieb7290591730f1be7d201ec4690a805c959f76e0
Glenn Kasten [Fri, 11 Jun 2010 22:36:23 +0000 (15:36 -0700)]
Merge "Make test apps work on host platform." into gingerbread
Glenn Kasten [Fri, 11 Jun 2010 21:52:54 +0000 (14:52 -0700)]
Make test apps work on host platform.
Change-Id: Ia5ed73b0ff77eb16959b3a539ac33ea9e89a9f4c
Glenn Kasten [Fri, 11 Jun 2010 21:50:01 +0000 (14:50 -0700)]
Fix printf format bug.
Change-Id: Ic81eea513315ca6465a6cbc5d19731122bbb62ed
Glenn Kasten [Mon, 7 Jun 2010 18:18:52 +0000 (11:18 -0700)]
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
Jean-Michel Trivi [Thu, 10 Jun 2010 19:47:07 +0000 (12:47 -0700)]
The library for the OpenSL ES implementation is supposed to be name
libOpenSLES, not libopensles.
Change-Id: Icdfb266650abb75a8aaf5670b651bfea1361c3c1
Jean-Michel Trivi [Wed, 9 Jun 2010 17:55:55 +0000 (10:55 -0700)]
When updating stereo volume (for panning or balance), verify first
where to get the channel count (AudioTrack vs MediaPlayer).
At the moment MediaPlayer doesn't support querying the audio format,
so assume 1 channel.
Change-Id: I91ca71c7c0b5b2934c9e208db2dbb2c9475b100d
Jean-Michel Trivi [Wed, 9 Jun 2010 16:47:00 +0000 (09:47 -0700)]
New OpenSL ES test+demo application that uses the SLPrefetchStatusItf.
Plays two URIs and pans them left and right.
Change-Id: Ic804c0d666889088db6a4075f5c40029e11273fe
Jean-Michel Trivi [Tue, 8 Jun 2010 22:03:41 +0000 (15:03 -0700)]
Merge "OpenSL ES tests shouldn't be built in all builds." into kraken
Jean-Michel Trivi [Tue, 8 Jun 2010 21:40:27 +0000 (14:40 -0700)]
OpenSL ES tests shouldn't be built in all builds.
Change-Id: Ib014c47cb5c25d1348e544ead3e272e4d2194d5f
Jean-Michel Trivi [Tue, 8 Jun 2010 18:40:56 +0000 (11:40 -0700)]
Implement SLPlaybackRateItf
Change-Id: I5f73882a76f8e2c120f68f1b64c374e1950d2356
Jean-Michel Trivi [Fri, 4 Jun 2010 20:10:36 +0000 (13:10 -0700)]
Modify implementation of SLPlayItf to only start prefetching data
when the playstate is set to PAUSED, and notify prefetch status
change and buffer fill level through the SLPrefetchItf callback.
Modify test app to correctly start playing only after a prefetch
status change.
Change-Id: I51482bb5b7db419bdb694be2277282d94ff8234f
Glenn Kasten [Fri, 4 Jun 2010 01:03:59 +0000 (18:03 -0700)]
Improve portability.
Change-Id: I67643ff9807fcb0459322b36d2b5406ae15903a7
Glenn Kasten [Fri, 4 Jun 2010 00:47:21 +0000 (17:47 -0700)]
Continue preparations for implementing async ops.
Centralize object destroy.
Record an object instance ID for use by debugger user interface.
Track all object instances associated with an engine, for use by sync thread and debugger.
Change-Id: Id8b7d0d1acd43f9524443f1bdcfb70ede7b66bfb
Glenn Kasten [Fri, 4 Jun 2010 00:09:40 +0000 (17:09 -0700)]
Merge "Work in progress towards a Windows port." into kraken
Jean-Michel Trivi [Thu, 3 Jun 2010 23:52:05 +0000 (16:52 -0700)]
Use interface exclusive locks when reading and modifying interface
properties.
Change-Id: I666f1e9af00e3ffd89077b68dcf447800d64a7a6
Jean-Michel Trivi [Wed, 2 Jun 2010 18:59:56 +0000 (11:59 -0700)]
For audio players with URI data source:
- Modify stereo volume update to also work on a MediaPlayer.
- Add support for completion callback when play event mask
specifies SL_PLAYEVENT_HEADATEND
Before changing a property related to the SLVolumeItf or
SLPlayItf, check that the property has changed before applying
it to avoid useless calls and computations.
Cleanup in playUri test and compile without warnings.
Remove "driver" test content: test app was previously moved
to tests/pcmBufferQueue.
According to spec: initialize periodic update for SLPlayItf
and SLRecordItf to 1s.
Change-Id: I00dad162eac7c0d88b535ab65e2351353b8888d5
Glenn Kasten [Thu, 3 Jun 2010 20:35:55 +0000 (13:35 -0700)]
Work in progress towards a Windows port.
Windows supports C89, not C99.
Fix an assignment warning caught by Windows compiler.
Avoid POSIX calls.
Change-Id: I7993d045156233f3c6f20caff05de1f94778041c
Glenn Kasten [Wed, 2 Jun 2010 21:50:12 +0000 (14:50 -0700)]
Improve resource recovery.
Better cleanup in AudioPlayer.Destroy.
Avoid mallocs in LEDArray and Equalizer.
Line length 100.
Change-Id: I2d22880b27ccf7e9038b398cae9287781fd82253
Continued work on threading.
Lay the groundwork for true asynchronous realize.
Call all callbacks with mutex unlocked.
C volatile is meaningless.
Start adding support for suspend/resume on interfaces.
Line length 100.
Change-Id: I631cb4f123143e4ef79c6c491d12b1e559857cab
Glenn Kasten [Wed, 2 Jun 2010 00:40:50 +0000 (17:40 -0700)]
Simplify initialization of AudioPlayer.
Clear whole object at initialization. Remove spurious NDEBUG.
Change-Id: Idb116722d95526f8204200d14ca1bafbedd19936
Jean-Michel Trivi [Tue, 1 Jun 2010 23:32:29 +0000 (16:32 -0700)]
Implement GetDuration and GetPosition in SLPlayItf
Change-Id: I83ae15310c3e473556703e5d373aef5a07e6eda5
Jean-Michel Trivi [Tue, 1 Jun 2010 19:50:44 +0000 (12:50 -0700)]
When calling an OpenSL ES callback after an AudioTrack callback, use
interface locks to retrieve the data for the callback, unlock, and
then use the callback function pointer.
Change-Id: Icf3ca3bad78159ee6c01dd937221477cc2939c1c
Glenn Kasten [Sat, 29 May 2010 18:43:15 +0000 (11:43 -0700)]
Move platform-specific code to separate files. Use sles_allinclusive.h to really mean all inclusive. MuteSolo check channel count.
Change-Id: I96caab5be55a1f04342eb67b511309babd5a6916
Make a copy of data source and sink parameter to avoid dangling inputs. Pre-process URI scheme and MIME type using a perfect hash. Line length 100.
Change-Id: Icb1e1a7a9c6370eda1e15e61f0dff35c1d59d7fa
Fix merge problem on Android.
Change-Id: I70b724273147f3981550272990729a4a409e1f72
MIME type needs to be completely initialized.
Change-Id: I3766acfb170abc976506cf305fabd5548107f592
Remove MIME lookup and URI scheme lookup.
Change-Id: I7058dfef01c9db509ad5915d9f8099a720e6736b
Jean-Michel Trivi [Tue, 1 Jun 2010 19:24:25 +0000 (12:24 -0700)]
Add command line test to play a URI, to exercise the OpenSL ES
AudioPlayer with a SL_DATALOCATOR_URI as data source. Plays 10s
of the URI.
Change-Id: I24b8ae5293c4efbc372551febd91eb6dafe890eb
Jean-Michel Trivi [Wed, 26 May 2010 22:22:15 +0000 (15:22 -0700)]
First pass at implementing support of SL_DATALOCATOR_URI in an SL ES
audio player data source.
Change-Id: Ie8dc3b88c667035cbb20d2180eed6f699b6e7c2b
Glenn Kasten [Fri, 28 May 2010 23:25:21 +0000 (16:25 -0700)]
Continue splitting up source code.
Change-Id: Iad6caa5adf111f50ad1a3aa14fc31efc7d5b285e
Jean-Michel Trivi [Fri, 28 May 2010 21:08:08 +0000 (14:08 -0700)]
Rename RealizeHook to AsyncHook.
Change-Id: I9a01c438bba7d18a214f90912620847a3d72d3f2
Jean-Michel Trivi [Fri, 28 May 2010 19:54:48 +0000 (12:54 -0700)]
Add async field to the object-specific implementation of Realize
and Resume functions.
Change-Id: Ib9854a4ba06ebbc6a9e2a58274db2bfe47d46f35
Jean-Michel Trivi [Wed, 26 May 2010 00:02:32 +0000 (17:02 -0700)]
Add a command line test for PCM buffer queues.
This example is based on the buffer queue sample code from the
OpenSL ES specification.
Change-Id: Ic0730549fe54e7d5cedf1bd7d374e2b81c1e969d
Glenn Kasten [Wed, 26 May 2010 23:40:09 +0000 (16:40 -0700)]
Compile (almost) all .c as C++ for Android.
Change-Id: I2213f8cd615723b5d1dc34ba206bf3f900b44739
Glenn Kasten [Wed, 26 May 2010 22:39:58 +0000 (15:39 -0700)]
Fix broken build.
Change-Id: I99bea1ced30ea5eb10036e4b8f6450aa469b74c4
Glenn Kasten [Wed, 26 May 2010 19:30:10 +0000 (12:30 -0700)]
IEngine, IPlay, IVolume are compiled separately. Turn on USE_ANDROID for the whole build.
Change-Id: I28096fa86286cf9ff97ce4ae4164f7cd4a0d6198
Jean-Michel Trivi [Wed, 26 May 2010 17:47:15 +0000 (10:47 -0700)]
Corrections to the implementation of SLVolumeItf for an AudioPlayer.
When unmuting an AudioPlayer, update volume in framework, not
implementation-specific code.
Android implementation limits maximum volume to 0.
Change-Id: I2f49a55e33ce58fb3543ca047ec20c04340e8d9f
Jean-Michel Trivi [Wed, 26 May 2010 00:54:24 +0000 (17:54 -0700)]
Move OpenSL ES library implementation to the libopensles folder.
Add an Android makefile for libopensles.
Change-Id: I1480bf46c7165cd35bb55aef1f11fb0a04fff88e
Jean-Michel Trivi [Mon, 24 May 2010 17:16:37 +0000 (10:16 -0700)]
Implement the SLVolumeItf and SLPlayItf on an AudioPlayer's AudioTrack.
Iplay.c and IVolume.c are temporarily included in sles.c to circumvent
a build issue.
Change-Id: I213fc1d681ca2e7ff158aff876faf980a88292b5
Glenn Kasten [Fri, 21 May 2010 15:47:51 +0000 (08:47 -0700)]
Almost done splitting off the interfaces.
Change-Id: I374133ed856b38eb16e59ca3e917ef85d8dd2cf0
Split up MIDI interfaces.
Change-Id: Ife064b0ef6149ab8bcbc93646689cd5197c8c197
Interface initialization.
Change-Id: Iefa67680dab3ac558555462672261f613499a967
Add parameter range checks.
Change-Id: Ie2efba85e2b8ec8c2c6c73e0edf393318833d886
Jean-Michel Trivi [Tue, 18 May 2010 22:15:24 +0000 (15:15 -0700)]
Implement the AudioTrack callback to retrieve audio data from a
BufferQueue interface.
When handing audio data from the buffer queue to the AudioTrack
callback, you cannot give more data than the given size. This
requires the handling of partial buffer consumption, before
the play index is incremented and the buffer queue callback
is called.
Change-Id: I2181afbc509182ff5c38aebbc4784f9b9916a6ae
Glenn Kasten [Thu, 20 May 2010 15:54:02 +0000 (08:54 -0700)]
Continue the split into smaller source files.
Change-Id: I90dd822c4d91a21400e704b7cf3aab91293a35a7
Glenn Kasten [Wed, 19 May 2010 01:38:45 +0000 (18:38 -0700)]
Move devices to separate files.
Change-Id: I24c7c8d344a747a1b8b0854e6f872dcf8158a932
Move locks to separate file.
Change-Id: I4b5a2c4d497416d009dd6574ff793eaa93b7e9ac
Move 3D interfaces to separate files.
Change-Id: I8a4166301b3ff677784290794a1be8de4d424711
Move more interfaces to separate files.
Change-Id: I253f101663dc493bae4b469746a3ededb0882ae8
Glenn Kasten [Tue, 18 May 2010 16:48:03 +0000 (09:48 -0700)]
Start adding frame thread (sync).
Change-Id: Ifc163177cd990f1db27886e796ef23cbe420136f
Make test C32 work again on SDL.
Change-Id: I3c4949efbceaa44dc91d988641ce1ecbad977571
Add missing initializer for _3DGroup_class.
Fix uninitialized variables in metadata extraction.
Add missing const for data source and sink.
Change-Id: Iccc5ebc721bbd52167098b5fa04c8a54a8bab6c9
Start adding typedefs I* and C*.
Change-Id: I30d263f22ae0edd4e9f438161670f778a6f0ee96
Start implementing name changes.
Change-Id: I28cae1cd8f69a721251d83efd1ba7cef124201a9
Jean-Michel Trivi [Tue, 18 May 2010 18:06:28 +0000 (11:06 -0700)]
In Engine_CreateAudioPlayer, only initialize buffer queue depth and
allocate buffer queue array if the AudioPlayer data source is a
buffer queue.
Change-Id: I140174809656cbe252a218d2eb91d099a733b5c5
Jean-Michel Trivi [Tue, 18 May 2010 01:36:25 +0000 (18:36 -0700)]
Add android-specific AudioPlayer Realize function.
Change-Id: Ice8fcc0243a146cdfc7941d72419b4181f9a5909
Jean-Michel Trivi [Mon, 17 May 2010 21:25:11 +0000 (14:25 -0700)]
Separate in external functions the checks done on the data source and
sink of an audio player during its creation.
Change-Id: I1d45d40aa0a58f8abcd27764bf557ad6159d468b
Glenn Kasten [Mon, 17 May 2010 13:55:39 +0000 (06:55 -0700)]
Continue adding locks for multi-threading.
Change-Id: Ia46a71b42983d37677bafba9b55f12058a25db57
Line 212 mDistance needs to be SLmillimeter.
Change-Id: I15ff3c3371f94798b3d04773c9c638c3793c2e40
Glenn Kasten [Fri, 14 May 2010 20:56:32 +0000 (13:56 -0700)]
Continued work on multi-threading.
Change-Id: I0eaf56540a93ae1dbda9f626faf38361c8ef9728
Jean-Michel Trivi [Fri, 14 May 2010 17:14:08 +0000 (10:14 -0700)]
Remove all new type definitions into a separate header.
New files to host the implementation of Android media framework
resource allocation.
Change-Id: I71de03a595add1a44e3e86a944382d73fde0c1bd
Glenn Kasten [Fri, 14 May 2010 00:10:07 +0000 (17:10 -0700)]
Continued work on multi-threading, and sketch out remaining interfaces.
Change-Id: Ib8549ae96909bd7f8a0c23149dcfce8457000107