Playing sound in never ending loop

I’ve made some tones using audacity - and can use audacity to play the result in a continuous loop.
I export it as an MP3 and download it to a small MP3 player and the continuous play mode makes a clicking sound as it re-starts every time through the loop.

Is that more to do with the MP3 player being low quality - or is there anything I can do in the file I create to lessen that ?

I don’t think Audacity can loop, and it’s an audio editor so I don’t think you’d want to use it as a player. But, you may be able to remove the click.

Clicking at the beginning or ending of a file is usually caused by the waveform not being at zero. That can happen if your file starts/stops in the middle of a wave, or you might have a DC offset (where silence is either above or below the center-line).

First try Effect → DC Offset Removal.

If that doesn’t take care of the problem, you can zoom-in at the beginning and end of the file to see if the waveform is starting/stopping in the middle of a wave.

Edit → Find Zero Crossings will move the cursor to the zero crossing, or you can position the cursor manually. Then if you are at the beginning of the file, delete the part of the wave before the zero crossing. At the end of the file, delete the partial wave after the zero crossing.

When finding the zero-crossing, you may have to compromise between the left & right channels.

A short fade-in and fade-out (maybe 30 - 100 miliseconds) will fix either of these problems. But, you may not want to hear that fade-out fade-in every time the audio loops.

There probably will also be a “gap” between the loops. It’s the nature of MP3 that some silence is normally added to the beginning when you encode to MP3 which makes “gapless playback” tricky. If you can use AAC instead of MP3, it’s less prone to this.

One more thing - Audacity (like all “regular” audio editors) has to decompress the MP3 before editing. MP3 (and AAC, etc) is lossy compression so when you open an MP3 for editing and then re-save as MP3 you are going through another lossy compression step. You may not notice any quality loss, but you should be aware of this and try to minimize the number of times you re-compress.

If you have the CD or original uncompressed file, edit that file and compress once to MP3.

MP3 always has a bit of leading silence. This is a limitation of the MP3 format (Encoder/decoder overall delay is not defined. See: A few players are able to compensate, if the MP3 has been encoded with the LAME Mp3 info tag.

AAC also has a gap at the beginning, but many recent players are able to compensate for it.

OGG Vorbis, and lossless formats (such as WAV, AIFF and FLAC) don’t have this problem.

See this page on Looping in the Audacity Wiki:

This page is moving to become a tutorial in the 2.0.6 Manual