Bug in onDecodeData ? #7

Closed
sethladd opened this Issue Apr 1, 2014 · 5 comments

Comments

Projects
None yet
2 participants
@sethladd

sethladd commented Apr 1, 2014

Hi,

I was reading through the source, and I found what is either a bug or I learned something thing.

In audio-parser.js, in onDecodeData, I see this:

sourceNode.disconnect(gainNode);

From reading Web Audio spec, disconnect takes a number. However, I suspect gainNode is a node.

Thoughts?

@paullewis paullewis closed this in 9bd8a2e Apr 1, 2014

@paullewis

This comment has been minimized.

Show comment
Hide comment
@paullewis

paullewis Apr 1, 2014

Owner

You're right. A gross assumption on my part that disconnect is symmetrical to connect, which it is not. In this case I don't need to do anything with it, apparently, as the bufferSourceNode is a 'one-shot' node that is cleaned up after its done. So I removed the line! :)

Owner

paullewis commented Apr 1, 2014

You're right. A gross assumption on my part that disconnect is symmetrical to connect, which it is not. In this case I don't need to do anything with it, apparently, as the bufferSourceNode is a 'one-shot' node that is cleaned up after its done. So I removed the line! :)

@sethladd

This comment has been minimized.

Show comment
Hide comment
@sethladd

sethladd Apr 1, 2014

When in doubt, delete the line!

Wanna know how I found it? I converted your code to Dart :), and the type annotations were like "whoa, huh? this here don't be looking like no number." Developer feedback FTW!

sethladd commented Apr 1, 2014

When in doubt, delete the line!

Wanna know how I found it? I converted your code to Dart :), and the type annotations were like "whoa, huh? this here don't be looking like no number." Developer feedback FTW!

@paullewis

This comment has been minimized.

Show comment
Hide comment
@paullewis

paullewis Apr 1, 2014

Owner

Haha brilliant! Hope this means I can expect a Dart port of Music DNA to ship to the docs etc soon ;)

Owner

paullewis commented Apr 1, 2014

Haha brilliant! Hope this means I can expect a Dart port of Music DNA to ship to the docs etc soon ;)

@sethladd

This comment has been minimized.

Show comment
Hide comment
@sethladd

sethladd Apr 1, 2014

"ship to the docs" ?

sethladd commented Apr 1, 2014

"ship to the docs" ?

@paullewis

This comment has been minimized.

Show comment
Hide comment
@paullewis

paullewis Apr 1, 2014

Owner

Yeah the Dart docs :D

"Making an audio visualizer with Dart"

Owner

paullewis commented Apr 1, 2014

Yeah the Dart docs :D

"Making an audio visualizer with Dart"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment