Page 1 of 1

Resonic doesn't change internal sample rate to lower one

Posted: October 4th, 2014, 14:04
by Alt
Hello.
I'm using latest Alpha version of Resonic and it refuses to change sample rate back after it was set to higher value. Like, you're playing 44.1 KHz file, then 48 KHz and again 44.1. With last one sample rate doesn't change back from 48 until you restart player. Same thing happens if you play 96 KHz file and after that something "lower".
System: XP-32, soundcard - ASUS Xonar D1. Sample rate monitoring made with ASIO Bridge.
Youtube tag didn't work for me so here's the link http://youtu.be/IQ1aolrfarw
P.S. Also "Resonic" sets device sample rate to 44.1 KHz on each startup (even if 'resume playback' disabled, or playback stopped at the end of last session, or 'startup' folder without music files etc), I believe that's also not right.
P.P.S. On video you can see that XMPlay with DirectSound output doesn't have such problems.

Re: Resonic doesn't change internal sample rate to lower one

Posted: October 4th, 2014, 14:44
by Tom
That is a very good find. I'll look into it immediately.

Re: Resonic doesn't change internal sample rate to lower one

Posted: October 4th, 2014, 15:01
by Tom
I installed driver and bridge and routed onboard Realtek to RME ASIO. What's odd though, I cannot get the input SR on the bridge to change at all. It always arrives at fixed 44100, even when I play back 192 kHz.

Something I'm doing wrong here?

Re: Resonic doesn't change internal sample rate to lower one

Posted: October 4th, 2014, 15:09
by Tom
Ok, I get it.

The problem is the way XP is handling resampling: it doesn't. On XP I can only set the output sample rate, whereas on Vista/7/8 there's a resampler built into the OS, i.e. if you select 16-bit 44100 Hz for the virtual cable driver in Vista+ sound settings it'll always be converted to that output format.

For DirectSound there is no way around it, except fix the sample rate selection issue on XP on my part (didn't notice since I'm developing mostly on 7).

An actual way around it was introduced with WASAPI, and of course ASIO is as well as direct as it gets. I'll be focusing on both of them as they are much more suited for what Resonic wants to deliver.

If I didn't have to support XP I'd gladly get rid of DirectSound all together...

Re: Resonic doesn't change internal sample rate to lower one

Posted: October 4th, 2014, 19:11
by Alt
Little confused here...
some user from some forum wrote:Windows KMixer doesn't change sampling rate from 44.1 KHz to 48 KHz. That's a common misconception. The resampling to 48 KHz, is done the audio CODEC or sound card
So if driver of sound card is good, I'd prefer this way rather than Windows internal resampler.
You want to get rid of DirectSound but isn't it still the best way for common user?
From what I understood WASAPI Shared leaves sample rate 'as is' (which user set in control panel) so application in this mode must resample everything to that SR itself (Resonic doesn't have resampler at the moment, right?). WASAPI Exclusive doesn't need application's resampler but just like ASIO or Kernel Streaming (under Vista+) blocks all other sounds (not good for many users, I guess). DirectSound on Vista+ sends data to WASAPI Shared but instead of asking application for specific sample rate, Windows takes care of resampling itself.
Did I miss something?

Re: Resonic doesn't change internal sample rate to lower one

Posted: October 5th, 2014, 19:30
by Tom
So if driver of sound card is good, I'd prefer this way rather than Windows internal resampler.
Absolutely.
You want to get rid of DirectSound but isn't it still the best way for common user?
I think WASAPI shared should be the default on Vista+, shame I have to keep DS for XP.
From what I understood WASAPI Shared leaves sample rate 'as is' (which user set in control panel) so application in this mode must resample everything to that SR itself (Resonic doesn't have resampler at the moment, right?).
That is right. And no, Resonic doesn't resample yet, but will have to.
Did I miss something?
I think you pretty much covered all the important parts :)

Re: Resonic doesn't change internal sample rate to lower one

Posted: October 10th, 2014, 01:42
by MaxLapierre
I use Asio4All in FL Studio and I will also use it in Resonic Pro.

New version 2.12 released

http://www.asio4all.com/

Re: Resonic doesn't change internal sample rate to lower one

Posted: October 30th, 2014, 17:59
by Alt
Tom
Just FYI, another flaw of WASAPI Shared (probably) found @ un4seen/xmplay forums
xaos wrote: No particular file, or any particular point in a file, it happens with anything that's playing.
It's "continuous" fluctuation, from beginning to end, as in, slightly louder, slightly quieter, slightly louder....
WASAPI exclusive mode doesn't fluctuate, Direct Sound and ASIO also sound correct.
Microsoft sound mapper, Speakers (soundcard), WASAPI non-exclusive ::: fluctuate.
The fluctuating only happens with the EQ turned ON. All other DSP settings are off, including the auto-amp.
Ian @ un4seen wrote: Yep, that does sound like it's Windows built-in limiter kicking in. When XMPlay's sends 32-bit output through Windows (not ASIO or exclusive mode WASAPI), the sample data is unclipped floating-point, so it can go beyond 0 dB. When that happens, Windows (Vista and newer) will apply a limiter rather than clipping. In this case, the EQ is probably taking the level too high at times, and Windows' limiter is bringing it back down. To confirm whether that's the case, does the fluctuating disappear (possibly replaced by distortion) if you use the default output system (eg. "Microsoft Sound Mapper") with "Resolution" set to 24 bit instead of 32 bit? Shared mode WASAPI output is always 32-bit floating-point regardless of the "Resolution" setting, so it isn't possible to avoid Windows' limiter then.
xaos wrote: The 24bit doesn't seem to suffer the fluctuation problem, but it does seem to suffer a bit of distortion .. and generally doesn't seem to (sound) as good.

Re: Resonic doesn't change internal sample rate to lower one

Posted: November 5th, 2014, 21:53
by Tom
Alt wrote:Just FYI, another flaw of WASAPI Shared (probably) found
Indeed sounds like a flaw.

How hard can it be for the chain to not touch the audio in ways that negatively alter fidelity. Apparently very hard.