Audacity records at wrong clock rate
Posted: Sun Nov 04, 2012 6:53 am
Audacity 2.0.3 on Linux is recording — or playing back — at the wrong clock rate, resulting in faster-than-normal playback. I verified this by timing a recording session of streaming audio (a YouTube video) of known length with a stopwatch. The length of the recording as shown by Audacity was several seconds shorter than the actual time of the source material. By noting the time difference, I was able to work out the speed ratio. Using this information, I was able to use the Effect / Change speed... tool to slow down the recording so that the pitch sounded normal again, i.e, the same as the source material, and the length of the recording matched. By experimenting I found I need to change the playback speed -8.125%, which precisely matches the difference between a clock rate of 48 kHz and 44.1 kHz. In all cases the play-at-speed control was set to 1.000.
If I set the Project Rate (lower left corner of main window) to 48000 Hz, I capture a 60 second stereo recording at 48000 Hz that ends up about 3 seconds short on Audacity's track time scale once I stop recording. If I play back this capture, the tempo is too fast and the pitch is too high. Also, the rate in the track window shows 48000 Hz, the same as the project rate during the recording. If I then open the track menu and in the Set Rate item change the sampling rate to 44100 Hz, the time scale is instantly corrected to the same as the source material and the pitch and tempo sound normal. I can then proceed to export the track as a WAV or MP3 file and it sounds as it should with any other player.
This should not be so.
If one records something with Audacity with the play-at-speed set to 1, it should play back precisely as it sounded originally, without having to apply a speed or sampling rate change, which may introduce sampling errors and distortion in the waveform.
Any ideas how to fix this? Is it a bug in Audacity?
If I set the Project Rate (lower left corner of main window) to 48000 Hz, I capture a 60 second stereo recording at 48000 Hz that ends up about 3 seconds short on Audacity's track time scale once I stop recording. If I play back this capture, the tempo is too fast and the pitch is too high. Also, the rate in the track window shows 48000 Hz, the same as the project rate during the recording. If I then open the track menu and in the Set Rate item change the sampling rate to 44100 Hz, the time scale is instantly corrected to the same as the source material and the pitch and tempo sound normal. I can then proceed to export the track as a WAV or MP3 file and it sounds as it should with any other player.
This should not be so.
Any ideas how to fix this? Is it a bug in Audacity?