Closed
Bug 927852
Opened 11 years ago
Closed 11 years ago
don't use Moz Audio API in the Gaia TonePlayer (dialer and system/emergency-call)
Categories
(Firefox OS Graveyard :: Gaia::Dialer, defect)
Tracking
(blocking-b2g:1.3+)
People
(Reporter: gal, Assigned: kinetik)
References
Details
Attachments
(1 file, 2 obsolete files)
The Moz Audio API is deprecated and we should use Web Audio instead. We are about to drop Moz Audio API so we should replace this for 1.3.
apps/communications/dialer/js/keypad.js: this._audio.mozSetup(1, this._sampleRate);
apps/system/emergency-call/js/keypad.js: this._audio.mozSetup(2, this._sampleRate);
Reporter | ||
Updated•11 years ago
|
blocking-b2g: --- → 1.3+
Updated•11 years ago
|
Summary: don't use Moz Audio API → don't use Moz Audio API in the Gaia TonePlayer (dialer and system/emergency-call)
Comment 1•11 years ago
|
||
An old WIP patch can be found here: https://github.com/etiennesegonzac/gaia/compare/web-audio-tone-player
Assignee | ||
Comment 2•11 years ago
|
||
Something like this? Tested locally on desktop, not on actual phone hardware.
Attachment #821455 -
Flags: feedback?(etienne)
Updated•11 years ago
|
Assignee: nobody → etienne
Target Milestone: --- → 1.3 Sprint 4 - 11/8
Comment 3•11 years ago
|
||
(In reply to Matthew Gregan [:kinetik] from comment #2)
> Created attachment 821455 [details] [diff] [review]
> bug927852_v0.patch
>
> Something like this?
Well yes, something *exactly* like this :)
Taking the liberty to assign this to you since it's pretty much done here.
Assignee: etienne → kinetik
Comment 4•11 years ago
|
||
Comment on attachment 821455 [details] [diff] [review]
bug927852_v0.patch
* bug 922569 should introduce some unit-test coverage for the TonePlayer, which would help with adding some here
* it's probably a good time to put the TonePlayer in shared/ and have a little bit less duplication between the dialer and the system app
But those 2 things could be filed as follow up bug, depends on how much time you have :)
Attachment #821455 -
Flags: feedback?(etienne) → feedback+
Assignee | ||
Comment 5•11 years ago
|
||
Thanks Etienne, I've put a pull request up: https://github.com/mozilla-b2g/gaia/pull/13245
I don't have much time to spend on this (just want to kill the old audio API as soon as possible), so I'll leave your excellent suggestions for a followup bug.
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #821455 -
Attachment is obsolete: true
Attachment #824973 -
Flags: review?(etienne)
Comment 7•11 years ago
|
||
Follow up bug 933278 is open for the unit-tests.
Comment 8•11 years ago
|
||
Comment on attachment 824973 [details]
fix
r=me with a small nit:
the kShortPressDuration is 0.25 in the emergency call keypad, and 0.3 in the dialer.
We should probably use the same value in both places (I like the result better with 0.25 fwiw).
Attachment #824973 -
Flags: review?(etienne) → review+
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Etienne Segonzac (:etienne) from comment #8)
> the kShortPressDuration is 0.25 in the emergency call keypad, and 0.3 in the
> dialer.
>
> We should probably use the same value in both places (I like the result
> better with 0.25 fwiw).
That's what the original code had, so I kept it, but it makes sense to standardize on something. I pushed a small followup that uses 0.25 everywhere.
I think this is ready to be merged now. Since the pull request is already active, is there anything else I need to do?
Assignee | ||
Updated•11 years ago
|
Attachment #824973 -
Attachment is patch: false
Attachment #824973 -
Attachment mime type: text/plain → text/x-github-pull-request
Comment 10•11 years ago
|
||
(In reply to Matthew Gregan [:kinetik] from comment #9)
> I think this is ready to be merged now. Since the pull request is already
> active, is there anything else I need to do?
Can you squash the commits into one? Thanks, then it's ready to merge.
Assignee | ||
Comment 11•11 years ago
|
||
(In reply to Etienne Segonzac (:etienne) from comment #10)
> Can you squash the commits into one? Thanks, then it's ready to merge.
Thanks, done!
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 12•11 years ago
|
||
Is there an updated pull request? I don't see a merge option on that one.
Assignee | ||
Comment 13•11 years ago
|
||
Comment on attachment 824973 [details]
fix
Weird, maybe it's because I did a fixup + rebase and pushed? Or because Travis-CI is horked? It updated the pull request with the correct commits...
Anyway, I closed that and opened a new one: https://github.com/mozilla-b2g/gaia/pull/13450
Attachment #824973 -
Attachment is obsolete: true
Assignee | ||
Comment 14•11 years ago
|
||
Attachment #828362 -
Flags: review+
Assignee | ||
Comment 15•11 years ago
|
||
FYI, I landed the patch to disable the Audio Data API (bug 927245) on mozilla-inbound just now, so you'll need to merge this to have a working dialer.
Comment 16•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 17•11 years ago
|
||
Thanks!
Updated•11 years ago
|
Keywords: checkin-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•