c# - How to change WASAPI record bitrate with NAudio? -


i'm using naudio decode, play , record mp3 stream. recording use wasapiloopbackcapture save stream wav file:

if (wavein == null) {   wavein = new wasapiloopbackcapture();   writer = new wavefilewriter(outputfilename, wavein.waveformat);   wavein.dataavailable += new eventhandler<waveineventargs>(wavein_dataavailable);   wavein.recordingstopped += new eventhandler(wavein_recordingstopped);   wavein.startrecording(); } 

i'm searching solution save wav file not 3072 kbit/s (what seems standard wasapi). mp3 stream provides 128 kbit/s, bitrate wav file. tried modify wavein.waveformat didn't find right properties.

unfortunately wasapi not allow change sample rate loopback recording. have perform own sample rate conversion afterwards. dmoresampler or waveformatconversionstream classes in naudio can used this.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -