Page 2 of 3

Re: [Settings for recording] "Audio to buffer" and WASAPI vs

Posted: Thu Mar 23, 2017 6:05 pm
by Gale Andrews
Kdmeizk wrote:
Gale Andrews wrote:Please see the information already provided. Recording in "bit perfection" is impossible in Audacity if you don't accept upconversion of bit depth. Only you can make this decision.
I assume the source file is "perfect". If I record with the same bit depth and sample rate, it is not a "bit perfect"? In this case, even 32 bit float is not "bit perfect" so?
Do you care about upconversion of bit depth, or not? Once again, Audacity records in 32-bit float. Your recording device cannot record in 32-bit float. You said you wanted to set it to 16-bit. So, the audio is upconverted from 16-bit to 32-bit float when you record it. It is no longer "bit perfect" if you follow the usual definition of that to mean there must be no sample rate or bit depth conversions.

Even if Audacity did not force recording in 32-bit float, Windows will do so, unless you use WASAPI Exclusive Mode.

Upconversions of bit depth are not lossy, generally speaking. It is a good thing to upconvert to 32-bit float, which is why Windows and Audacity do it. 32-bit float is the best format for editing and fast processing.
Kdmeizk wrote:So at this point, WASAPI is a better choice?
Yes. Use WASAPI (loopback) - not WASAPI Stereo Mix.

And before you launch Audacity, Go into Windows Sound and enable the "Exclusive Mode" boxes for the audio device which is playing the audio. Leave the Default Format settings alone because Windows ignores them if you choose Exclusive Mode.

Also if you know the sample rate of the song file being streamed on the internet, set Audacity Project Rate (bottom left) to that rate.
Kdmeizk wrote:Even if "Audio to buffer" is impossible to change (for now at least)?
Once again, Audio to buffer settings do not matter if you are recording computer playback, as long as the buffer is not set too low. In the case of WASAPI, its default buffer settings will be used by Audacity.


Gale

Re: [Settings for recording] "Audio to buffer" and WASAPI vs

Posted: Thu Mar 23, 2017 10:56 pm
by Kdmeizk
Gale Andrews wrote:Even if Audacity did not force recording in 32-bit float, Windows will do so, unless you use WASAPI Exclusive Mode.
Is "Effects -> Amplify" works better with 32-bit float? I think it is the only effect I could use.
Gale Andrews wrote:Once again, Audio to buffer settings do not matter if you are recording computer playback, as long as the buffer is not set too low. In the case of WASAPI, its default buffer settings will be used by Audacity.
Maybe I did not understand something, but why WASAPI Loopback should not be concerned by "Audio to buffer"?

Re: [Settings for recording] "Audio to buffer" and WASAPI vs

Posted: Fri Mar 24, 2017 3:21 pm
by Gale Andrews
Kdmeizk wrote:
Gale Andrews wrote:Even if Audacity did not force recording in 32-bit float, Windows will do so, unless you use WASAPI Exclusive Mode.
Is "Effects -> Amplify" works better with 32-bit float? I think it is the only effect I could use.
Amplify ONLY works in 32-bit float, because all Audacity's internal processing is in 32-bit float. If your Audacity track is 16-bit because you set Default Sample Format in Quaity Preferences to 16-bit, then Amplify will upconvert to 32-bit float to apply the effect, then downconvert to 16-bit to return the audio to the track. This downconversion will apply dither noise, unless you turned that off in "High-quality conversion" in Quality Preferences.

If you leave Default Sample Format at 32-bit float (recommended) then there is no downconversion and so no dither noise applied.
Kdmeizk wrote:
Gale Andrews wrote:Once again, Audio to buffer settings do not matter if you are recording computer playback, as long as the buffer is not set too low. In the case of WASAPI, its default buffer settings will be used by Audacity.
Maybe I did not understand something, but why WASAPI Loopback should not be concerned by "Audio to buffer"?
In my opinion, the only point of Audio to buffer is to prevent playback and recording glitches. Audio to buffer would matter in theory if you were monitoring a recording using software playthrough, but in fact Audacity selects its own buffer setting when Software Playthrough is on, so the Audio to buffer setting is ignored.

Audio to buffer also makes no practical difference when you are overdubbing. Where the newly recorded track ends up on the Timeline is always determined by the Latency Correction setting in Recording Preferences.

In your case where you are recording computer playback you *cannot* monitor that with Software Playthrough, because that would cause feedback echoes.

