Closed Bug 944167 Opened 11 years ago Closed 6 years ago

Updating of return value of opensl_stream_get_position() is not often in gonk

Categories

(Core :: Audio/Video: Playback, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE
tracking-b2g backlog
Tracking Status
b2g-v1.4 --- affected
b2g-v2.0 --- affected
b2g-v2.1 --- affected

People

(Reporter: sotaro, Unassigned)

Details

(Whiteboard: burirun3 )

+++ This bug was initially created as a clone of Bug #933376 +++ This bug is created based on Bug 933376 Comment 24. AudioClock::GetPosition() uses opensl_stream_get_position() to control audio clock. And opensl_stream_get_position() internally uses AudioTrack::getPosition() to get played audio duration. AudioTrack::getPosition()'s value is used for audio clock. Therefore the value needs to be updated often. But in gonk, it's update is not often. Updated just release the audio buffer. On ICS, it is tringger by AudioFlinger::ThreadBase::TrackBase::releaseBuffer(). http://androidxref.com/4.0.4/xref/frameworks/base/services/audioflinger/AudioFlinger.cpp#3289
No longer blocks: 877024
No longer depends on: 933376, 944132, 934106, 935118
blocking-b2g: --- → 1.3?
Keywords: regression
Version: 26 Branch → Trunk
This is a known problem in android.
Therefore android stagefright compensate audio time between buffer releases by using system time. It is done in AudioPlayer::getMediaTimeUs(). http://androidxref.com/4.4_r1/xref/frameworks/av/media/libstagefright/AudioPlayer.cpp#741 To do it, client side need to detect audio buffer release timing. AudioTrack provides this api. But I ma not sure OpenSLES API provide this capability.
What's the user impact of this bug? Is it a regression?
This is not a regression. It is same as in v1.1. It could affect to precise audio timing control. In current use cases this problem does not make a big problem. After supporting WebAudio, music and game applications/contents are going to use audio capability more. And it could affect to the audio control's quality. I think it is not urgent necessity. So, I changed the '1.3?' to 'madai?'.
blocking-b2g: 1.3? → madai?
(In reply to Sotaro Ikeda [:sotaro] from comment #2) > > To do it, client side need to detect audio buffer release timing. AudioTrack > provides this api. But I ma not sure OpenSLES API provide this capability. bufferqueue_callback() might be used if gecko do a similar thing. http://mxr.mozilla.org/mozilla-central/source/media/libcubeb/src/cubeb_opensl.c
Retiring the madai flag, updating nomination for triage.
blocking-b2g: madai? → 1.5?
This has been around for multiple releases, so we will not block on this.
blocking-b2g: 2.0? → backlog
blocking-b2g: backlog → ---
Component: Audio/Video → Audio/Video: Playback
Mass closing do to inactivity. Feel free to re-open if still needed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.