Rantanen / node-peerconnection

PeerConnection implementation for Node.js
MIT License
47 stars 8 forks source link

Audio saved by the module is slower than the original audio #2

Open fdalvi opened 11 years ago

fdalvi commented 11 years ago

If we use the following code:

c.on( 'audio', function( evt ) {
  // Audio from the local socket.
   // Write it to a file.
   stream.write( evt.data );
});

the output file(represented by stream here) plays back at 0.722 times the original audio.

This was confirmed by recording at the source(the machine with the browser), and comparing the recording with the output of node-peerconnection. If we use sox to increase the tempo(not the playback rate, so the pitch remains the same), we get the original audio back.

Why is the audio getting slowed down?