Closed Keyne closed 6 years ago
For reference, I could encode with 2 channels by dividing sampleRate by 2:
encoder = new lame.Encoder({
// input
channels: 2, // 2 channels (left and right)
bitDepth: 16, // 16-bit samples
sampleRate: sampleRate/2, // 44,100 Hz sample rate
// output
bitRate: 128,
outSampleRate: 22050,
mode: lame.STEREO
});
I'm just testing this project (https://github.com/noamtcohen/AudioStreamer) on a ubuntu 16 box and I'm getting segmentation fault when lame tries to encode the PCM data with 1 channel. If I change to 2 channels I get a fast mp3 (timing) instead of the actual audio.
The project owner said that this doesn't happens in his machine. Any clue? Related issue https://github.com/noamtcohen/AudioStreamer/issues/14