Closed Bug 710051 Opened 13 years ago Closed 13 years ago

Port the android libsydneyaudio backend to gonk

Categories

(Core :: Audio/Video, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mwu, Assigned: mwu)

References

Details

Attachments

(1 file)

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+
(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.
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
Looks like platform specific code is ok to land.

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

Attachment

General

Created:
Updated:
Size: