• Home
  • History
  • Annotate
  • only in /frameworks/ex/variablespeed/jni/
History log of /frameworks/ex/variablespeed/jni/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a1443de26fb9520cac180ef0add5c54e9780be48 08-May-2014 Ying Wang <wangying@google.com> am 53691ed1: am 3696df84: am 552866a9: Merge "Remove unused LOCAL_LDLIBS."

* commit '53691ed19b435c307ea0febd2be8e4dd77c43743':
Remove unused LOCAL_LDLIBS.
53691ed19b435c307ea0febd2be8e4dd77c43743 08-May-2014 Ying Wang <wangying@google.com> am 3696df84: am 552866a9: Merge "Remove unused LOCAL_LDLIBS."

* commit '3696df848aa7c574f913c97c3bf415b634934048':
Remove unused LOCAL_LDLIBS.
3696df848aa7c574f913c97c3bf415b634934048 08-May-2014 Ying Wang <wangying@google.com> am 552866a9: Merge "Remove unused LOCAL_LDLIBS."

* commit '552866a940b27ca5b199846201650c61adc7e466':
Remove unused LOCAL_LDLIBS.
0e298c7c189e01412103e0d94c2dbffc98caf05b 08-May-2014 Ying Wang <wangying@google.com> Remove unused LOCAL_LDLIBS.

Change-Id: Ib380f4b91df6a01e666c9b9eef2d93d93c043fc0
ndroid.mk
926d2878d40940b3bc1ac013d425296b1e237b41 07-Mar-2014 Narayan Kamath <narayan@google.com> am 56bab444: Merge "AArch64: Fix GetChannelCount() declaration."

* commit '56bab444c3bc89bb63aac728f549bd3261d01f6f':
AArch64: Fix GetChannelCount() declaration.
2a535d755db5c365041625cfda4e533c93899d60 07-Mar-2014 Narayan Kamath <narayan@google.com> am 9ddd5eeb: Merge "AArch64: Minor JNI type changes"

* commit '9ddd5eebd43aeaeb2e5b366b497e7576ca5c3ef9':
AArch64: Minor JNI type changes
ce2b95ae200332495b348be07f77fe60b6c23dcc 26-Feb-2014 Jay Shrauner <shrauner@google.com> Fix AudioEngine to allow re-initialization - DO NOT MERGE

Add AudioEngine::CompareAndSetEngine and change
VariableSpeed::initializeEngine to use this method so it only initializes
a new engine once rather than asserting on subsequent calls.

Change AudioEngine::DeleteEngine so it ignores repeated calls instead of
asserting. Add VariableSpeed::isReadyToPlay so callers can detect when
the audio library has been properly initialized.

Bug:11511992
Change-Id: I4517cb2ab4c186da43dffc7dbc2a9ad49000059f
(cherry picked from commit 8502b724a9fdc104e7b4a3aba1641e101b4c7be9)
ni_entry.cc
ariablespeed.cc
ariablespeed.h
8502b724a9fdc104e7b4a3aba1641e101b4c7be9 26-Feb-2014 Jay Shrauner <shrauner@google.com> Fix AudioEngine to allow re-initialization

Add AudioEngine::CompareAndSetEngine and change
VariableSpeed::initializeEngine to use this method so it only initializes
a new engine once rather than asserting on subsequent calls.

Change AudioEngine::DeleteEngine so it ignores repeated calls instead of
asserting. Add VariableSpeed::isReadyToPlay so callers can detect when
the audio library has been properly initialized.

Bug:11511992
Change-Id: I4517cb2ab4c186da43dffc7dbc2a9ad49000059f
ni_entry.cc
ariablespeed.cc
ariablespeed.h
56bab444c3bc89bb63aac728f549bd3261d01f6f 14-Feb-2014 Narayan Kamath <narayan@google.com> Merge "AArch64: Fix GetChannelCount() declaration."
787277ee4eb958320a9fd59c3381971b2636ab6d 12-Feb-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Minor JNI type changes

Change-Id: I7c95da3b242c8276ae32ca152fdf7c4532cc42aa
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
ni_entry.cc
f12ca3072b5cbe4b43aa6dce1ab27a1c33e3a99f 12-Feb-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Fix GetChannelCount() declaration.

Two fixes
[x] GetChannelCount() return type is size_t in the declaration and
SLuint32 in the definition. It should be SLuint32 in both places.
[x] CreateAndRealizeAudioPlayer has a size_t parameter channelCount.
This should should be SLuint32 as the actual parameter is SLuint32.

