Help - Search - Members - Calendar
Full Version: Bug with cue sheets and sample rates other than 44.1 kHz
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
skamp
When importing a cue sheet into a 48 kHz FLAC file with metaflac --import-cuesheet-from=foo.cue, track offsets (in samples) are completely off, because metaflac calculates them as if 75 "sectors" were always equal to 588 samples (44,100 / 75). I bet one or more of those numbers is hard-coded somewhere, whereas the calculation (samples per "sector" = sample rate / 75) should always be done.

Even though cue sheets were intended to be used only with CD-DA content (16 bit, 44,100 Hz), they still come in handy even with other types of content (in my case, 48kHz PCM audio from a DVD-Video).
jcoalson
I'll check into the bug, the parser should reject frame numbering unless the sample rate is 44100.

the problem with defining sectors that way is they have to be fractional for some sample rates. cuesheets for non 44.1 audio should use sample numbers instead of mm:ss:ff; flac should parse those fine.

Josh
skamp
I checked the source code, "588" is all over the place. Anyway, since cue sheets aren't a CD-DA standard, do you have some documentation / specification about that? I don't really see why one should use samples instead of sectors with sample rates other than 44.1 kHz, dividing the sample rate by 75 just makes more sense to me...

One big issue for me, even if you're right, is that the sample notation would be incompatible with xmms' mp3cue plugin, which I use. The plugin only knows about frames, which it divides by 75 and multiplies by 1,000 to get a value in milliseconds (which works with all sample rates).

QUOTE(jcoalson @ Apr 14 2007, 17:43) *
the problem with defining sectors that way is they have to be fractional for some sample rates.

Well, 44.1, 48, 88.2, 96, 176.4 and 192 kHz are all dividable by 75, which covers all commercial mediums (CD-DA, DVD-Video, DVD-Audio, MP3, etc...). But I get your point (took me long enough - I've had a hard time fully waking up this morning).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.