Closed
Bug 908144
Opened 12 years ago
Closed 12 years ago
Terrible noise on OscillatorNoise demo, when no sound should be output
Categories
(Core :: Web Audio, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: padenot, Assigned: padenot)
Details
(Whiteboard: [blocking-webaudio+])
Attachments
(1 file, 1 obsolete file)
|
4.21 KB,
patch
|
ehsan.akhgari
:
review+
rillian
:
feedback+
|
Details | Diff | Splinter Review |
STR:
- Open http://plnkr.co/edit/dv5iEPuMun0EIdmt9Y6n?p=preview (warning, it output terrible loud noise)
- Press play
- Wait for the track to finish
Expected result:
- One should hear silence before Play is clicked, then the track, then silence again.
Actual result:
- Terrible noise is heard instead of silence, everything is just fine otherwise.
Updated•12 years ago
|
Whiteboard: [blocking-webaudio+]
| Assignee | ||
Comment 1•12 years ago
|
||
I've got half a patch written, taking.
Assignee: nobody → paul
Whiteboard: [blocking-webaudio+]
Updated•12 years ago
|
Whiteboard: [blocking-webaudio+]
Comment 2•12 years ago
|
||
Thanks Paul. The demo doesn't play anything at all for me. Controls seem to be broken.
| Assignee | ||
Comment 3•12 years ago
|
||
This fixes the noise. There are other problems with OscillatorNode, but I'll
open separate bugs.
Attachment #794678 -
Flags: review?(ehsan)
Comment 4•12 years ago
|
||
Comment on attachment 794678 [details] [diff] [review]
Don't output sound before start() is called when using OscilatorNode r=
Review of attachment 794678 [details] [diff] [review]:
-----------------------------------------------------------------
Can you write a test for this, please? Thanks!
::: content/media/webaudio/OscillatorNode.cpp
@@ +245,5 @@
> MOZ_ASSERT(mSource == aStream, "Invalid source stream");
>
> TrackTicks ticks = aStream->GetCurrentPosition();
> + if (mStart == -1) {
> + return;
You should SetNull aOutput here...
Attachment #794678 -
Flags: review?(ehsan) → review+
| Assignee | ||
Comment 5•12 years ago
|
||
Yes, we need a SetNull here, indeed.
I also added a test.
Attachment #794697 -
Flags: review?(ehsan)
| Assignee | ||
Updated•12 years ago
|
Attachment #794678 -
Attachment is obsolete: true
Comment 6•12 years ago
|
||
Comment on attachment 794697 [details] [diff] [review]
Don't output sound before start() is called when using OscilatorNode r=
Review of attachment 794697 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
::: content/media/webaudio/OscillatorNode.cpp
@@ +245,5 @@
> MOZ_ASSERT(mSource == aStream, "Invalid source stream");
>
> TrackTicks ticks = aStream->GetCurrentPosition();
> + if (mStart == -1) {
> + aOutput->SetNull(WEBAUDIO_BLOCK_SIZE);
ComputeSilence(aOutput); ?
@@ +260,5 @@
> ComputeSilence(aOutput);
> *aFinished = true;
> return;
> }
> +
Please remove the trailing whitespace.
Attachment #794697 -
Flags: feedback+
Comment 7•12 years ago
|
||
Should also remove the dump() statements from the test.
Comment 8•12 years ago
|
||
Comment on attachment 794697 [details] [diff] [review]
Don't output sound before start() is called when using OscilatorNode r=
Review of attachment 794697 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with Ralph's comments addressed.
Attachment #794697 -
Flags: review?(ehsan) → review+
| Assignee | ||
Comment 9•12 years ago
|
||
Comment 10•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
| Assignee | ||
Updated•12 years ago
|
Whiteboard: [blocking-webaudio+] → [blocking-webaudio+][checkin-needed-aurora]
| Assignee | ||
Comment 11•12 years ago
|
||
Whiteboard: [blocking-webaudio+][checkin-needed-aurora] → [blocking-webaudio+]
Updated•12 years ago
|
status-firefox25:
--- → fixed
status-firefox26:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•