Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Given examples #64

Open
perguth opened this issue May 29, 2016 · 1 comment
Open

Given examples #64

perguth opened this issue May 29, 2016 · 1 comment

Comments

@perguth
Copy link

perguth commented May 29, 2016

I run MacOS 10.11.5. Regarding the given examples I would like to know if they should work out of the box and what the expected audio output should be. Maybe I have interpreted the examples wrongly but the following code should produce no hearable output (or even silence the system if music is running) but actually results in "tr-tr-tr-tr-..." noises coming out of the speakers that get louder over time.

var coreAudio = require('node-core-audio')
var engine = coreAudio.createNewAudioEngine()

engine.addAudioCallback(processAudio)

function processAudio (buffer) {
  console.log('%d channels', buffer.length)
  console.log('Channel 0 has %d samples', buffer[0].length)

  for (var sample = 0; sample < buffer[0].length; sample++) {
    buffer[0][sample] = 0.0
  }

  return buffer
}
@aromeronavia
Copy link

Check out the #26.

I copy/pasted the code and the 'tr tr tr' sound is gone (THANKS FUCKING GOD) haha.
You can continue your experiments Mr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants