<feed xmlns='http://www.w3.org/2005/Atom'>
<title>android_frameworks_ex/variablespeed/jni/variablespeed.h, branch cm-13.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_frameworks_ex/'/>
<entry>
<title>Remove variable-speed library.</title>
<updated>2015-06-01T21:03:39+00:00</updated>
<author>
<name>Andrew Lee</name>
<email>anwlee@google.com</email>
</author>
<published>2015-06-01T21:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_frameworks_ex/commit/?id=9c9958ca6c51676cab549d19311df59a1b4ccf1a'/>
<id>9c9958ca6c51676cab549d19311df59a1b4ccf1a</id>
<content type='text'>
Bug: 21444991
Change-Id: I3e1fc7f0773ddfa227cde6b5161102a087f47702
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: 21444991
Change-Id: I3e1fc7f0773ddfa227cde6b5161102a087f47702
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix AudioEngine to allow re-initialization</title>
<updated>2014-03-05T20:26:33+00:00</updated>
<author>
<name>Jay Shrauner</name>
<email>shrauner@google.com</email>
</author>
<published>2014-02-26T18:08:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_frameworks_ex/commit/?id=8502b724a9fdc104e7b4a3aba1641e101b4c7be9'/>
<id>8502b724a9fdc104e7b4a3aba1641e101b4c7be9</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>AArch64: Fix GetChannelCount() declaration.</title>
<updated>2014-02-12T16:33:04+00:00</updated>
<author>
<name>Ashok Bhat</name>
<email>ashok.bhat@arm.com</email>
</author>
<published>2014-02-12T13:43:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_frameworks_ex/commit/?id=f12ca3072b5cbe4b43aa6dce1ab27a1c33e3a99f'/>
<id>f12ca3072b5cbe4b43aa6dce1ab27a1c33e3a99f</id>
<content type='text'>
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 &lt;ashok.bhat@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;ashok.bhat@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Allows selecting the audio stream used for playback.</title>
<updated>2011-09-01T11:23:19+00:00</updated>
<author>
<name>Flavio Lerda</name>
<email>flerda@google.com</email>
</author>
<published>2011-08-31T14:49:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_frameworks_ex/commit/?id=dc442b4d99512bf7c41ee5ceae6c93a3c3568b57'/>
<id>dc442b4d99512bf7c41ee5ceae6c93a3c3568b57</id>
<content type='text'>
Adds setAudioStreamType() to the MediaPlayerProxy interface and
implements it in the variable speed player.

Bug: 5240848
Change-Id: I1bb9fdbee7aa6113c5d5d5a8000e9794800fad9f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds setAudioStreamType() to the MediaPlayerProxy interface and
implements it in the variable speed player.

Bug: 5240848
Change-Id: I1bb9fdbee7aa6113c5d5d5a8000e9794800fad9f
</pre>
</div>
</content>
</entry>
<entry>
<title>Playback now handles any sample rate and channel combo.</title>
<updated>2011-07-29T10:52:12+00:00</updated>
<author>
<name>Hugo Hudson</name>
<email>hugohudson@google.com</email>
</author>
<published>2011-07-26T19:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_frameworks_ex/commit/?id=0bd6ec5bc06b869131ee0facf38ff02f81f65c10'/>
<id>0bd6ec5bc06b869131ee0facf38ff02f81f65c10</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Adds tests for Variable Speed code.</title>
<updated>2011-07-25T19:45:39+00:00</updated>
<author>
<name>Hugo Hudson</name>
<email>hugohudson@google.com</email>
</author>
<published>2011-07-25T16:04:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_frameworks_ex/commit/?id=9730f15ebbf4b64cd48e0777850e56cb516a9ed4'/>
<id>9730f15ebbf4b64cd48e0777850e56cb516a9ed4</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial check-in of variable speed playback library.</title>
<updated>2011-07-15T16:32:09+00:00</updated>
<author>
<name>Hugo Hudson</name>
<email>hugohudson@google.com</email>
</author>
<published>2011-07-14T22:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/LineageOS/android_frameworks_ex/commit/?id=b83ad73794088498d6d38cd3b4fc9311f505d051'/>
<id>b83ad73794088498d6d38cd3b4fc9311f505d051</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
</feed>