Change-Id: I64666e1cc6930bf0ea500974609305d6afb476bc
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
ariablespeed.cc
ariablespeed.h
a3b037722065668349e1da3dab26b5ce1509e553 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: I64962c4175c8bb6e98cdd39efd3982d55082c66d
ndroid.mk
cd961432e31018599e107ef7bc008fd28d70b0c7 03-Jul-2012 Glenn Kasten <gkasten@google.com> Initialize requested interfaces array

Bug: 6768181
Change-Id: Ic8ca44594aea8a0e50740fe69270464ccdd7da6c
ariablespeed.cc
0bf0772111444b4b4d591344efc32c47f7646a5e 27-Mar-2012 Glenn Kasten <gkasten@google.com> Fix build

Change-Id: I998b4503bbc6b8ce2149e6801548749a54b237b2
ndroid.mk
efaa38a16baad0f8665ac23f8e0a8ba166daf75d 09-Sep-2011 Hugo Hudson <hugohudson@google.com> Fix playback in variable speed audio.

- Recent changes to system/media broke variable speed playback.
- Traced to http://go/android-cl/132098 which presumed that variable
speed playback wasn't using the renamed sample rate field, but we
had our own copy of the field (it wasn't previously available in the
api).
- This cl also fixes the TODO by removing our own copy of the fields,
and using instead the defines from the OpenSL android api directly.

Bug: 5282965
Change-Id: I58033e9299d26d6a05259e4d50708d27fc3fa7e1
ariablespeed.cc
e863816a885b0a0e1a0930969fe3e818f68f2478 02-Sep-2011 Flavio Lerda <flerda@google.com> Enables detailed logging during variable speed playback.

This commit adds support for dynamically enabling logging in the
variable speed library if log.tag.VariableSpeed is set.

After this change, you can enable logging by running:

adb shell setprop log.tag.VariableSpeed 1

Logging will be disabled after reboot or after running:

adb shell setprop log.tag.VariableSpeed ""

The logging in the library is quite verbose, so we do not want to enable
it by default.

Bug: 5253004
Change-Id: I3addde5552093eb0c4926b67245d578a7da0fb7a
ariablespeed.cc
dc442b4d99512bf7c41ee5ceae6c93a3c3568b57 31-Aug-2011 Flavio Lerda <flerda@google.com> Allows selecting the audio stream used for playback.

Adds setAudioStreamType() to the MediaPlayerProxy interface and
implements it in the variable speed player.

Bug: 5240848
Change-Id: I1bb9fdbee7aa6113c5d5d5a8000e9794800fad9f
ni_entry.cc
ariablespeed.cc
ariablespeed.h
d2772c48b3ba3cb78f814f83f4a65bbac2cf8337 27-Aug-2011 Hugo Hudson <hugohudson@google.com> Fix the audio stutter during playback.

- Was using the base pointer from callback context when I meant to be
using the 'current position' pointer.

Bug: 5114126
Change-Id: Ie9baded973672cd8ac7ffe0f16f1bdf22c8f1030
ariablespeed.cc
64f5ba670d215847192b4ff46dc4538565f2f551 10-Aug-2011 Hugo Hudson <hugohudson@google.com> Fix a rare crash.

- Crash could be reproduced by seeking to the very end of a voicemail,
playing the voicemail to see the ui reset to beginning, then
increasing rate.
- Reason was that during playback, insufficient data has been read to
read the sample rate and channels, and in that situation the increase
rate requires constructing the time scaler, which in turn requires
a valid sample rate and channels.
- Added a test to prove that the bug exists, and to prove the fix which
is to ignore the rate change call when sample rate and channels not
known.
- Also added another unit test in the process to verify that it's safe
to call set rate at any point during the life cycle of the player.

Bug: 5140693
Change-Id: I474e5769f2b72762348534e4d06104af247e8726
ariablespeed.cc
0bd6ec5bc06b869131ee0facf38ff02f81f65c10 26-Jul-2011 Hugo Hudson <hugohudson@google.com> Playback now handles any sample rate and channel combo.

