Closed Bug 1187763 Opened 10 years ago Closed 10 years ago

Refactor AudioSink::AudioLoop into a series of events.

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(3 files)

Bug 1187763. Part 1 - move while loop out of WaitingForAudioToPlay().
Attachment #8639128 - Flags: review?(kinetik)
Bug 1187763. Part 2 - extract some code of AudioLoop() into its own function.
Attachment #8639129 - Flags: review?(kinetik)
Bug 1187763. Part 3 - refactor AudioSink::AudioLoop into a series of events.
Attachment #8639130 - Flags: review?(kinetik)
Assignee: nobody → jwwang
Comment on attachment 8639128 [details] MozReview Request: Bug 1187763. Part 1 - move while loop out of WaitingForAudioToPlay(). https://reviewboard.mozilla.org/r/14175/#review12761 Ship It!
Attachment #8639128 - Flags: review?(kinetik) → review+
Blocks: 1187817
Comment on attachment 8639129 [details] MozReview Request: Bug 1187763. Part 2 - extract some code of AudioLoop() into its own function. https://reviewboard.mozilla.org/r/14177/#review12841 Ship It!
Attachment #8639129 - Flags: review?(kinetik) → review+
Comment on attachment 8639130 [details] MozReview Request: Bug 1187763. Part 3 - refactor AudioSink::AudioLoop into a series of events. https://reviewboard.mozilla.org/r/14179/#review12845 ::: dom/media/AudioSink.cpp:60 (Diff revision 1) > + nsresult rv = I think you can make this DebugOnly<nsresult>? ::: dom/media/AudioSink.cpp:333 (Diff revision 1) > + case AUDIOSINK_STATE_ERROR: { No need for braces here, and considering there are only two cases, just add a break for the former rather than letting it fall through (which I'd add a // FALLTHROUGH comment for otherwise).
Attachment #8639130 - Flags: review?(kinetik)
Comment on attachment 8639130 [details] MozReview Request: Bug 1187763. Part 3 - refactor AudioSink::AudioLoop into a series of events. https://reviewboard.mozilla.org/r/14179/#review12847 Ship It!
Attachment #8639130 - Flags: review+
https://reviewboard.mozilla.org/r/14179/#review12845 > I think you can make this DebugOnly<nsresult>? Sure. > No need for braces here, and considering there are only two cases, just add a break for the former rather than letting it fall through (which I'd add a // FALLTHROUGH comment for otherwise). Not sure if I understand how this format should be. Is it like case AUDIOSINK_STATE_COMPLETE: { // blah break; } case AUDIOSINK_STATE_SHUTDOWN: break; case AUDIOSINK_STATE_ERROR: break; } // end of switch
(In reply to JW Wang [:jwwang] from comment #9) > case AUDIOSINK_STATE_SHUTDOWN: > break; > case AUDIOSINK_STATE_ERROR: > break; Yeah, this one. :-)
Thanks! :)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: