History log of /frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
187dcd4eeaeace78665dafcee6acb074ef390545 29-Aug-2017 Phil Burk <philburk@google.com> aaudio example: print timestamps during callbacks.

Bug: 63918065
Test: this is a test
Change-Id: Id25dd36764761583986d3ce29f7d82032ec4539f
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
7a61a3ae540748164068683cadacaea5ed225d68 10-Jul-2017 Phil Burk <philburk@google.com> aaudio examples: handle disconnect in write_sine_callback

Automatically reopen the stream if we get disconnected.
Add a futex based signaling class so that the error callback can
immediately inform a waiting thread.

This can be used to prevent the system from playing an unpleasant sound
after the stream is disconnected.

Bug: 63342351
Test: plug and unplug headphones while running write_sine_callback
Change-Id: I3ea4fb24106156a29d2f302f3eb614f25f1b758a
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
e008d02aee6667ecafb44bf84eeb1675cb07dfef 23-Aug-2017 Phil Burk <philburk@google.com> aaudio examples: Add deviceId option to examples

Note that this uses the -d option, which used to be for durationSeconds.
We now use the -s option for seconds.

Bug: 64981153
Test: this is a test
Change-Id: I9789a1f520dc93bfb26143582dacb9619650abf7
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
faeb8b20e8ce98d308ca5ec095eeba6583cd9ec6 26-Jul-2017 Phil Burk <philburk@google.com> aaudio: fix getXRunCount

Mixer was not advancing FIFO when underflowed so the client could not
detect the xrun.
Also underruns could cause the stream to drift in time relative to other
streams.

Bug: 64033855
Test: trigger underruns by sleeping in a callback
Change-Id: Ia038f5048ffbff3b82e9d86e6807483dfe6879d0
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
fcf9efd59e36759ee7df66fdfce4f8eedeb376e4 14-Jul-2017 Phil Burk <philburk@google.com> aaudio: add glitch detection to loopback, improve latency check

Also improve automatic loop gain control for latency testing.
Use ArgParser to parse command line options.

Bug: 38178592
Test: this is a test
Change-Id: Idfe8f25544a3e7c74ee15be008bf34e3a0741455
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
44795237e0f43d6efe16ef1cb047ce7ea0cbb870 01-Jul-2017 Phil Burk <philburk@google.com> aaudio: command line argument parser

Generic parser that is used in multiple examples.

Added -n{numberOfBursts} for buffer size.

This is being used to test the MMAP features.

Bug: 63002656
Test: this is a test
Change-Id: Idf7560f9bb3ed7834f6c4686dd6009f27f04220e
Merged-In: Idf7560f9bb3ed7834f6c4686dd6009f27f04220e
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
629afae6135e6dc1e88ab4080f984fb30b3cdd7c 26-May-2017 Eric Laurent <elaurent@google.com> aaudio: add tests for device switch detection and refactor

Add detection for device switch during capture and playback tests:
write_sine, write_sine_callback, input_monitor, input_monitor_callback

Refactor tests and move simple player, simple recorder and utility
methods in separate header files and folder.

Bug: 33355262
Test: run write_sine and input_monitor tests
Change-Id: Iced66fa4344aecd8a2952e22a98e6e8454f38a5e
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
30a707773a043e5eebd552d369c0882f886b67e5 16-May-2017 Phil Burk <philburk@google.com> aaudio: update stream performance mode after open

For example, if you cannot get a FAST track then
the performanceMode of the stream will be AAUDIO_PERFORMANCE_MODE_NONE
instead of AAUDIO_PERFORMANCE_MODE_LOW_LATENCY

Bug: 38268707
Test: write_sine_callback.cpp, change modes and sample rates
Change-Id: I33648bd48fd00d588424fa7e4deb2c57c5008423
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
4485d41bcded0eceec7ec97d50aa2b0e702397a0 10-May-2017 Phil Burk <philburk@google.com> aaudio: fix output bugs and improve input performance, add loopback test

Support AAUDIO_PERFORMANCE_MODE in AudioStreamRecord.cpp
Fix race condition when closing a stream, which this test revealed.
Fix setting of negative notificationFrames for non-FAST tracks.

Convert test from old Oboe API to AAudio.
Add command line options to the test.
Add systrace calls.

Bug: 34093052
Bug: 38313432
Bug: 38178592
Test: loopback.cpp
Change-Id: Ib6d2995cdd3ed432937fde2f26c5394013f0d6e0
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
e2fbb59e729f6c3cade3b531f6f6411417ccbf40 02-May-2017 Phil Burk <philburk@google.com> aaudio: add setPerformanceMode()

The performance mode affects the latency and the implementation of the
data path.

MMAP is still disabled for now.

Bug: 37867485
Test: write_sine.cpp
Change-Id: I9bf5d5d13d1047d5ace69bd5ebdce7b6d65c14e7
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
e572f469de5dca1078a79d3d80e5b04f96ae7505 20-Apr-2017 Phil Burk <philburk@google.com> aaudio: apply volume in the MMAP data path

The volume scaling is in AudioStreamInternal and not the mixer
because we will need volume scaling in EXCLUSIVE mode too.

Bug: 37518243
Test: play a tone using NativeOboe app then press volume keys
Change-Id: Ibbac9770ea4493f8ade64681be86f109a92803cd
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
20523edbf2f597c53b90e76694331c807e559515 25-Apr-2017 Phil Burk <philburk@google.com> aaudio: change samplesPerFrame() to channelCount()

Both functions provided for now.
Will remove deprecated function in later CL.

Bug: 37646784
Test: write_sine.cpp and write_sine_callback.cpp
Change-Id: I1241aafa206112c526d6ca250ba5209489e1a46e
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
71f35bb687476694882a617ba4a810a0bb56fe23 14-Apr-2017 Phil Burk <philburk@google.com> aaudio: fix SHARED MMAP mode in server plus other bugs

Fixed some buffer miscalculations, and some NPEs in the close() code.
Added debugging and some general cleanup.
Fixed data conversion.
Fixed start/pause/flush in server.
Added reference counting in server for endpoints.
Programs can now be ran more than once.
General code cleanup.
Reconnect with service if server dies.
Move stop() logic into server for better synchronization.
Add sleep to prevent race condition when closing an MMAP stream.

Bug: 33398120
Test: two write_sine_callback.cpp can be run simultaneously
Change-Id: Ibb006215a498868c222228d675ff961d7e0bf514
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp
e4d7bb418df0fdc4c708c334ba3601f5ed8d89b3 28-Mar-2017 Phil Burk <philburk@google.com> libaaudio: implement callback

Use AudioTrack and AudioRecord TRANSFER_CALLBACK.
Add FixedBlockAdapter to provide fixed size callbacks.

Bug: 36489240
Test: CTS test_aaudio.cpp
Change-Id: Id2034dd640f878dd27fee6b43ad80a01c627dfd6
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit c8f372c22a0e4c667a3ad3c1ec569032574c1d64)
/frameworks/av/media/libaaudio/examples/write_sine/src/write_sine_callback.cpp