I've tried to compile it using MinGW but no luck. I've got as far as correctly compiling libsndfile and had some problems with pkg-config but the real issues was compiling sbc_math where some strange macro issues showed up. I'm not too good at compiling C/C++ code so others might spot the issue instantly.
However i've compiled it on my Ubuntu Atom box and could encode files with it I think MinGW has a different GCC version which is incompatible with the SBC source. I'll get back to this later.
I've used the latest source release which is dated this January: http://www.bluez.org/sbc-12/
After issuing make install you get sbcenc, sbcdec and sbcinfo. It requires input files in AU format so you have to convert WAV files to AU first and back so you can listen to it with standard players. I've used SoX for this.
The "sbcenc" tool encodes with bitpool 32 setting by default which results in audio quality very similar to what i heard from the older Android phones (distorted highs). sbcinfo shows this:
Filename out.sbc
mSBC 0
Subbands 8
Block length 16
Sampling frequency 44.1 kHz
Channel mode Stereo
Allocation method Loudness
Bitpool 32
Number of frames 69636
Frame length 76 Bytes
Bit rate 209.475 kbps
Bumping it to 52 (which i think is the default with newer Android phones and Cyanogenmod build) provides a much better quality. In this case sbcinfo shows this:
Filename out.sbc
mSBC 0
Subbands 8
Block length 16
Sampling frequency 44.1 kHz
Channel mode Stereo
Allocation method Loudness
Bitpool 52
Number of frames 69636
Frame length 116 Bytes
Bit rate 319.725 kbps
Bitrate wise: 209kbps vs 320kbps.
sbcenc has some other interesting options though:
Usage:
sbcenc [options] file(s)
Options:
-h, --help Display help
-v, --verbose Verbose mode
-m, --msbc mSBC codec
-s, --subbands Number of subbands to use (4 or 8)
-b, --bitpool Bitpool value (default is 32)
-j, --joint Joint stereo
-d, --dualchannel Dual channel
-S, --snr Use SNR mode (default is loudness)
-B, --blocks Number of blocks (4, 8, 12 or 16)
For eg. i don't know what is that mSBC codec option there.
It would be interesting to extract the actual values the Android project using. There is an sbc_t structure initialized at the beginning of the encode method in sbcenc, Android should have a similar initialization somewhere.