connorhartley-archive / out

(Replaced) Output PCM data to a device or library using audio and mpg123.
MIT License
1 stars 0 forks source link

Refactor Project #3

Open vectrixdevelops opened 8 years ago

vectrixdevelops commented 8 years ago

Instead of depending on node-speaker, recreate our own binding using the latest version of mpg123 which will use node-audio directly. Ensuring to keep mpg123 up to date to contend with new fixes and releases of changes with mpg123, as well as to uphold the ability to send and receive support by mpg123 contributors.

jamen commented 8 years ago

This could be a v1 release instead of v2 since it is only v0.1 right now. Perhaps aim to release mvp as v0.2, then let testing go on for a few days before releasing v1.

jamen commented 8 years ago

Lol labeling.

jamen commented 8 years ago

Just a note: All utilities (including this one) should be stream-based.

This utility in particular will be passed an Audio object, where it will then use all the data provided (source, bitRate, sampleRate, etc) to reproduce sound.

Some key ideas for this package:

jamen commented 8 years ago

For example:

['foo.wav', 'bar.wav', 'baz.wav'].forEach(function(file) {
  fs.createReadStream(file)
  .pipe(decodeWav())
  .pipe(out());
});

Here, out() is called per iteration. It should be optimized to handle things like that (but of course, there is better practices you can take as a user of the utility, still best to optimize the nicest looking option)

vectrixdevelops commented 8 years ago

Alright sounds good. I will be working on reworking this now. Support will be needed for creating configurations for each operating system and endian.