Commit graph

40 commits

Author SHA1 Message Date
Sebastian Dröge
2b7446e2d2 opensles: Include string.h for memcpy() 2013-03-21 15:43:50 +01:00
Sebastian Dröge
a63ed8cfc7 opensles: Only include <gst/audio/audio.h> 2013-03-03 12:30:44 +01:00
Tim-Philipp Müller
9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Sebastian Dröge
9e4f1e7346 opensles: Fix compilation with debugging enabled 2012-11-02 11:25:21 +01:00
Sebastian Dröge
1f6944efc1 opensles: Remove unused variable 2012-11-01 15:38:32 +01:00
Sebastian Dröge
40ca6ed977 opensles: Make sure to only ever create a single engine object
The OpenSL ES spec defines:

An implementation shall enable creation of at least one such object, but
attempting to create more instances (either by a single application or by
several different applications) may fail.
2012-11-01 15:38:23 +01:00
Sebastian Dröge
e0026d7203 opensles: Port to 1.0 2012-10-25 14:05:49 +02:00
Sebastian Dröge
9c1543bd79 opensles: Integrate into build system 2012-10-18 14:03:10 +02:00
Josep Torra
e4810c3420 openslessink: Return 0 delay if the player object is in PAUSED state 2012-10-18 14:03:10 +02:00
Josep Torra
7c3a9c2974 opensles: fixes noise on seekeing 2012-10-18 14:03:10 +02:00
Josep Torra
adcf73e43f opensles: chain up on _clear_all 2012-10-18 14:03:10 +02:00
Josep Torra
69426572f8 opensles: implement the ringbuffer clear_all vmethod too 2012-10-18 14:03:09 +02:00
Josep Torra
fc087f6419 opensles: initial attempt to reduce the src latency 2012-10-18 14:03:09 +02:00
Josep Torra
920354eb0d opensles: sprinkle comments and cosmetic fixes 2012-10-18 14:03:09 +02:00
Josep Torra
78e3b9f428 opensles: check for device outputs in the mixer 2012-10-18 14:03:09 +02:00
Josep Torra
1d9f48a33d opensles: drop 48kHz sample rate
OpenSL ES implementation in Android is just a 'facade' API on top of
AudioFlinger which will downsample 48kHz into 44.1kHz before
delivering the audio to the underlaying hardware.

We found that it suffer some sort of underrun when the downsample
enters in action so relay on our good resampler to take care of that
and fix the clicks issue. And get an extra bonus of a lower latency.
2012-10-18 14:03:09 +02:00
Josep Torra
9cc7e6a74d opensles: change the defaults to use 20 ms ringbuffer segments
In my nexus7 seems that the internal min buffer size is 20 ms so make
our segments match.
2012-10-18 14:03:09 +02:00
Josep Torra
97a1ccfab1 opensles: ensure that we register the callback only in STOPPED
Fixes the error registering the callback on the PLAYING -> PAUSE ->
PLAYING state change sequence.
2012-10-18 14:03:09 +02:00
Josep Torra
e265cec514 opensles: cap queue size
Just in case we want to tweak the sink behaviour with buffer-time and
latency-time properties cap the queue size to something reasonable.
2012-10-18 14:03:09 +02:00
Josep Torra
cc6fc15674 opensles: sink to provide the audioclock by default 2012-10-18 14:03:09 +02:00
Josep Torra
08ef2e3eed opensles: only drain half ringbuffer on start
At start drain half ringbuffer into the OpenSL so the writting/reading
pointers will start at half ringbuffer distance.
2012-10-18 14:03:09 +02:00
Josep Torra
3698d98921 opensles: monitor some player events 2012-10-18 14:03:09 +02:00
Josep Torra
3ff51bb88b opensles: rework around the _delay function 2012-10-18 14:03:09 +02:00
Josep Torra
27cdb7c2ca opensles: implement _delay function 2012-10-18 14:03:09 +02:00
Josep Torra
9fcfa00680 opensles: refactor to behave more like other sinks
Reflect the queue in our own data buffer.
Drop the _commit hook that wasn't usefull.
Don't mess with the segsize/segtotal.
2012-10-18 14:03:09 +02:00
Josep Torra
ed5870b605 opensles: read player position and show it in the log 2012-10-18 14:03:09 +02:00
Josep Torra
1e69918f3e opensles: do not provide a clock in the sink element. 2012-10-18 14:03:08 +02:00
Josep Torra
b00049a9f6 opensles: rework on start/stop operations and callback function handling 2012-10-18 14:03:08 +02:00
Josep Torra
f00d5a5cac opensles: fixes 8 bit format which is unsigned on android. 2012-10-18 14:03:08 +02:00
Josep Torra
eb6715a305 opensles: attempt to reduce playback latency 2012-10-18 14:03:08 +02:00
Josep Torra
1d9e16fb78 opensles: drop _buffer_clear calls and refactor to a shared _enqueue_cb 2012-10-18 14:03:08 +02:00
Josep Torra
1694befac6 opensles: use 0.25s segments in the sink to lower latency 2012-10-18 14:03:08 +02:00
Josep Torra
5612936d1a opensles: finish remaining bits for source element. 2012-10-18 14:03:08 +02:00
Josep Torra
c006973a4e opensles: attempt to query device for capabilities 2012-10-18 14:03:08 +02:00
Josep Torra
85bd75a2b1 opensles: add the mute property and handle volume/mute changes on the fly 2012-10-18 14:03:08 +02:00
Josep Torra
f06688c7b2 opensles: make the volume property actually work 2012-10-18 14:03:08 +02:00
Josep Torra
0291953997 opensles: rework on the ringbufffer to properly clear segments
Make the segments bigger (1 second) as it seems to be the minimum size
we need to not introduce noise.
Sink works in my nexus 7 with rates from 8000 to 44100 and some noise
can be noticed on higger sample rates.
2012-10-18 14:03:08 +02:00
Josep Torra
29334f3233 opensles: fixes the license headers 2012-10-18 14:03:08 +02:00
Josep Torra
805a010dc9 opensles: produces expected output until ringbuffer wraps
Add some log messages.
Fixed a bit the _player_cb function and properly advance reding in the
ringbuffer.
Still produces noise when the ringbuffer wraps.
2012-10-18 14:03:08 +02:00
Josep Torra
f6aa2f29bc opensles: Add initial draft implementation of OpenSL ES plugin.
Initial draft implementation for a OpenSL ES based plugin for Android
that provides audio src and sink.
2012-10-18 14:03:08 +02:00