OSDN Git Service
James Dong [Wed, 17 Nov 2010 00:46:03 +0000 (16:46 -0800)]
Support 64-bit file size/offset
o This patch depends on the patch in the media framework to support 64-bit file size/offset
Change-Id: Ie26b4ac70eb45654ee9ccc3961b4cc5690468c14
Jean-Michel Trivi [Sat, 13 Nov 2010 00:47:50 +0000 (16:47 -0800)]
Definition of a new data locator and interface for streaming.
Change-Id: Ib929749beca048be46187cabbf466981d81143e7
Jean-Michel Trivi [Thu, 11 Nov 2010 18:39:29 +0000 (10:39 -0800)]
Bug
3183484 OpenSL ES: add support for the AUDIO_SOURCE_VOICE_COMMUNICATION record source.
Change-Id: Icc593bdf2cc6ef7f61537661a82f63a46dc8693f
Glenn Kasten [Sat, 23 Oct 2010 01:54:09 +0000 (18:54 -0700)]
am
e3d47748: Merge "Fix bug
3112893 in handling of container size" into gingerbread
Merge commit '
e3d47748d093dde0290863bffa4db2f59d5245d8'
* commit '
e3d47748d093dde0290863bffa4db2f59d5245d8':
Fix bug
3112893 in handling of container size
Glenn Kasten [Sat, 23 Oct 2010 01:54:07 +0000 (18:54 -0700)]
am
202d57f8: Merge "Bug
3101247 - move track ownership" into gingerbread
Merge commit '
202d57f8783ee65d20f6d38b870205fd4cad9e66'
* commit '
202d57f8783ee65d20f6d38b870205fd4cad9e66':
Bug
3101247 - move track ownership
Glenn Kasten [Sat, 23 Oct 2010 01:54:03 +0000 (18:54 -0700)]
Glenn Kasten [Sat, 23 Oct 2010 00:17:58 +0000 (17:17 -0700)]
Merge "Fix bug
3112893 in handling of container size" into gingerbread
Glenn Kasten [Sat, 23 Oct 2010 00:17:36 +0000 (17:17 -0700)]
Merge "Bug
3101247 - move track ownership" into gingerbread
Glenn Kasten [Fri, 22 Oct 2010 18:03:10 +0000 (11:03 -0700)]
Bug
3101247 - move track ownership
Preliminary fix for torture test failure - move track ownership
Change-Id: I4c9de6a85cc0bd594f16bdb1a5de61f5f268cfdb
Glenn Kasten [Mon, 18 Oct 2010 17:56:43 +0000 (10:56 -0700)]
Bug
3102561 - Tests only
Make the multi-thread test more stressful, to crash more often.
New tests: playbq, srcsink, monkey.
In monkey, re-enable destroy at difficult times.
Add support for testing player insert reverb to the reverb test.
Note: building playbq is disabled by default because it needs libsndfile.
Change-Id: I592ea5f567bddc61174e7d41bc5b36ce32d2b6b8
Glenn Kasten [Tue, 19 Oct 2010 17:42:07 +0000 (10:42 -0700)]
Fix bug
3112893 in handling of container size
Change-Id: Iafa1f823351e5849501ffc613f06940be27e9c6b
Adam Momtaz [Thu, 21 Oct 2010 16:51:46 +0000 (09:51 -0700)]
am
9e617254: Bug#
3111274 - Dump raw audio to file for automated audio quality analysis
Merge commit '
9e6172548bb344c24962c8a57274281e4315feba'
* commit '
9e6172548bb344c24962c8a57274281e4315feba':
Bug#
3111274 - Dump raw audio to file for automated audio quality analysis
Adam Momtaz [Wed, 13 Oct 2010 22:05:11 +0000 (15:05 -0700)]
Bug#
3111274 - Dump raw audio to file for automated audio quality analysis
This change is compiled for userdebug builds only.
The change enables raw audio capture of transcoded music.
The capture is written to file and used for audio quality analysis against the source audio.
This capture feature is OFF by default even for userdebug builds and requires setting a system property to enable it.
Change-Id: I6d895a2fe3ef9741fea490fe2513404a50c4d4b7
Jean-Michel Trivi [Tue, 19 Oct 2010 16:53:31 +0000 (09:53 -0700)]
am
62afe516: Fix bug
3106530 Don\'t report unhandled AudioTrack events as errors
Merge commit '
62afe51646a7299deb7476ff39b4604e421cf433'
* commit '
62afe51646a7299deb7476ff39b4604e421cf433':
Fix bug
3106530 Don't report unhandled AudioTrack events as errors
Jean-Michel Trivi [Mon, 18 Oct 2010 18:12:07 +0000 (11:12 -0700)]
Fix bug
3106530 Don't report unhandled AudioTrack events as errors
Unhandled AudioTrack events were reported as errors, which is
a bug. Added case for EVENT_BUFFER_END and EVENT_LOOP_END. This
covers all events an AudioTrack is expected to generate.
Change-Id: I9ee067f3d42c1d545286001a5702bc606233df9d
Glenn Kasten [Mon, 18 Oct 2010 17:32:39 +0000 (10:32 -0700)]
am
5d9d9153: Merge "Fix bug
3101835 - play state crash" into gingerbread
Merge commit '
5d9d9153fe819ae0f3dd9c53fec109dc4ecf64d9'
* commit '
5d9d9153fe819ae0f3dd9c53fec109dc4ecf64d9':
Fix bug
3101835 - play state crash
Glenn Kasten [Mon, 18 Oct 2010 17:32:36 +0000 (10:32 -0700)]
Glenn Kasten [Mon, 18 Oct 2010 17:32:33 +0000 (10:32 -0700)]
Glenn Kasten [Mon, 18 Oct 2010 17:32:29 +0000 (10:32 -0700)]
am
5c3ca268: Merge "Bug
3102561 - Clean up reverb test" into gingerbread
Merge commit '
5c3ca268853169e457ae7874ba992ce36e894f97'
* commit '
5c3ca268853169e457ae7874ba992ce36e894f97':
Bug
3102561 - Clean up reverb test
Jean-Baptiste Queru [Mon, 18 Oct 2010 15:15:29 +0000 (08:15 -0700)]
Merge
aef1e3da from gingerbread-plus-aosp
Change-Id: I3bfc9d261829332f6c6f2cd4c09be3ea104f0767
Glenn Kasten [Sat, 16 Oct 2010 01:01:36 +0000 (18:01 -0700)]
Merge "Fix bug
3101835 - play state crash" into gingerbread
Glenn Kasten [Wed, 13 Oct 2010 16:52:53 +0000 (09:52 -0700)]
Bug
3102561 - Tests and examples only
Note: the modifications in directory libopensles aid testing,
but have no affect on production builds because they are related
to tracing, which is is disabled by default.
Update feedback test to be more reliable.
Update slesTestPlayUri to exit on prefetch error.
Clean up error and termination handling.
Add comment to record test on how to use it.
Reduce global symbol dependencies when trace is enabled.
Split OpenSLESUT into two files: part that uses printf, and another part that doesn't.
Add SL_RESULT_ prefix to result strings.
slesutResultToString returns NULL for unknown value.
Add multithread torture test.
Compile stream test for non-Android as a no-op.
Improve API test coverage.
Enable assertion checks on test programs.
Change-Id: I6b82026cfa19d2f08cda4c11137e0706e8ff4b8c
Glenn Kasten [Fri, 15 Oct 2010 16:24:32 +0000 (09:24 -0700)]
Fix bug
3101211, partial fix for bug
3101247
IEngine.c: fixed numerous problems found by API test in
Engine::QueryNumSupportedExtensions
Engine::QuerySupportedExtension
Engine::IsExtensionSupported
sles.c:
failed engine create due to resource error did not return correct value
locks.c:
The mutex lock log usually indicates there is a deadlock. However,
it can also happen when there is heavy lock contention, such as
during the multithread torture test. Since it may be may be normal
behavior, I downgraded this log to a warning.
CEngine.c, ThreadPool.h, sles_allinclusive.h, sync.c, Android.mk:
Thread torture test was crashing on all platforms. Partial fix for Android:
- disable sync thread on Android
- disable async realize and async add interface on Android as they are not well tested
COutputMix.c:
Multiple output mixes were incorrectly handled on desktop. The
changed lines are under a non-Android conditional, so don't affect
production builds. But they are necessary in order to develop the
multithread torture test and measure code coverage using it.
Change-Id: I9003e97e0f84d9dc106622b0c925384c8ed61a7e
Glenn Kasten [Sat, 16 Oct 2010 00:17:54 +0000 (17:17 -0700)]
Merge "Bug
3102561 - Clean up reverb test" into gingerbread
Glenn Kasten [Fri, 15 Oct 2010 19:36:45 +0000 (12:36 -0700)]
Bug
3102561 - Clean up reverb test
Change-Id: If573c06134810eafd4d41efeb938fa23ae77c2da
Glenn Kasten [Fri, 15 Oct 2010 19:35:03 +0000 (12:35 -0700)]
Fix bug
3101835 - play state crash
If a prefetch fails due to invalid data source,
then the application sets play state to PLAYING, it used to crash.
Change-Id: Iaba98c596005715ca6c057de543fa0921225e74c
Andreas Huber [Fri, 15 Oct 2010 20:33:38 +0000 (13:33 -0700)]
Include the framework copy of the OpenMAX headers instead of referencing external/opencore.
Change-Id: I935b8f2851f4bfc244178131acaa913377efa1c2
related-to-bug:
3101573
Jean-Michel Trivi [Fri, 15 Oct 2010 15:33:31 +0000 (08:33 -0700)]
am
ffbd220f: Fix bug
3094729 Support AAC+ in OpenSL ES
Merge commit '
ffbd220f34d275c6231cac8db8f3b50aa16be2b2'
* commit '
ffbd220f34d275c6231cac8db8f3b50aa16be2b2':
Fix bug
3094729 Support AAC+ in OpenSL ES
Glenn Kasten [Fri, 15 Oct 2010 07:05:15 +0000 (00:05 -0700)]
am
80b64591: Merge "Make log less noisy" into gingerbread
Merge commit '
80b645911cfc4ddbd8c011efe55c502cd03c7908'
* commit '
80b645911cfc4ddbd8c011efe55c502cd03c7908':
Make log less noisy
Jean-Michel Trivi [Fri, 15 Oct 2010 06:22:04 +0000 (23:22 -0700)]
Jean-Michel Trivi [Thu, 14 Oct 2010 06:35:56 +0000 (23:35 -0700)]
am
c35fd2e7: Enable aux effect attachment before the AudioTrack creation.
Merge commit '
c35fd2e7ba670b1024a920ebf007b0fa1d92c969'
* commit '
c35fd2e7ba670b1024a920ebf007b0fa1d92c969':
Enable aux effect attachment before the AudioTrack creation.
Jean-Michel Trivi [Wed, 13 Oct 2010 18:31:01 +0000 (11:31 -0700)]
Fix bug
3094729 Support AAC+ in OpenSL ES
When playing an AAC+ stream, StageFright will report a change of
configuration in the stream between the prepare phase and the
start of the playback.
The fix consists in retrieving the new configuration in SfPlayer,
create a new AudioTrack with the new parameters, and notify
AudioPlayer that SfPlayer has a new AudioTrack to use. AudioPlayer
will then delete its current AudioTrack, and use the new one
from SfPlayer, after configuring it with the current AudioPlayer
settings.
Change-Id: I23e3ecb2c144b7c4eefae7a970581695545982d4
Glenn Kasten [Wed, 13 Oct 2010 16:54:43 +0000 (09:54 -0700)]
Merge "Make log less noisy" into gingerbread
Glenn Kasten [Wed, 13 Oct 2010 00:11:21 +0000 (17:11 -0700)]
Make log less noisy
Change-Id: I6a7cb4c8bfca51eae71fb312b8ff43ce663a4c11
Jean-Michel Trivi [Wed, 13 Oct 2010 00:06:36 +0000 (17:06 -0700)]
Fix bug
3090610 Report an error on AAC+
Notify an error occured during prefetching when StageFright
reports that a read error was encountered (other than EOS),
and stop playback.
Change-Id: I0c00ee76b148bd80a26679648322633d6e5533da
Jean-Michel Trivi [Tue, 12 Oct 2010 23:39:49 +0000 (16:39 -0700)]
am
521de5ed: Stop preparing the player if an audio track cannot be found.
Merge commit '
521de5ed291f559f536fd429521b00c67e756725'
* commit '
521de5ed291f559f536fd429521b00c67e756725':
Stop preparing the player if an audio track cannot be found.
Jean-Michel Trivi [Tue, 12 Oct 2010 23:39:33 +0000 (16:39 -0700)]
am
09f19a9d: Merge "Notify when prefetching fails" into gingerbread
Merge commit '
09f19a9d2a340c00429797ca6a21778b99796818'
* commit '
09f19a9d2a340c00429797ca6a21778b99796818':
Notify when prefetching fails
Jean-Michel Trivi [Tue, 12 Oct 2010 21:05:56 +0000 (14:05 -0700)]
Enable aux effect attachment before the AudioTrack creation.
When an OpenSL ES AudioPlayer is playing content from a URI or FD,
the AudioTrack it plays on is only created once prefetching is
far along enough that the playback properties are known (channel
count, word size and sample rate). This happens after Realize()
is called on the AudioPlayer. If, before the AudioTrack is created,
the SLEffectSendItf interface is used to configure the aux send
for that player, there is no AudioTrack to configure.
The fix consists in keeping track of the effect the track needs
to be attached to, and with what level. Once the track is
created, and it gets configured (volume, mutes, channel solos,
marker callbacks) we also attach it to the aux effect if
necessary.
Change-Id: I12230a8cbf7dc3876d3713a006b9702d44e9d6e5
Glenn Kasten [Tue, 12 Oct 2010 18:50:35 +0000 (11:50 -0700)]
am
6f217820: Workaround for build error on sim-eng
Merge commit '
6f2178206003119ad446457c9110abad15223b77'
* commit '
6f2178206003119ad446457c9110abad15223b77':
Workaround for build error on sim-eng
Glenn Kasten [Tue, 12 Oct 2010 00:49:31 +0000 (17:49 -0700)]
am
e8fb8eb3: Add support for 8-bit and 48 kHz PCM
Merge commit '
e8fb8eb310dc5ee5a262701a9386b78428b661d7'
* commit '
e8fb8eb310dc5ee5a262701a9386b78428b661d7':
Add support for 8-bit and 48 kHz PCM
Glenn Kasten [Tue, 12 Oct 2010 00:49:00 +0000 (17:49 -0700)]
Glenn Kasten [Tue, 12 Oct 2010 00:48:56 +0000 (17:48 -0700)]
Jean-Michel Trivi [Mon, 11 Oct 2010 23:47:13 +0000 (16:47 -0700)]
Stop preparing the player if an audio track cannot be found.
The bug consisted in not exiting from prepare() if an audio track
couldn't be retrieved from the content to play. This is for
instance the case with unsupported file formats.
Change-Id: Ic48ef5c3bfbfc7d16b241eaacfd26fe1b34e1044
Jean-Michel Trivi [Mon, 11 Oct 2010 23:27:30 +0000 (16:27 -0700)]
Merge "Notify when prefetching fails" into gingerbread
Jean-Michel Trivi [Mon, 11 Oct 2010 23:15:57 +0000 (16:15 -0700)]
Notify when prefetching fails
There is no event in the SLPrefetchStatus event callback in
OpenSL ES 1.0 to indicate a prefetch error. So we signal it by
sending simulataneously two events:
- SL_PREFETCHEVENT_FILLLEVELCHANGE with a level of 0
- SL_PREFETCHEVENT_STATUSCHANGE with a status of
SL_PREFETCHSTATUS_UNDERFLOW
Change-Id: I399ea3474e6cc7796c940401306ca9a076fac4e2
Glenn Kasten [Mon, 11 Oct 2010 15:53:34 +0000 (08:53 -0700)]
Workaround for build error on sim-eng
This is not a good long-term fix.
target SharedLib: libOpenSLES (out/host/linux-x86/pr/sim/obj/SHARED_LIBRARIES/libOpenSLES_intermediates/LINKED/libOpenSLES.so)
out/host/linux-x86/pr/sim/obj/SHARED_LIBRARIES/libOpenSLES_intermediates/IAndroidEffect.o:(.data.rel.ro._ZTIN7android12SortedVectorINS_16key_value_pair_tImPNS_11AudioEffectEEEEE[typeinfo for android::SortedVector<android::key_value_pair_t<unsigned long, android::AudioEffect*> >]+0x10): undefined reference to `typeinfo for android::SortedVectorImpl'
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/pr/sim/obj/SHARED_LIBRARIES/libOpenSLES_intermediates/LINKED/libOpenSLES.so] Error 1
Change-Id: Iea6678d31d0f747651285e76f2c2e616937bfbd7
Glenn Kasten [Mon, 11 Oct 2010 00:12:57 +0000 (17:12 -0700)]
Glenn Kasten [Sun, 10 Oct 2010 23:11:51 +0000 (16:11 -0700)]
Add support for 8-bit and 48 kHz PCM
Change-Id: I9e4ab432dc966d0eb531457b0ca2661d0626255a
Glenn Kasten [Sun, 10 Oct 2010 23:47:10 +0000 (16:47 -0700)]
Fix build warnings
Change-Id: I449da85b97901a632591dd16a52cb924a2722883
Glenn Kasten [Sun, 10 Oct 2010 22:04:20 +0000 (15:04 -0700)]
Test cleanup
Fix bug in QueryEffect test - was not re-initializing the name length.
Add QueryEffect test for over-writing the name buffer.
Don't create output with VOLUME or NULL interfaces.
Use <stdlib.h> symbolic names for exit codes instead of 0 and 1.
Remove Android-style logging from examples; use only printf.
Remove extra blank lines in test output.
Remove the MAX_NUMBER_OUTPUT_DEVICES macro.
Use <unistd.h> to declare usleep.
Remove obsolete #include statements.
Fix build warnings.
Change-Id: I8d198a317246b3894f104edf7c9f317a51593d07
Glenn Kasten [Sun, 10 Oct 2010 18:03:21 +0000 (11:03 -0700)]
am
9a889c24: Interface testing and bug fixes
Merge commit '
9a889c24ace7bbc9659e1531d7a61dc43452d7c0'
* commit '
9a889c24ace7bbc9659e1531d7a61dc43452d7c0':
Interface testing and bug fixes
Glenn Kasten [Sat, 9 Oct 2010 16:39:39 +0000 (09:39 -0700)]
am
2a25d97e: Object an interface initialization/destroy cleanup
Merge commit '
2a25d97e40dbd5dd9195195a3a269095a4932097'
* commit '
2a25d97e40dbd5dd9195195a3a269095a4932097':
Object an interface initialization/destroy cleanup
Glenn Kasten [Thu, 7 Oct 2010 21:24:56 +0000 (14:24 -0700)]
More tests and bug fixes
New tests:
- urimime.c tests audio player with URI data source and MIME data format
- dim.c tests DynamicInterfaceManagement
- engine.c new test cases:
- create more than one engine simultaneously
- exit application without destroying engine first
Bug fixes:
- Can't request SLBufferQueueItf or its alias SLAndroidSimpleBufferQueueItf
if the data source is not a buffer queue.
- BufferQueue interface is explicit on AudioPlayer.
- OutputMixExt is unavailable (internal) on AudioPlayer.
- There was a nested mutex lock when resuming a non-suspended interface.
- This implementation supports at most one engine, so check for that
- Class configuration table had wrong entry for DynamicInterfaceManagement
on 4 of 10 classes.
Restore most of the infrastructure for removing interfaces (code review):
- DynamicInterfaceManagement is included, but body of RemoveInterface is compiled
out, and replaced by FEATURE_UNSUPPORTED until all our deinit hooks are clean.
- Remove hook must be called with mutex locked, rather than unlocked as before.
The remove hook is called during IDynamicInterfaceManagement::RemoveInterface
and Object::Destroy, so the entry conditions must be the same.
- Add NULL remove hooks to the interface hook table.
Change-Id: I328dd254ed24a32b220996a6d9592cc8c0f4e943
Miscellaneous:
- Always memset object to garbage in Object::Destroy to catch broken applications.
- Add comments about how GetInterface manipulates the v-table pointer (code review).
- Re-enable DynamicInterfaceManagement for testing the example code.
Glenn Kasten [Wed, 6 Oct 2010 16:52:44 +0000 (09:52 -0700)]
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
Glenn Kasten [Tue, 5 Oct 2010 14:46:26 +0000 (07:46 -0700)]
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
Glenn Kasten [Mon, 4 Oct 2010 19:09:06 +0000 (12:09 -0700)]
am
182f822e: Add new test, fix bugs found by test & code review
Merge commit '
182f822e7110bac4947ba8bded1c90ce8050c0fd'
* commit '
182f822e7110bac4947ba8bded1c90ce8050c0fd':
Add new test, fix bugs found by test & code review
Glenn Kasten [Thu, 30 Sep 2010 18:09:19 +0000 (11:09 -0700)]
Add new test, fix bugs found by test & code review
Bugs:
- EnvironmentalReverb::GetEnvironmentalReverbProperties left mutex
unlocked at end.
- buffer queue configuration test revealed not checking enough
combinations
- would have failed conformance test in a couple places
- replace peek locks by shared locks for SMP
- undocumented symbols were being exported by library
- fix handling of EffectSend for MIDI player
New test:
- Add reverb test
Miscellaneous:
- Move some FIXME to to-do list where they are easier to organize
- Fix typos in name of profile constant
- EffectSend::IsEnabled sets enabled = false for unsupported aux effect.
- Add curlies to if statements.
- Add more error logging.
- Fix indentation in switch statement.
- Add comments to makefile.
Details:
- Reduce visibility of libOpenSLESUT symbols.
- Use LOCAL_STATIC_LIBRARIES := libOpenSLESUT where needed in
applications.
- Move FIXME for OEM configuration, interface, SDL, Sndfile,
buffer queue, destroy to to-do list
- For SDL, disallow buffer queue with source not 44.1 kHz because it
is hard-wired to 44.1 kHz and there is no sample rate converter.
- return successful result for enabled effect send on unsupported
MIDI player
for future conformance testing
Change-Id: I39cb543169996f78c16e3ac363ea6157a9242743
Glenn Kasten [Thu, 30 Sep 2010 18:29:07 +0000 (11:29 -0700)]
am
6e13f90b: Merge "Add buffer queue configuration test" into gingerbread
Merge commit '
6e13f90bdc8c5354bef9a779a366216d87d9e5d9'
* commit '
6e13f90bdc8c5354bef9a779a366216d87d9e5d9':
Add buffer queue configuration test
Jean-Michel Trivi [Thu, 30 Sep 2010 18:26:50 +0000 (11:26 -0700)]
am
8c5a381a: Lock tweak between interface and object
Merge commit '
8c5a381a265210f069a370565f10ce31bf886346'
* commit '
8c5a381a265210f069a370565f10ce31bf886346':
Lock tweak between interface and object
Jean-Michel Trivi [Thu, 30 Sep 2010 18:25:45 +0000 (11:25 -0700)]
am
614d5407: Code cleanup: function name unification.
Merge commit '
614d5407d3fac1dae8975722f25e671642041282'
* commit '
614d5407d3fac1dae8975722f25e671642041282':
Code cleanup: function name unification.
Glenn Kasten [Thu, 30 Sep 2010 00:33:21 +0000 (17:33 -0700)]
Merge "Add buffer queue configuration test" into gingerbread
Glenn Kasten [Wed, 29 Sep 2010 23:37:02 +0000 (16:37 -0700)]
Add buffer queue configuration test
Add comments to makefile for each test
Change-Id: I8741d93e7aadb02c4b75e3a0a7a81d593dfa7f97
Jean-Michel Trivi [Thu, 30 Sep 2010 00:17:44 +0000 (17:17 -0700)]
am
67537364: Fix issues with SLPlaybackRateItf interface
Merge commit '
67537364adc48cd6fa56e36d4201428b5d9dedaf'
* commit '
67537364adc48cd6fa56e36d4201428b5d9dedaf':
Fix issues with SLPlaybackRateItf interface
Jean-Michel Trivi [Wed, 29 Sep 2010 22:51:44 +0000 (15:51 -0700)]
Lock tweak between interface and object
When locking the interface for the prefetch status, lock the
object instead of the prefetch interface, as it updates
the android object state.
Fix the playState test app.
Change-Id: Ib4e0e99a4cf0720e2b7ebd920fe92f69377f19d9
Jean-Michel Trivi [Wed, 29 Sep 2010 19:55:40 +0000 (12:55 -0700)]
Code cleanup: function name unification.
Change-Id: I37790738d81bb8d6b5496467a93c17c6f1385b8f
Jean-Michel Trivi [Wed, 29 Sep 2010 01:08:55 +0000 (18:08 -0700)]
Fix issues with SLPlaybackRateItf interface
Set rate was not applied when the AudioTrack is created after
prepare completed.
Modified playback rate functions in AudioPlayer to pass a
CAudioPlayer pointer, rather than a pointer to IPlaybackRate
so the rate update function can be queried from the CAudioPlayer.
Added test that exercises the SLPlaybackRateItf interface as
well as content looping.
Simplified evaluation of delay between decode and render to
use a fixed (small) delay that balances time to run the
event looper, and prevents clicks.
Change-Id: I598e9a96e93ef7a7c3603c8467f9d6b36dacd26d
Glenn Kasten [Wed, 29 Sep 2010 00:38:40 +0000 (17:38 -0700)]
am
3dbc7f94: Merge "Add MuteSolo checks for audio player and fix bugs" into gingerbread
Merge commit '
3dbc7f94e5273737f68cf42898945b3ce92b565e'
* commit '
3dbc7f94e5273737f68cf42898945b3ce92b565e':
Add MuteSolo checks for audio player and fix bugs
Glenn Kasten [Tue, 28 Sep 2010 22:54:50 +0000 (15:54 -0700)]
Merge "Add MuteSolo checks for audio player and fix bugs" into gingerbread
Glenn Kasten [Tue, 28 Sep 2010 14:28:21 +0000 (07:28 -0700)]
Add MuteSolo checks for audio player and fix bugs
The specification says "This [SLMuteSoloItf] interface cannot be
exposed on a player whose audio format is mono." This has a lot of
implications ...
Deny an explicit interface request for SLMuteSoloItf at audio player
creation time if the player is known pre-realize to have mono channel
count (e.g. PCM buffer queue).
Deny a GetInterface on MuteSolo if channel count is known to be mono,
but allow it if the channel count is still unknown.
When DynamicSource (or its replacement) is implemented, it will be
possible for the application to have done a GetInterface successfully,
and then to change the source such that the MuteSolo interface is
no longer valid. In that case, return SL_RESULT_FEATURE_UNSUPPORTED
for most MuteSolo operations, if called when channel count is unknown
or is mono. We _do_ allow MuteSolo::GetChannelCount to succeed if
channel count is known to be mono.
Enhance the URI-based mute solo test to check some of the above,
and the interactive buffer queue test to get and test the channel count.
Add curly braces to if statements.
Other bug fixes:
- Do not rely on peek locks; they don't work on SMP.
- Channel count and sample rate were not being set correctly
for buffer queue data source audio players.
- CreateAudioPlayer and AudioRecorder were both referring to
application pointers more than once, with the possibility of
reading inconsistent data.
Change-Id: Ie0109cbddc0aff8a56c0b53d989fb2be823e627b
Jean-Michel Trivi [Tue, 28 Sep 2010 20:20:07 +0000 (13:20 -0700)]
am
59c678dd: Merge "Fix bug
3004701 do not prefetch during Realize." into gingerbread
Merge commit '
59c678ddde54c2532ff64c6414f45e9a150d7651'
* commit '
59c678ddde54c2532ff64c6414f45e9a150d7651':
Fix bug
3004701 do not prefetch during Realize.
Glenn Kasten [Tue, 28 Sep 2010 20:19:37 +0000 (13:19 -0700)]
am
daccf40f: Enable and test more interface ID queries
Merge commit '
daccf40f73133a1220cc4ab8af45c59b1df9eeae'
* commit '
daccf40f73133a1220cc4ab8af45c59b1df9eeae':
Enable and test more interface ID queries
Glenn Kasten [Tue, 28 Sep 2010 20:19:34 +0000 (13:19 -0700)]
Jean-Michel Trivi [Tue, 28 Sep 2010 16:50:19 +0000 (09:50 -0700)]
Merge "Fix bug
3004701 do not prefetch during Realize." into gingerbread
Jean-Michel Trivi [Tue, 28 Sep 2010 00:12:52 +0000 (17:12 -0700)]
Fix bug
3004701 do not prefetch during Realize.
Removed unused Android object states in enum, not used in
play state machine.
Made SfPlayer responsible for the creation of its
AudioTrack once it knows the sample rate and number of
channels of the content to play once it's done
preparing.
Added notification from SfPlayer to signal when it's
done preparing. This informs of the audio characteristics
and kicks off the content prefetching.
In the AudioPlayer realize:
- do not start the prefetching, do it when the player
is set to PAUSED
- don not create the AudioTrack, do it when SfPlayer
is done preparing.
Change-Id: Ic345040e71cef0e5953ea47366930d1dfbc5e761
Glenn Kasten [Tue, 28 Sep 2010 00:30:18 +0000 (17:30 -0700)]
Enable and test more interface ID queries
Enable Engine::IEngine_QueryNumSupportedInterfaces and
Engine::QuerySupportedInterfaces.
Add object ID test.
Return SL_RESULT_FEATURE_UNSUPPORTED from Engine::Create... if the
corresponding class is not configured..
Add slesutObjectIDToString to utility toolkit.
Change-Id: I28b8beff71d65e7eccd558e586652bb606c89848
Glenn Kasten [Tue, 28 Sep 2010 04:29:32 +0000 (21:29 -0700)]
am
0673981b: Merge "Destroy for an unrealized engine was hanging" into gingerbread
Merge commit '
0673981b5807e901fc8f025052bcac0ac3654a7f'
* commit '
0673981b5807e901fc8f025052bcac0ac3654a7f':
Destroy for an unrealized engine was hanging
Jean-Michel Trivi [Tue, 28 Sep 2010 04:29:29 +0000 (21:29 -0700)]
am
6e31131d: Remove old stream type code that\'s not used anymore.
Merge commit '
6e31131dc148be814134987404c89ee946e432ca'
* commit '
6e31131dc148be814134987404c89ee946e432ca':
Remove old stream type code that's not used anymore.
Glenn Kasten [Tue, 28 Sep 2010 00:05:49 +0000 (17:05 -0700)]
Add engine interface test
Change-Id: I5c1fd1e8ab6dc050f416f28708e3ef218910cd8d
Glenn Kasten [Tue, 28 Sep 2010 00:13:09 +0000 (17:13 -0700)]
Merge "Destroy for an unrealized engine was hanging" into gingerbread
Jean-Michel Trivi [Tue, 28 Sep 2010 00:05:06 +0000 (17:05 -0700)]
Remove old stream type code that's not used anymore.
Change-Id: I66e0d93ffa8fbf8fd64642d5554026513d561153
Glenn Kasten [Mon, 27 Sep 2010 23:35:50 +0000 (16:35 -0700)]
Destroy for an unrealized engine was hanging
Change-Id: Ib11b15fe40726d2f9aad0c54fa66382824c95cfa
Glenn Kasten [Mon, 27 Sep 2010 21:39:59 +0000 (14:39 -0700)]
am
db7f4632: Initialize mEffects if audio player partly created
Merge commit '
db7f4632cb8a69a17bb1cbba82ed03ba36591e88'
* commit '
db7f4632cb8a69a17bb1cbba82ed03ba36591e88':
Initialize mEffects if audio player partly created
Glenn Kasten [Mon, 27 Sep 2010 15:37:09 +0000 (08:37 -0700)]
Initialize mEffects if audio player partly created
See https://android-git.corp.google.com/g/70088
File opensles/libopensles/android_AudioPlayer.cpp
Line 1111: if (NULL != pAudioPlayer->mAndroidEffect.mEffects) {
mAndroidEffect.mEffects is not initialized to NULL.
Change-Id: Ic6b952748c7a8024c797d7bec4a26cb138fa8840
Jean-Michel Trivi [Mon, 27 Sep 2010 18:47:25 +0000 (11:47 -0700)]
am
33d87958: Fix AudioTrack sessionId bug
Merge commit '
33d8795864d722be83cac7c6e7bc675991a7d7dc'
* commit '
33d8795864d722be83cac7c6e7bc675991a7d7dc':
Fix AudioTrack sessionId bug
Jean-Michel Trivi [Mon, 27 Sep 2010 17:50:34 +0000 (10:50 -0700)]
Fix AudioTrack sessionId bug
The sessionId associated with an AudioPlayer is initialized during
its creation. The sessionId was not passed to the AudioTrack
constructor.
Change-Id: I9ccafd707313367f8da78013575cd6048637f240
Jean-Michel Trivi [Mon, 27 Sep 2010 17:02:01 +0000 (10:02 -0700)]
am
3d2470a7: Remove unused Android object type AUDIOTRACK_PUSH
Merge commit '
3d2470a7f5c936182f1d6179b290814d8a620f9d'
* commit '
3d2470a7f5c936182f1d6179b290814d8a620f9d':
Remove unused Android object type AUDIOTRACK_PUSH
Jean-Michel Trivi [Mon, 27 Sep 2010 16:49:47 +0000 (09:49 -0700)]
Remove unused Android object type AUDIOTRACK_PUSH
Change-Id: I1ab5494ae47239eed0b0a18dc817e3b0ead37871
Jean-Michel Trivi [Mon, 27 Sep 2010 16:42:46 +0000 (09:42 -0700)]
am
90370624: Merge "Support content looping for URI and FD data sources." into gingerbread
Merge commit '
9037062468ac020b7c64992c6dba4dda066a5454'
* commit '
9037062468ac020b7c64992c6dba4dda066a5454':
Support content looping for URI and FD data sources.
Jean-Michel Trivi [Mon, 27 Sep 2010 16:37:38 +0000 (09:37 -0700)]
Merge "Support content looping for URI and FD data sources." into gingerbread
Jean-Michel Trivi [Sun, 26 Sep 2010 20:15:05 +0000 (13:15 -0700)]
Support content looping for URI and FD data sources.
Implement SetLoop() on AudioPlayer with URI and FD
data sources. Only looping over the whole duration
of the audio content is supported here.
Change-Id: Ic033f61063e57c3a9f8c51bad15852a42b21ab46
Glenn Kasten [Sun, 26 Sep 2010 22:17:50 +0000 (15:17 -0700)]
am
4a03820f: Restore the 2 unmerged equalizer tests
Merge commit '
4a03820f21ebdcb5fe949b9f88aa710417686d69'
* commit '
4a03820f21ebdcb5fe949b9f88aa710417686d69':
Restore the 2 unmerged equalizer tests
Glenn Kasten [Sun, 26 Sep 2010 21:51:17 +0000 (14:51 -0700)]
Restore the 2 unmerged equalizer tests
Change-Id: I667cfdddd34fff7017fedab9ee84e954c1c9f690
Jean-Michel Trivi [Sun, 26 Sep 2010 21:37:22 +0000 (14:37 -0700)]
am
d570bd0a: Log which effect initialization function is used.
Merge commit '
d570bd0affa00595dc79c0b7fbaf735de4c51407'
* commit '
d570bd0affa00595dc79c0b7fbaf735de4c51407':
Log which effect initialization function is used.
Jean-Michel Trivi [Sun, 26 Sep 2010 21:20:27 +0000 (14:20 -0700)]
Log which effect initialization function is used.
Change-Id: I7c5c7440e50d65faf3dadf360e7a3a23dc5d7781
Jean-Michel Trivi [Sun, 26 Sep 2010 21:16:26 +0000 (14:16 -0700)]
am
90417a10: Implement buffer cache fill level and status notification.
Merge commit '
90417a10fd988e37bc4e51b61c2fb8e70301345c'
* commit '
90417a10fd988e37bc4e51b61c2fb8e70301345c':
Implement buffer cache fill level and status notification.
Glenn Kasten [Sun, 26 Sep 2010 20:31:42 +0000 (13:31 -0700)]
am
0cfa1a91: Temporary fix for broken build
Merge commit '
0cfa1a912815f84c086c285e63cb01a4f0b1f93f'
* commit '
0cfa1a912815f84c086c285e63cb01a4f0b1f93f':
Temporary fix for broken build
Jean-Michel Trivi [Mon, 20 Sep 2010 23:01:25 +0000 (16:01 -0700)]
Implement buffer cache fill level and status notification.
OpenSL ES requires the notification of buffering status
changes and caching fill level updates. Fill level
updates happen only when the level has changed by
a certain amount.
Change-Id: I8b5e82ac1dfff35d7a27eda0dd1f395311d554f3
Glenn Kasten [Sun, 26 Sep 2010 19:04:19 +0000 (12:04 -0700)]
Temporary fix for broken build
Change-Id: I1b02cbe6ce22766ccbab4e8bf040418eba69d6fc
Glenn Kasten [Sun, 26 Sep 2010 18:47:45 +0000 (11:47 -0700)]
am
bd2fc031: Replace one configuration hack by another
Merge commit '
bd2fc031926582ee8b0df40673c66dfa4cc45a61'
* commit '
bd2fc031926582ee8b0df40673c66dfa4cc45a61':
Replace one configuration hack by another
Glenn Kasten [Sun, 26 Sep 2010 16:38:26 +0000 (09:38 -0700)]
Replace one configuration hack by another
Previous hack allowed an application to call GetInterface for any
interface prior to Realize. The new hack allows an application
to do so only for interfaces which have a "pre-realize OK"
relationship to their associated class. Currently this is
SL_IID_ANDROIDCONFIGURATION.
Reduce logging in record test.
Allow default tracing level to be set in makefile.
Line length 100.
Change-Id: Id17c55ee7284dca108e0eab379a8f987963fd8c4