TooTallNate / node-speaker

Output PCM audio data to the speakers
648 stars 145 forks source link

Audible glitches - openal backend - MacOS #138

Open boedy opened 4 years ago

boedy commented 4 years ago

I hear subtle, but definitely noticeable glitches during the audio playback when using the openal backend on MacOS. With core-audio (which has issues of its own https://github.com/TooTallNate/node-speaker/issues/92) I'm getting smooth sound. Does anyone else experience the same symptoms or have an explanation what could be causing this?

The code I used:

const decoder = lame.Decoder();
const speaker = new Speaker({
    channels: 2,          // 2 channels
    bitDepth: 16,         // 16-bit samples
    sampleRate: 44100     // 44,100 Hz sample rate
});

fs.createReadStream('test.mp3')
    .pipe(decoder)
    .pipe(speaker);

My Setup: Machine: 2018 Macbook pro (Mojave) 16GB mpg123-backend: openal