I'm retired and couldn't sustain the effort to write code. Was a few years since working with WMA encoding and it sounds like PurpleSunray is more up to date on details. I agree with BertKoor that it is sad to use intentionally degraded audio but I suppose there must be cases where it may be sensible. I wouldn't willingly use audio quality worse than the equivalent of 320 kbps MP3 for my own purposes.
Forgive if I'm remembering wrong, but so far as I recall both the Windows variant of fraunhofer mp3 encoder and also WMA encoding, when performed low-level from within a program-- In other words not calling some shell program that takes an input file name, an output file name, and then does the entire conversion writing the output WMA to disk. Rather, invoking the mystic runes of DirectX to call forth and enthrall the Properties of the Codec God, then sacrifice to the Codec god many small un-compressed memory-based audio buffers, receiving in turn memory buffers of compressed audio-- (It is a joke and poetic license, not necessarily definitive symptom of dementia
) And finally save the compressed audio to disk file or whatever else you might care to do with it.
Anyway, so far as I recall, at that low level neither the MP3 nor WMA encoding would accept any and all uncompressed file formats for direct conversion. The higher bitrates expected at least 44.1 k samplerate source audio. There may even have been a couple of funky bitrates that only worked for 48 k samplerate audio input.
But lower bitrates would fail conversion (using low level methods) if you sent the codec 44.1 k audio. Some of the intermediate bitrates would only work if you sent the codec 22 k samplerate or whatever. So far as I recall there were some bitrates demanding 11 k or whatever. The lowest bitrates needed low samplerate audio-- IIRC as low as 8 k samplerate. If you requested a low bitrate that wants 8 k samplerate input audio, then it would fail if you try to offer the Codec God anything except what it demands.
Maybe it is different nowadays, dunno. Any tool that will take a 44.1 k samplerate input file and spit out a low bitrate WMA or MP3, I would wildly guess that such a tool performs transparent internal samplerate conversion to offer up to the Codec God that which it requires.
My code used lookup tables of the samplerates required for each bitrate and did on-the-fly samplerate conversion depending on the user-selected desired bitrate.
Just saying, some samplerate conversion is better than others. If a tool has to SRC a 44.1 k file down to 8 k before feeding the codec, then if the tool's SRC is not very good-- Then maybe you get "cheezy samplerate converter chirpies" added on-top of "low bitrate chirpies"?
Just saying, MAYBE pre-converting the samplerate of the source audio to that demanded by the codec, as high quality possible, could avoid any Cheezy Samplerate Converter problems in the encode tool? If the bitrate demands an 8k samplerate, and you deliver an 8 k samplerate source file to the encode tool, then presumably the tool would be smart enough to know that it doesn't have to samplerate convert the audio on the way to the codec?
Alternately, rather than samplerate convert, you could just apply a good quality steep antialias filter to the source audio, while leaving the samplerate unmodified. If the codec is gonna expect 8 k samplerate, then brickwall filter that 44.1 k file at a little lower than 4 kHz before sending it to the encode tool.
Just some dumb ideas.