The default bug view has changed. See this FAQ.

Port the android libsydneyaudio backend to gonk

RESOLVED FIXED

Status

()

Core
Audio/Video
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mwu, Assigned: mwu)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 581084 [details] [diff] [review]
Gonk libsydneyaudio backend

We'll basically be using a C++ flavor of AudioTrack, so the Android implementation can be simplified and ported.

One issue remains that I can't figure out how to fix - freeing the first AudioTrack we create causes gecko to crash the next time we attempt to create another AudioTrack. As a workaround, we intentionally leak the first AudioTrack we create.
Attachment #581084 - Flags: review?(kinetik)
Comment on attachment 581084 [details] [diff] [review]
Gonk libsydneyaudio backend

Presumably you can't use the existing Android backend because Gonk doesn't have a JVM, and you can't use this backend for Android because native AudioTrack access requires Android 2.3ish?

It's a bit of a shame to be adding more sydneyaudio backends now, since we're going to remove it completely in the near future (when bug 623444 is finally done), but this patch looks like a fairly straightforward translation of the android version, so hopefully not too much effort will be wasted.
Attachment #581084 - Flags: review?(kinetik) → review+
(Assignee)

Comment 2

5 years ago
(In reply to Matthew Gregan [:kinetik] from comment #1)
> Comment on attachment 581084 [details] [diff] [review]
> Gonk libsydneyaudio backend
> 
> Presumably you can't use the existing Android backend because Gonk doesn't
> have a JVM, and you can't use this backend for Android because native
> AudioTrack access requires Android 2.3ish?
> 

Correct.

> It's a bit of a shame to be adding more sydneyaudio backends now, since
> we're going to remove it completely in the near future (when bug 623444 is
> finally done), but this patch looks like a fairly straightforward
> translation of the android version, so hopefully not too much effort will be
> wasted.

Ahh, interesting. A callback based API does seem to map to what Android/Gonk wants more. Looking forward to that.
(Assignee)

Comment 3

5 years ago
Patch queued up here but I'm waiting for the trees to open or for someone to give me explicit approval to land.
Blocks: 709468
(Assignee)

Comment 4

5 years ago
Looks like platform specific code is ok to land.

https://hg.mozilla.org/mozilla-central/rev/351fcbc12030
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.