What is the real sampling rate?

Recording sound in Audacity I can select several sampling rates, the highest being 384000 Hz.
Now I don’t believe that my sound card (AMD High definition audio device, Realtek High definition audio or Intel display sound?) supports that rate so I believe Audacity increases the sample rate by interpolation. Doing a recording at 384000 Hz I can with my low grade microphone se spectral peaks at up to 86 kHz.
How can I determine the real samplingrate?
Thanks in advance for any tip.
H

I don’t know… Your DRIVERS will do the conversion for you, so it’s hard to know what the physical sample rate is…

It’s like your printer. Your printer will happily print an image that has higher resolution than your printer is capable of and you won’t get any kind of warning… It just “works”. It will also happily print an image of lower resolution than the printer’s actual DPI resolution with the drivers quietly doing the conversion in the background.

I doubt your soundcard/soundchip can really sample at 384kHz, and your “cheap” microphone certainly can’t go much above 20kHz, if it can even do that!

There might be a way to know, but I don’t know how to do it.

I think you have to use WASAPI drivers or ASIO drivers, but again I don’t know how to configure WASAPI to “lock-into” the physical sample rate. (Real ASIO only works at the hardware sample rate.)

Audacity doesn’t support ASIO as-distributed, and unfortunately Audacity can only use WASAPI to record playing/streaming audio (not directly from your soundcard). Audacity also doesn’t support ASIO as distributed, and there won’t be ASIO drivers for your Realtek hardware.

There is something called ASIO4ALL that will work with Realtek, but it’s “half-ASIO” (it replaces part of the Windows driver stack) and I’m not sure if it actually “locks into” the hardware’s sample rate.

The “real” sample rate depends on where you are looking.

When recording, Audacity requests audio at the “project rate” (bottom left corner of the main Audacity window), unless you are “append recording” into an existing track, in which case the track sample rate is used.

The “actual” sample rate that is used by the analog to digital converter (ADC) in your audio device, is unknown to Audacity. Audacity just requests what it wants and records what the computer system sends it. If the computer system is unable to send audio to Audacity, Audacity will raise an error message to check the sample rates.

When the computer system (operating system) receives a request from an application to provide an audio stream at a specified rate, the system will request audio data stream from the audio device. There are various places that resampling may occur if the requested stream does not match a rate that is supported by the ADC. Some ADC support multiple rates in the actual hardware. Some sound card drivers are able to resample. Depending on the operating system version and the sound system API being used (whether you are using MME, DirectSound, ASIO, WASAP, or whatever), resampling may be available there. The only thing that Audacity cares about is that it gets the data.

As you are probably aware, there is generally no point in selecting a sample rate that is higher than the sample rate supported by the hardware. If you are lucky, the hardware specifications may tell you what sample rates are supported by hardware, but sadly, for the sake of advertising hype, such information is often not available, or misleading. If a cheap sound card says that it supports 192 Hz, it is probably “bending the truth” and referring to a resampled rate.

As Steve says, it is not as simple as the drivers determining the sample rate - the audio “host” API that you choose in Audacity’s Device Toolbar makes a big difference. MME host resamples everything to and from 44100 Hz, so if you choose MME you are getting the device’s current rate (if not 44100 Hz) resampled to 44100 Hz by Windows, then resampled to 384000 Hz by Audacity.

“Actual Rate” in the right-hand section of the Audacity Status Bar at the bottom aims to shows (when playing) the rate being communicated by Audacity to the sound card. “Actual Rate” when recording aims to show the rate communicated by the sound card to Audacity. Don’t rely on Actual Rate being free of bugs.

This is an extremely complex issue, but see this answer I wrote in response to a similar question Playback Sample Rate and Bit Depth? - #3 by Gale_Andrews . Unfortunately you don’t give your version of Audacity or Windows (see the pink panel at the top of the page). In principle on Windows Vista and later you can force Audacity to request the sample rate direct from the device without Windows interfering with its own resampling by choosing “Windows DirectSound” host in Audacity and both “Exclusive Mode” boxes in Windows Sound.

My impression is that the most reliable indicator of sample rates claimed to be supported by your device will be found at Help > Audio Device Info… in Audacity (look under the Windows DirectSound entries, not MME) and if you are on Windows Vista or later, in “Default Format” in Windows Sound.


Gale

Thank you for your insightful replies that in effect tells me I can’t use the audio card for my project which is to record and localise bats that emits sounds in the range 30-80 kHz. I will have to get myself a fast ADC.
I did, however, make a recording with a 457 Hz square wave from a pulse generator with a rapid rise time. It shows that the frequency response is awful, for my purposes especially the slow rise time. See the attachment (vertical floating point values, horisontal sample number):
0004.jpg

Something to watch out for before you spend money - ADC’s that are designed and marketed for recording audio will often pre-filter the audio with a low-pass filter before converting it to digital. For recording (normal) audio this is generally a good thing because it cuts out a lot of electrical interference. For recording bats it is a very bad thing because it filters out the very sounds that you want to record. Check the specifications carefully before you part with $'s.

The EVGA NU Audio 712-P1-AN01-KR internal audio card, supports up-to 384000Hz, with A>D (recording) too…
On Audacity, recording under Direct Sound supported up-to 192000Hz; Trying to record on sample rates over 192000Hz under Direct Sound, an error message shows…

Can Direct Sound be made somehow to record over 192KHz?

On current versions of Windows, “DirectSound” is an emulation of the original DirectSound interface (as implemented in Windows 95 / Windows XP).
DirectSound supported a maximum sample rate of 192kHz (192000 Hz).

You “may” be able to use higher sample rates using WASAPI as the “host” (dependant on the audio device drivers).
For audio recording, there are no benefits to using sample rates above about 100 kHz, only disadvantages (see: 24/192 Music Downloads are Very Silly Indeed and this excellent video: Xiph.Org Video Presentations: Digital Show & Tell)