steve wrote:Robert J. H. wrote:lame has a delay of 576 samples (half of the mp3 Frame size).
Is that correct? I thought that the overall encoder/decoder delay was undefined, hence the addition of metada by some encoders to enable gapless playback to be faked (a feature supported by Lame).
576 samples should be correct for Lame (Encoding mode). It is the value that is listed on:
http://wiki.hydrogenaudio.org/index.php ... lay_values
(Take also a look at the older Version values, some interesting explanations there).
Foobar2000 lists this value too on the property tab of a file that I've exported.
The length of the file was 1153 samples i.e. a Frame + 1sample to force an additional frame.
The decoded file had in Audacity a length of 3456 samples (3 Frames)
Code: Select all
General
Duration 0:00.026 (1 153 samples)
Sample rate 44100 Hz
Channels 1
Bitrate 69 kbps
Codec MP3
Codec profile MP3 VBR V4
Encoding lossy
Tool LAME3.99r
Other
<ENC_DELAY> 576
<ENC_PADDING> 1727
<MP3_ACCURAT... yes
<MP3_STEREO_... mo o
<MP3_STEREO_... mono
The Initial delays differ only from Encoder to Encoder (as can be seen in the table on the Website above).
The Zero padding causes additional delay apart from the constant one.
Audacity could easily remove this silent parts from the decoded mp3 when
- the Encoder was Lame
- the info tag is available
- similar with other Encoders.
But that doesn't help blast for his game playback Problem.
The great question is how the mp3s are decoded within the game - which engine/library is used and if it can read the Lame info-tag.
The command line of Lame has two Switches that could provide gapless playback, e.g.
--nogap <file 1> ... <file n> makes the files playable one after the other.
I assume that this is made possible by combining the Frames of the two streams (as described in Steve's reply). An actual Looping is harder to achieve, I guess (although it works fine with Foobar2000). Even if no suitable playback device is available, The mp3s can be cut such that the streams seem seamless (what a horrible language

), at least if your Music has any pause in it where you can split and remove the 1152 samples or whatever Foobar2000 and similar Software tells you.
If you want to look at the different Switches of Lame:
Open the Export menu, enter any file Name (not important), choosse external program and press Options.
Enter
enable the Output Option and press OK.
Now press Save. The command Output window will Show all available Options for the installed Lame Version without exporting any file.