MME / Windows Direct Sound - speed problems?

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
bomber1978
Posts: 146
Joined: Fri Sep 17, 2010 8:00 am
Operating System: Please select

MME / Windows Direct Sound - speed problems?

Post by bomber1978 » Tue Apr 08, 2014 1:38 pm

Hello.
I just read in an old thread that using MME can cause some speed problems?
I don't really understand this... I mainly have used Audacity for changing the speed of recordings... And have used MME in the past...
So I'm wondering what it means?
Here's what I read..... I really didn't think MME would cause problems....
-----------
On Vista and 7, DirectSound is unlikely to have much less latency because of the emulation. However DirectSound on Vista/7 does allow Audacity to use the new "exclusive mode" to take exclusive control of the sound device if this is set at "Sound" in the Windows Control Panel. The benefit of "exclusive control" is that no resampling is done in Windows. So if you choose a project rate bottom left of Audacity that is compatible with your sound device, you shouldn't get resampling distortion or speed problems that can happen if you use MME. See Help > Audio Device Info in Audacity to view the sample rates your device claims to support.

steve
Site Admin
Posts: 80694
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: MME / Windows Direct Sound - speed problems?

Post by steve » Tue Apr 08, 2014 1:56 pm

bomber1978 wrote:I just read in an old thread that using MME can cause some speed problems?
Do you get problems with playback at the wrong speed (noticeably wrong)?
If not then it is nothing to worry about. The comment that you posted relates to a specific problem that may occur on some Windows machines. If it does not apply to your computer then you can safely ignore it. MME is the default option for Windows because it is the one that works most reliably on most machines.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

bomber1978
Posts: 146
Joined: Fri Sep 17, 2010 8:00 am
Operating System: Please select

Re: MME / Windows Direct Sound - speed problems?

Post by bomber1978 » Tue Apr 08, 2014 2:59 pm

Thanks for the answer...
I rarely use playback as I burn most to media as I like to keep hard copies, and listen on my audio system, so I really can't say what playback is like..., I really only use it when "editing" and not "listening".
Have done a loads of "speed change" editing so I hope they're all OK!
It seems from what you have said it would be a major and quite obvious change / error in the speed?
PS - I do not even see a "sound" option in my Windows Control Panel, ibviously I have Hardware and Sound but I can't see exactly what it's refering to, where exactly should that be?

steve
Site Admin
Posts: 80694
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: MME / Windows Direct Sound - speed problems?

Post by steve » Tue Apr 08, 2014 3:12 pm

bomber1978 wrote:It seems from what you have said it would be a major and quite obvious change / error in the speed?
Yes it's likely to be very obvious. I presume that you do listen to what you are doing while editing - if so, and you've not noticed that it's playing too slow or too fast, then you've not got a problem.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: MME / Windows Direct Sound - speed problems?

Post by Gale Andrews » Wed Apr 09, 2014 4:55 am

bomber1978 wrote: I do not even see a "sound" option in my Windows Control Panel
You can read about the Windows "Sound" control panel here: http://wiki.audacityteam.org/wiki/Mixer ... es#vistacp .

The speed problems can affect recording or (more rarely) playback. They can arise with MME (or in a somewhat similar way with Windows Direct Sound with "Exclusive Mode" off) if there is a mismatch of sample rates.

The specific point about MME is that it resamples all audio to 44100 Hz. So speed problems should not occur under MME if:
  • Your tracks and project rate in Audacity are 44100 Hz
  • and if in Windows "Sound" you have set Default Format for the recording or playback devices you use to 44100 Hz.
This assumes of course that the drivers of your sound device are appropriate for the device and are working correctly.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

bomber1978
Posts: 146
Joined: Fri Sep 17, 2010 8:00 am
Operating System: Please select

Re: MME / Windows Direct Sound - speed problems?

Post by bomber1978 » Thu Apr 10, 2014 1:09 pm

Gale Andrews wrote:
bomber1978 wrote: I do not even see a "sound" option in my Windows Control Panel
You can read about the Windows "Sound" control panel here: http://wiki.audacityteam.org/wiki/Mixer ... es#vistacp .

The speed problems can affect recording or (more rarely) playback. They can arise with MME (or in a somewhat similar way with Windows Direct Sound with "Exclusive Mode" off) if there is a mismatch of sample rates.

The specific point about MME is that it resamples all audio to 44100 Hz. So speed problems should not occur under MME if:
  • Your tracks and project rate in Audacity are 44100 Hz
  • and if in Windows "Sound" you have set Default Format for the recording or playback devices you use to 44100 Hz.
This assumes of course that the drivers of your sound device are appropriate for the device and are working correctly.


Gale

Thanks.

bomber1978
Posts: 146
Joined: Fri Sep 17, 2010 8:00 am
Operating System: Please select

Re: MME / Windows Direct Sound - speed problems?

Post by bomber1978 » Thu Apr 10, 2014 2:06 pm

