Skip to content

Commit

Permalink
mp3 sample rate from client
Browse files Browse the repository at this point in the history
  • Loading branch information
noamtcohen committed Nov 22, 2017
1 parent fa87cb7 commit 6fcd57d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ server.on('connection', function(client) {
writeStream = fs.createWriteStream( fileName + ".mp3" );
stream.pipe( new lame.Encoder(
{
channels: 1, bitDepth: 16, sampleRate: 44100, bitRate: 128, outSampleRate: 22050, mode: lame.MONO
channels: 1, bitDepth: 16, sampleRate: meta.sampleRate, bitRate: 128, outSampleRate: 22050, mode: lame.MONO
})
)
.pipe( writeStream );
Expand All @@ -78,4 +78,4 @@ server.on('connection', function(client) {
}
console.log("Connection Closed");
});
});
});

0 comments on commit 6fcd57d

Please sign in to comment.