Giter VIP home page Giter VIP logo

audio-vs1053b's People

Contributors

frijol avatar johnnyman727 avatar kevinmehall avatar nw avatar pmcote avatar tcr avatar tm-rampart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

natevw nw mcanthony

audio-vs1053b's Issues

setVolume doesn't change the output level

I'm setting the volume of the audio output, where I have earplugs plugged-in.
I'm setting it to 0.1 as number, but the thing still keeps playing sound at full volume.

I'm playing the sound in the callback handler.

audio.setVolume(.1, function(err){
    if (err) {
      return console.log(err);
    }

    var sound = fs.readFileSync('mySound.mp3');
    audio.play(sound, function(err) {
    if (err) {
      console.log(err);
    }
  }
});

Can't stream to or from an SDCard file

The problem is that microSD needs a lock on the SPI Bus while it's sending/receiving data but Audio needs the SPI bus to gather recording data or write data to the audio chip. We need a way for the Audio module to lock the SPI bus from the C shim or just block the whole time it's recording.

Mic data is extremely quiet

My hunch is that our microphone doesn't produce a signal with high enough peaks. Increasing the gain on the AGC only increases noise with minimal gains to the actual signal

Audio playback cutoff before end (Possible workaround included)

I tried to read a mp3 file (40Kb) and play it back, but the playback stopped before end of the file. I was using the code below:

var tessel = require('tessel');
var audio = require('audio-vs1053b').use(tessel.port['B']);

audio.on('ready', function () {
  audio.setVolume(1, 1, testFilePlayback);
});

function testFilePlayback() {
  var song = fs.readFileSync('test.mp3');
  audio.play(song);
}

Possible workaround
Duplicate the line that does audio.play(song);

I.e. this worked

function testFilePlayback() {
  var song = fs.readFileSync('test.mp3');
  audio.play(song);
  audio.play(song); // Intentional duplication to play song to the end.
}

Ctrl+C during playback "freezes" Tessel

Originally reported on the forums.

If you control+c out of a script while the audio is playing, then you can't deploy another script until resetting the Tessel.

It's worth noting that you can run tessel list and get the id of the Tessel back. You just can't run a new script.

Occasional Colony Err with Pipes

I don't have a repro test case but sometimes I get the following error:

[T]: src/colony/lua/colony-init.lua:14: attempt to call global 'getmetatable' (a nil value)
stack traceback:
    [T]: src/colony/lua/colony-init.lua:14: in function 'js_proto_get'
    [T]: src/colony/lua/colony-init.lua:14: in function <[T]: src/colony/lua/colony-init.lua:400>
    [T]: src/colony/lua/colony-node.lua:14: in function 'on'
    [T]:src/colony/modules/_stream_readable.js:14: in function 'pipe'
    /app/test.js:136: in function 'testRecordStream'
    /app/test.js:174: in function 'callback'
    /app/index.js:337: in function 'func'
    [T]: src/colony/lua/colony-js.lua:14: in function 'callback'
    /app/index.js:291: in function 'callback'
    builtin/tessel.js:993: in function 'f'
    [T]: src/colony/lua/colony-node.lua:14: in function '?'
    [T]: src/colony/lua/colony-node.lua:14: in function 'emit'
    [T]: src/colony/lua/colony-node.lua:14: in function <[T]: src/colony/lua/colony-node.lua:43>

setVolume inconsistencies

Docs communicate that volume is 0 to 1 for setting volume. Code and examples refer to smaller values are higher volume with 20 being a good starting point.

In addition the setVolume method divides any value by .5. (Doubling the input).

What is the exact range expectation?

It would be great to introduce a breaking change that makes this consistent with the docs and much more intuitive to use.

I'm happy to fix / patch but wanted to get clarity on goal / direction / implementation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.