What you are describing is an inevitable consequence of buffering by an “on demand” sound system.
My usual operating system (which I’m using now) is Linux, and I can easily reproduce the problem when using the default ASIO / PulseAudio sound system. What’s happening is:
- You press the Play button (or an equivalent shortcut)
- Audacity starts playback - the playback cursor starts to move and at the same time begins sending audio data to the computer’s sound system.
- The computer sound system opens a new playback stream
- Audio data floods into the sound system playback buffers
- When the playback buffer is sufficiently full, audio playback begins.
Yes, that is a problem, but in most cases it is not a serious problem. This issue is the reason why high performance, low latency audio drivers have been developed. On Windows, most non-free audio recording software use ASIO drivers by default (Linux uses “Jack Audio System” for the same purpose). When using ASIO (of Jack), the process is a bit different:
- The computer sound system is running continuously
- You press “Play”
- Audacity starts playback
- Audio data floods into a very small buffer and begins playing almost immediately.
Even with high performance, low latency drivers, there is still some delay, but it is hardly noticeable, and all data that is sent by Audacity will play from start to end because the playback stream is running continuously.
Because there is always a delay (latency) when playing or recording audio, multi-track audio software performs a “trick” when doing overdub recording, which is to compensate for the round trip delay when recording a second or subsequent track.
Quick description of latency compensation:
Say you have an audio track, you play it through your speakers and record that sound to a new track via a microphone. Not surprisingly it takes time for audio data to be read from the hard driver, work its way through the playback buffers, get converted to analog, play through the speakers, get picked up by the microphone, convert back to digital, work its way through the input buffer and finally be written to disk. This results in the second track being offset from the first track, so the waveform in the second track is later than the waveform in the first track.
The “trick” is to find out exactly how long the “round trip latency” takes, and then to shift the second track to the left so as to compensate for the latency. When set up correctly, this “latency correction” will pull the second track back so that it aligns correctly with the first track.
How to set up latency correction is described here: http://manual.audacityteam.org/man/latency_test.html
Unfortunately, ASIO is provided by Steinberg under a restrictive license (the source code may not be distributed), which is incompatible with Audacity’s open source (GPL v2) license (which requires that the source code is available). This means that Audacity cannot ship with ASIO support without being in breach of one or other license.
Fortunately, modern version of Windows now has its own high performance, low latency drivers, called WASAPI. Most modern sound cards ‘should’ work with WASAPI (sadly, some don’t, but I think that most do these days).
I’d suggest that you try setting the “host” to WASAPI in the device toolbar and see if your sound card performs better like this. The next step is to set up latency correction as described in the previous link.