Last Comment Bug 710051 - Port the android libsydneyaudio backend to gonk
: Port the android libsydneyaudio backend to gonk
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: unspecified
: All Gonk (Firefox OS)
: -- normal (vote)
: ---
Assigned To: Michael Wu [:mwu]
:
: Maire Reavy [:mreavy]
Mentors:
Depends on:
Blocks: 709468
  Show dependency treegraph
 
Reported: 2011-12-12 16:19 PST by Michael Wu [:mwu]
Modified: 2011-12-12 17:37 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Gonk libsydneyaudio backend (27.67 KB, patch)
2011-12-12 16:19 PST, Michael Wu [:mwu]
kinetik: review+
Details | Diff | Splinter Review

Description Michael Wu [:mwu] 2011-12-12 16:19:36 PST
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.
Comment 1 Matthew Gregan [:kinetik] 2011-12-12 17:10:05 PST
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.
Comment 2 Michael Wu [:mwu] 2011-12-12 17:15:35 PST
(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.
Comment 3 Michael Wu [:mwu] 2011-12-12 17:33:29 PST
Patch queued up here but I'm waiting for the trees to open or for someone to give me explicit approval to land.
Comment 4 Michael Wu [:mwu] 2011-12-12 17:37:45 PST
Looks like platform specific code is ok to land.

https://hg.mozilla.org/mozilla-central/rev/351fcbc12030

Note You need to log in before you can comment on or make changes to this bug.