Main stuff
- Delayed construction of audio player until after sample rate and
channels have been read from the first callback.
- Removed all sample rate and channels from outward facing api.
- Remove pause playing and prefetch duration and sample rate hacky code.
- Fixes handling of any sample rate by removing switch statement.
- Fixes a HORRIBLE bug introduced in last cl where I was creating the
callback context on the stack inside a method call, and using it a
pointer to it long after the object had been erased from the stack.
[worse yet: it still mostly worked fine!]

Other
- Fixes an obvious failure case of all tests - duh - I was calling setUp()
before setting the executor properly, so they were giving NPEs.
- Correct calculation of totalDuration now done on first decode callback.
- This will let us remove MediaPlayer from prepare() in follow up.
- Initializing the engine outside of the PlaybackRunnable, is cleaner.
- Adds static methods for reading duration and position, again so that
follow up can have accurate get current position rather than best guess.
- Buffers in use for decoding also not created until first decode callback.
- Introduces some wicked-cool OpenSL macro to log api calls, make the
api calls and check the result value.

Bug: 5048252
Bug: 5048257
Change-Id: I60705fa6c6ab29a35740f22bef76450e8c1d25a2
ni_entry.cc
ariablespeed.cc
ariablespeed.h
9730f15ebbf4b64cd48e0777850e56cb516a9ed4 25-Jul-2011 Hugo Hudson <hugohudson@google.com> Adds tests for Variable Speed code.

The test changes:
- Adds many, many test cases against a MediaPlayerProxy, checking that
it behaves to the contract of a MediaPlayer.
- Adds the RealMediaPlayer class to check a real MediaPlayer.
- Adds the VariableSpeed class, to check a VariableSpeed instance
against the same contract as the MediaPlayer.
- Adds an Android.mk for the unit tests.
- Adds also an AndroidManifest.xml for the unit tests.
- Adds some test asset media files (3gpp file and mp3 file).

Required for the test changes:
- Adds a DynamicProxy class to adapt a MediaPlayer as a
MediaPlayerProxy class, i.e. to test the implementation of
MediaPlayerProxy, required to avoid writing an adapter.
- Adds a couple of listeners, OnErrorListener and
OnCompletionListener, that can be waited for synchronously in unit
tests.

Improvements as a result of the tests:
- During the testing, fixes the case where we weren't throwing
IllegalStateException if asked for the duration on released player.
- Refactored the create engine, create and realize output mix, create
and realize audio player, get play interfaces and callbacks, all
separated into their own static methods.
- This allows me to create the audio player during the main while loop
actually after the decoding has begun rather than before starting.
This work is a precursor to using the decoder's report on sample rate
and channels as the input to these methods.
- slSampleRate and slOutputChannels no longer computed in the
constructor, but computed when needed in the construction and
realization of the audio player.

Other changes:
- Remove some overly verbose logs on getDuration() and
getCurrentPosition().
- Adding the decoder interface to the callback.
- Extract metadata from decoder method now takes the metadata
interface, so this will be usable from the decoder callack in a follow
up.
- Temporarily stop getting the metadata out of the decoder, I'm going
to be doing it on the decoding callback instead.
- Renames the comment in AndroidManifest.xml to describe the
correct invocation to run the common tests.

Bug: 5048252
Bug: 5048257
Change-Id: Icdc18b19ef89c9924f73128b70aa4696b4e727c5
ni_entry.cc
ariablespeed.cc
ariablespeed.h
b83ad73794088498d6d38cd3b4fc9311f505d051 15-Jul-2011 Hugo Hudson <hugohudson@google.com> Initial check-in of variable speed playback library.

Contains an implementation of time-domain audio scaler, for
pitch-invariant speed up and slow-down of audio.

Contains wrapper library using OpenSLES to pump audio from
encoded stream (mp3 file etc) through audio decoder then
through time scaler and out to media player.

This is written as a jni library with jni hooks to allow
driving of this from the Java side.

The other part of this cl is the Java wrapper. There is a
new interface MediaPlayerProxy, containing a subset of the
methods found on the MediaPlayer. The VariableSpeed class
provides a concrete implementation of this interface
adapting to the jni code.

Change-Id: I518d8bf703488628c00730241a08ebfb67588ca6
ndroid.mk
ecode_buffer.cc
ecode_buffer.h
logging.h
ntegral_types.h
ni_entry.cc
acros.h
o_synchronization.h
rofile_timer.h
ing_buffer.cc
ing_buffer.h
ola_time_scaler.cc
ola_time_scaler.h
ariablespeed.cc
ariablespeed.h