Hi,
You said MME resamples all audio to 44.1.
I just loaded in a 16bit/48000 file, then a 24bit/48000 file and then a 24bit/96000 file, changed the speed of each by +1% and exported.
I had to select the .wav to export as 24bit, but loaded into Audacity the bottom left showed the sample rates correctly eg. the same as the file I had loaded in.
They also exported correctly....
So I'm not sure what you mean by MME resamples all audio to 44.1 ?, do you mean my original 48000 file is changed to 44.1 while I'm changing the speed and then back to 48000 when exported?, isn't that kind of messing with the file?

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: MME / Windows Direct Sound - speed problems?

Post by Gale Andrews » Fri Apr 11, 2014 4:28 am

bomber1978 wrote:You said MME resamples all audio to 44.1.
I just loaded in a 16bit/48000 file, then a 24bit/48000 file and then a 24bit/96000 file, changed the speed of each by +1% and exported.
I had to select the .wav to export as 24bit, but loaded into Audacity the bottom left showed the sample rates correctly eg. the same as the file I had loaded in.
They also exported correctly....
So I'm not sure what you mean by MME resamples all audio to 44.1 ?, do you mean my original 48000 file is changed to 44.1 while I'm changing the speed and then back to 48000 when exported?, isn't that kind of messing with the file?
The resampling MME does is during playback and recording (real-time), not affecting audio data.

If you exported with the Audacity project rate bottom left at the same rate as the imported file, there is no resampling.

If you played a 96000 Hz file in Windows Media Player, with Windows Sound for the audio device set to Default Format of 48000 Hz (Exclusive Mode off), I believe it's resampled by Windows to 48000 Hz.

If you then recorded it into Audacity under MME this would make Windows resample it to 44100 Hz for sending to Audacity.

If the Audacity project rate was 96000 Hz, this makes Audacity resample it from 44100 Hz back to 96000 Hz.

The "Actual rate" shown bottom right of Audacity when recording under MME and the sample rates for devices under MME at Help > Audio Device Info... are both erroneous as I understand it. The actual recording rate should always be 44100 Hz under MME and the device rates under MME should be those the device really supports whereas they are actually a list of Audacity supported rates.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

bomber1978
Posts: 146
Joined: Fri Sep 17, 2010 8:00 am
Operating System: Please select

Re: MME / Windows Direct Sound - speed problems?

Post by bomber1978 » Sat Apr 12, 2014 9:24 am

Gale Andrews wrote:
bomber1978 wrote:You said MME resamples all audio to 44.1.
I just loaded in a 16bit/48000 file, then a 24bit/48000 file and then a 24bit/96000 file, changed the speed of each by +1% and exported.
I had to select the .wav to export as 24bit, but loaded into Audacity the bottom left showed the sample rates correctly eg. the same as the file I had loaded in.
They also exported correctly....
So I'm not sure what you mean by MME resamples all audio to 44.1 ?, do you mean my original 48000 file is changed to 44.1 while I'm changing the speed and then back to 48000 when exported?, isn't that kind of messing with the file?
The resampling MME does is during playback and recording (real-time), not affecting audio data.

If you exported with the Audacity project rate bottom left at the same rate as the imported file, there is no resampling.

If you played a 96000 Hz file in Windows Media Player, with Windows Sound for the audio device set to Default Format of 48000 Hz (Exclusive Mode off), I believe it's resampled by Windows to 48000 Hz.

If you then recorded it into Audacity under MME this would make Windows resample it to 44100 Hz for sending to Audacity.

If the Audacity project rate was 96000 Hz, this makes Audacity resample it from 44100 Hz back to 96000 Hz.

The "Actual rate" shown bottom right of Audacity when recording under MME and the sample rates for devices under MME at Help > Audio Device Info... are both erroneous as I understand it. The actual recording rate should always be 44100 Hz under MME and the device rates under MME should be those the device really supports whereas they are actually a list of Audacity supported rates.


Gale
Thanks for the info, so I'm pretty much certain this is only related to "playback" and "recording", as you said...
And any "speed change" I have made by loading in a file, making the speed change and exporting, whether at 44.1, or 48000 or 96000 would not be effected?
Thanks

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: MME / Windows Direct Sound - speed problems?

Post by Gale Andrews » Sat Apr 12, 2014 10:58 pm

bomber1978 wrote:any "speed change" I have made by loading in a file, making the speed change and exporting, whether at 44.1, or 48000 or 96000 would not be effected?
None of the "Host" choices such as MME affect writing of audio data.

As I said, If you exported with the Audacity project rate bottom left at the same rate as the imported file, there is no resampling.

If you for example import a 44100 Hz file then export it at 48000 Hz or any other rate than 44100 Hz then Audacity is resampling it using the resampling library it was compiled with (in this case, Libsoxr) .

To see the rate of the imported file, look above the Mute/Solo buttons in the track.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Post Reply