And in the case of WASAPI, the buffer is preset and not configurable. So, if you use WASAPI loopback, just forget about Audio to buffer.

If you use stereo mix, set Audio to buffer high enough not to cause recording or playback glitches. In most cases the default of 100 ms is fine on Windows.


Gale

Re: [Settings for recording] "Audio to buffer" and WASAPI vs

Posted: Fri Mar 24, 2017 3:54 pm
by steve
Gale Andrews wrote:This downconversion will apply dither noise, unless you turned that off in "High-quality conversion" in Quality Preferences.
and if you turn off "dither" in preferences, then you will get "quantization noise" due to rounding down to 16-bit.

Re: [Settings for recording] "Audio to buffer" and WASAPI vs

Posted: Fri Mar 24, 2017 4:13 pm
by Gale Andrews
steve wrote:
Gale Andrews wrote:This downconversion will apply dither noise, unless you turned that off in "High-quality conversion" in Quality Preferences.
and if you turn off "dither" in preferences, then you will get "quantization noise" due to rounding down to 16-bit.
And if that leads to the question which sounds worse, the answer is that quantization noise is usually regarded as worse.


Gale

Re: [Settings for recording] "Audio to buffer" and WASAPI vs

Posted: Sat Mar 25, 2017 10:49 pm
by Kdmeizk
I will no longer use "stereo mix" because it is the farthest from "bit perfect" as you said.

I go back to 32-bit float for logical reasons that you said too. I did not think that the sound is up-converted to 32-bit float in all cases when the sound going through Windows (excepted "Exclusive Mode" so), that is why I always took the same sample rate and bit depth as the source.

I have one last question I think, about "Exclusive Mode". If Windows ignores the settings "Shared Mode", so I can test with VLC for example, and play a sound file of 48000Hz with "Shared Mode" of 44100Hz, Audacity will record with 48000Hz (48000Hz is also setted in the project as a precaution)?

Re: [Settings for recording] "Audio to buffer" and WASAPI vs

Posted: Sun Mar 26, 2017 3:40 pm
by Gale Andrews
Kdmeizk wrote:I have one last question I think, about "Exclusive Mode". If Windows ignores the settings "Shared Mode", so I can test with VLC for example, and play a sound file of 48000Hz with "Shared Mode" of 44100Hz, Audacity will record with 48000Hz (48000Hz is also setted in the project as a precaution)?
Yes the project rate will set the rate Audacity requests from the device.

We don't make VLC, so we can't say what it does. It does have an automatic resampler in the advanced audio preferences, which I have heard is quite aggressive, so it is probably worth turning that off. Windows Media Player I suppose leaves the sample rate at 48000 Hz in the case you mention.

To be sure, I would recommend importing the file into Audacity then you have full control.


Gale

Re: [Settings for recording] "Audio to buffer" and WASAPI vs

Posted: Sun Mar 26, 2017 5:59 pm
by Kdmeizk
I am not sure to understand how the hosts work with "Shared/Exclusive Mode". I disabled "Exclusive Mode" in Windows Sound. I tested with Windows Media Player and the sound is OK in contrast of VLC. But I disabled "Exclusive Mode", so I should listen 44100Hz because "Shared Mode" is setted to this sample rate, no? Audacity seems work like WMP, but:

WASAPI and MME (MME recorded with "stereo mix") work correctly in any case (playing or recording), but not Windows DirectSound (like VLC).

Re: [Settings for recording] "Audio to buffer" and WASAPI vs

Posted: Mon Mar 27, 2017 5:14 pm
by Gale Andrews
There is no need to use Windows DirectSound if you don't want to.

We recommend WASAPI loopback because this is all digital, unlike Stereo Mix.


Gale
Kdmeizk wrote:I am not sure to understand how the hosts work with "Shared/Exclusive Mode". I disabled "Exclusive Mode" in Windows Sound. I tested with Windows Media Player and the sound is OK in contrast of VLC. But I disabled "Exclusive Mode", so I should listen 44100Hz because "Shared Mode" is setted to this sample rate, no? Audacity seems work like WMP, but:

WASAPI and MME (MME recorded with "stereo mix") work correctly in any case (playing or recording), but not Windows DirectSound (like VLC).

Re: [Settings for recording] "Audio to buffer" and WASAPI vs

Posted: Mon Mar 27, 2017 9:52 pm
by Kdmeizk
Yes but "Shared Mode" does not affect recording and playing with these two hosts while "Exclusive Mode" is disabled. So "Shared Mode" should be applied if "Exclusive Mode" is totally disabled, no?