Page 3 of 3

Re: Vista Playback Default Format and Audacity

Posted: Mon Jan 12, 2009 10:23 pm
by kozikowski
3900 Hz

This is classic heterodyning. You get sum and difference frequencies whenever two different frequencies are present in a non-linear system. Every radio receiver on the planet works using this technique. Some radio receivers use it more than once. FM transmitters use this technique to get enough juice (a technical term) to run the antenna. History: Fessenden and Armstrong in the 1900s radio experiments.

The analog method of doing a sampling rate translation is to decode the sound from one rate and thoroughly filter out the carrier (sample rate). Really aggressive numbers are needed here. None of the original 48000 (or whatever) carrier must remain. Then re-encode at the new rate. Perfectly clean audio bitstream at the new rate. If you don't get rid of the original carrier, you get the extra energy. You hear the lower one, the difference, but it goes up, too. That one is up in the aircraft bands somewhere. If you have a marginally stable system, the extra frequencies will come and go causing spilled coffee and gray hair. Don't ask me how I know that.

I'm no programmer, but I can imagine a place near the system overload point where the two sample frequencies are present at the same time.

Are there code modules that replicate the analog method above? One of them is broken. I can imagine someone coming up with an algorithm to avoid going through all that, but I can also imagine getting it wrong.

Koz

Re: Vista Playback Default Format and Audacity

Posted: Tue Jan 13, 2009 4:00 am
by NineEyes
Leland wrote:I see what you mean. I couldn't hear it until I turned up the volume quite a bit, but it's certainly there.
I'm not crazy, or I'm not alone! Thanks for testing this out.
Leland wrote:So, if Audacity's Project Rate is set to 44100 and the default format is 48000, the system will have to resample the data Audacity gives it to satisfy the default format. Same goes for the other way round...default=441000, project=48000. And that resampling, as you've pointed out, doesn't produce very pleasant results.
My playback device is fixed at 48000Hz, and its playback of 44100Hz projects is fine in Windows 2000 and Windos XP. Is the resampling Vista provides in the legacy API of lower quality than the predecessors?
Leland wrote:http://audacity.homerow.net/index.php?d ... +1.3.7.zip

It is a recent build of our upcoming 1.3.7 release. While it does not directly address your problem, it does have a feature that seems to get around it.

When you start it, go back into Audacity's Preferences and reselect your Playback and Recording devices. You'll notice that you have more devices than before and you should see "MME:" and "Windows DirectSound:" devices. Select one of the DirectSound devices and try your testing again. I think you'll find that it no longer happens. (Well, my aging ears can't hear it anyway.)

The reason this works is that the library we use to access the system's audio devices happens to allocate DirectSound devices in exclusive mode! This is exactly what we need to open the device in whatever format we like without incurring the resampling present when using the MME devices, or more correctly, the devices in shared mode.
Thanks. I tried it, and the issue disappears with DirectSound. There must be resampling going on however, as my device is fixed at 48000Hz playback. Right? (Again, I'm playing back 44100Hz tracks in a 44100Hz project.)

Re: Vista Playback Default Format and Audacity

Posted: Wed Jan 14, 2009 12:55 am
by Leland
NineEyes wrote:Thanks. I tried it, and the issue disappears with DirectSound. There must be resampling going on however, as my device is fixed at 48000Hz playback. Right? (Again, I'm playing back 44100Hz tracks in a 44100Hz project.)
Audacity should be the one doing the resampling in this case. As long as the device only advertises 48000 to Audacity, then anything else should be resampled by Audacity before he sends it to the device.

Glad it worked for you. Feel free to use that version if you like, but just be warned...it does have a couple of known issues that you may or may not run in to. :-)

Leland