Skip to main content
Topic: Syncing sample rate of audio device under Windows with sample rate of audio file (Read 520 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Syncing sample rate of audio device under Windows with sample rate of audio file

Hi,

Is there a Windows audio player that can automatically set the sample rate of the output audio device to the sample rate of the sound file? Eg when playing a 24/96 FLAC file I'd rather match the sample rate to 96KHz rather than have Windows downsample it to the default, which is currently 44.1KHz to match most audio files that I have. I haven't found anything that can do this in Foobar2000 but have at least found a way to display the bit depth and sample rate of the audio in the GUI, which I then have to manually set in Windows to match.

Vox can do this on a Mac with the "Sync Sample Rate" feature documented here: https://vox.rocks/blog/advanced-audio-settings

Thanks.

Re: Syncing sample rate of audio device under Windows with sample rate of audio file

Reply #1
WASAPI output method allows doing that. There are probably several players that have the output mode as an option. For foobar2000 you can add it by installing http://www.foobar2000.org/components/view/foo_out_wasapi.

Re: Syncing sample rate of audio device under Windows with sample rate of audio file

Reply #2
In Windows Audio panel in the Advanced tab,  check the audio device allows for exclusive mode. https://www.thewelltemperedcomputer.com/SW/Windows/Win7/USBDAC.htm
In the media player select WASAPI, most of the time “event” mode will be the most stable.
Older hardware might profit by the push mode
https://www.thewelltemperedcomputer.com/SW/Players/Foobar.htm
https://www.thewelltemperedcomputer.com/SW/Players/MusicBee/MusicBee_audio.htm
TheWellTemperedComputer.com

Re: Syncing sample rate of audio device under Windows with sample rate of audio file

Reply #3
WASAPI output method allows doing that.

Thanks. I installed the WASAPI component for Foobar and allowed exclusive mode to the device. It seems to work and I have confirmed that I can't play any other sounds on it while Foobar is playing music, but is there a way to confirm whether Foobar or any other player is using the source's sample and bitrate?

It's kind of annoying that you have to dedicate the device to the music player in order for the music player to output in the correct sample and bitrate (without manually setting this in the device properties) as it means I'll miss alerts while working. Is there a better option? If I didn't allow exclusive mode then would the player still output in the correct sample and bitrate (eg 16/44.1) while other sounds are downsampled/mixed to that rate?

Re: Syncing sample rate of audio device under Windows with sample rate of audio file

Reply #4
In the media player select WASAPI, most of the time “event” mode will be the most stable.

Thanks. I'm using push because it has a larger buffer and I'm only playing music so latency isn't an issue. What do you mean by event being more stable?

Re: Syncing sample rate of audio device under Windows with sample rate of audio file

Reply #5
If I didn't allow exclusive mode then would the player still output in the correct sample and bitrate (eg 16/44.1) while other sounds are downsampled/mixed to that rate?

In shared mode everything is resampled to the properties as set in de Win audio panel.
If you set this to 16 /44.1 and the source is 16/44.1 nothing will be resampled.
Win will mix anyway so convert everything to float, mix, dither and convert back to integer.
You're best bet is to use the max bit depth as supported by your audio device (most of the time 24) and the sample rate most common (44.1) hence 24 / 44.1 is your best bet.
I don't think dither at -144 dBFS is audible, it probably is superfluous.
 
TheWellTemperedComputer.com

Re: Syncing sample rate of audio device under Windows with sample rate of audio file

Reply #6
Quote
What do you mean by event being more stable?

Initial when implementing WASAPI, media players used push mode.
Then it turned out that modern USB DAC's become unstable.
This was solved by using event mode.
In this case the DAC triggers an interaction instead of the PC but there my knowledge ends
TheWellTemperedComputer.com

Re: Syncing sample rate of audio device under Windows with sample rate of audio file

Reply #7
...annoying that you have to dedicate the device... Is there a better option?
 
 

Yes.  Looking at the attached image, check the Force format matching! box.  This is for Waspi shared mode.  Doesn't matter if event- or timer-based notify.  I always use this mode. 100% of the time.  No resampling or other conversions.  One limitation is the device must support the format.  However, this player drops out of FF mode for that one track if the device complains about not handling the format of that one track.

Re: Syncing sample rate of audio device under Windows with sample rate of audio file

Reply #8
Yes.  Looking at the attached image, check the Force format matching! box.  This is for Waspi shared mode.  Doesn't matter if event- or timer-based notify.  I always use this mode. 100% of the time.  No resampling or other conversions.  One limitation is the device must support the format.  However, this player drops out of FF mode for that one track if the device complains about not handling the format of that one track.

Oh excellent, that's what I was looking for. Thanks.

I Googled and found "Jukebox 2112". It looks good in other features too, such as being able to play embedded CUE files in FLAC.

 
SimplePortal 1.0.0 RC1 © 2008-2020