title: How to read Bit rate of .wav file in C#
body: <p>given that I have a .wav file, what would be best way to read its Bit rate property in C#. 
  I have tried Shell, and asked a question <a href="https://stackoverflow.com/questions/21447706/is-bit-rate-property-fixed-in-index-28">Is &quot;Bit rate&quot; property fixed in index 28?</a> with no asnwers so for. Also I now believe Shell is not the best way to read audio file properties.  I have researched on different open source media libraries, cant find much.</p>
  
  <p>TagLib#: This one works alright but have two issues. it does not reflect actual bit rate in some cases where bit rate is very low (like less than 30), it just returns 0. Secondly, I am not sure if I can use it for commercial use. The License says  <a href="http://opensource.org/licenses/LGPL-2.1" rel="nofollow noreferrer">http://opensource.org/licenses/LGPL-2.1</a> </p>
  
  <p>NAudio: Simply does not expose any property to read the bitrate, so I have to calculate it. after research I got this formula to calculate the bit rate. 
  bitrate = Samplerate * Channels * BitsPerSample. This works fine in most cases, however fails if you got BitsPerSample = 0 for some .wav files. Yes the file is absolutely fine, I can play it, but still BitsPerSample is 0.</p>
  
  <p>MediaInfo: again no straight forward property, have to loop through all the properties of audio file and then search for "overall bit rate". moreover have to add two dlls in project, one is .net wraper and other is actual dll.</p>
  
  <p>Apologies for such a long summary, but I dont wanted to ask "hey how can I get the bit rate of audio file" without showing what I already have done.
  So, if you have a .wav audio file what library/method would you use to get the bitrate?</p>