TooTallNate/node-lame

Encoding with 1 channel causes segmentation fault, encoding with 2 channels gets fast mp3

Closed this issue · 1 comments

Keyne commented

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 noamtcohen/AudioStreamer#14

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
                    });