| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ie8c525ddee862b32f2055cb89c10a680f0c14f97
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I2121211b0202bc39100d74232d63be94c7e8a8de
|
|/
|
|
| |
Change-Id: Ib40d8813ac713d09ed7b298521fada1a35ecb1d4
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Iafa1f823351e5849501ffc613f06940be27e9c6b
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Preliminary fix for torture test failure - move track ownership
Change-Id: I4c9de6a85cc0bd594f16bdb1a5de61f5f268cfdb
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
If a prefetch fails due to invalid data source,
then the application sets play state to PLAYING, it used to crash.
Change-Id: Iaba98c596005715ca6c057de543fa0921225e74c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: If573c06134810eafd4d41efeb938fa23ae77c2da
|
|/
|
|
|
|
|
| |
external/opencore.
Change-Id: I935b8f2851f4bfc244178131acaa913377efa1c2
related-to-bug: 3101573
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I6a7cb4c8bfca51eae71fb312b8ff43ce663a4c11
|
|/
|
|
|
|
|
|
| |
Notify an error occured during prefetching when StageFright
reports that a read error was encountered (other than EOS),
and stop playback.
Change-Id: I0c00ee76b148bd80a26679648322633d6e5533da
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I9e4ab432dc966d0eb531457b0ca2661d0626255a
|
|
|
|
| |
Change-Id: I449da85b97901a632591dd16a52cb924a2722883
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Add comments to makefile for each test
Change-Id: I8741d93e7aadb02c4b75e3a0a7a81d593dfa7f97
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
| |
Change-Id: I37790738d81bb8d6b5496467a93c17c6f1385b8f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
| |
Change-Id: I5c1fd1e8ab6dc050f416f28708e3ef218910cd8d
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ib11b15fe40726d2f9aad0c54fa66382824c95cfa
|
|/
|
|
| |
Change-Id: I66e0d93ffa8fbf8fd64642d5554026513d561153
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
The sessionId associated with an AudioPlayer is initialized during
its creation. The sessionId was not passed to the AudioTrack
constructor.
Change-Id: I9ccafd707313367f8da78013575cd6048637f240
|