Skip to content

Commit

Permalink
Reduce latency in passThrough. References #3
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Mar 1, 2017
1 parent 94fd901 commit 10c3b89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/models/track.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Webcaster.Model.Track extends Backbone.Model
source

createPassThrough: ->
source = @node.context.createScriptProcessor 8192, 2, 2
source = @node.context.createScriptProcessor 256, 2, 2

source.onaudioprocess = (buf) =>
channelData = buf.inputBuffer.getChannelData channel
Expand Down Expand Up @@ -91,6 +91,7 @@ class Webcaster.Model.Track extends Backbone.Model
@passThrough.connect @node.context.destination
@destination.connect @passThrough


togglePause: ->
return unless @source?.pause?

Expand Down

0 comments on commit 10c3b89

Please sign in to comment.