title: How can I get the duration of an MP3 file (CBR or VBR) with a very small library or native code c/c++?
body: <p>I can't use any mp3 code that is patented by Fraunhofer, so no encoders OR decoders (e.g. ffmpeg, lame, MAD, etc.), plus it's too big. </p>
  
  <p>I am doing this on Windows, but DirectShow's IMediaDet seems to <em>slow</em> down over time, calling it a few hundred times brings my system to a crawl, even re-using the same interface object and just putting the file name and getting duration!</p>
  
  <p>So, is there some code out there that can read VBR files with C/C++ and get the duration?  </p>
  
  <p>There was another post on here to do CBR in C++, but the code makes a ton of assumptions and wont work for VBR of course.</p>