Re: [flac-dev] Fix cuesheet.c to allow metaflac_test.sh to run to completion
Erik, My working view has this as the last commit: commit 19e3918d4e35f4ab99e7fcc58c169025c576dd16 Author: David Schleef d...@schleef.org Date: Thu Aug 25 18:40:29 2011 -0700 Fix md5 structure clearing in previous commit Using this, test_metaflac.sh runs cleanly with my cuesheet.c change. I set up another view using HEAD at git.xiph.org, and in this other view test_metaflac.sh fails. With my change in place, the failure is a mismatch between information stored in the golden file. --- metaflac-test-files/case43-expect.meta 2012-02-02 08:52:57.0 -0800 +++ metaflac-test-files/out.meta 2012-02-03 11:37:13.0 -0800 @@ -10,9 +10,8 @@ METADATA block #1 type: 3 (SEEKTABLE) is last: false - length: 18 - seek points: 1 - point 0: sample_number=0 + length: 0 + seek points: 0 METADATA block #2 type: 4 (VORBIS_COMMENT) is last: false Do you have any more insight ? Earl From: Earl Chew earl_c...@yahoo.com To: flac-dev@xiph.org flac-dev@xiph.org Sent: Thursday, February 2, 2012 8:50:17 AM Subject: Re: [flac-dev] Fix cuesheet.c to allow metaflac_test.sh to run to completion Erik, I'll resync and have another look. Earl From: Erik de Castro Lopo mle...@mega-nerd.com To: flac-dev@xiph.org Cc: Earl Chew earl_c...@yahoo.com Sent: Wednesday, February 1, 2012 10:30:21 PM Subject: Re: [flac-dev] Fix cuesheet.c to allow metaflac_test.sh to run to completion Earl Chew wrote: When reading the INDEX from the cue sheet, the format MM:SS:FF format is disallowed if the sample frequency is not a multiple of 75 because the index would only be approximate. However, 00:00:00 is _exact_ because it denotes the start of the track, so allow it as a special case. This allows metaflac_test.sh to pass. Thanks for this patch Earl, but unfortunately even with this patch in place (and the exit 0 I added the script removed), test_metaflac.sh still fails with: test case43: --import-cuesheet-from... ERROR: metadata does not match expected metaflac-test-files/case43-expect.meta Would be great if you could have another look at this. Cheers, Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Gapless Support
On Fri, Feb 03, 2012 at 02:19:00AM +0400, lrn1...@gmail.com wrote: A word of caution: 1) CUE sheets don't support timestamps past 99 minutes 59 seconds. Not a problem for audio CDs, but for bigger media it might be an issue. Most bigger media (DVD, BD, etc) have already solved that problem by not relying on having a single CUE sheet, instead having a layout of files in folders (or chapters, or whatever) that isn't a 1-dimensional follow one groove from start to finish approach. 2) GStreamer (which is something you might have to use as a multimedia framework for playing audio, if you're developing free software, or even proprietary software for some platforms) doesn't support CUE sheets natively, and i don't really recall any frameworks that do (not that i know that many...). CUE sheet support has to be implemented on top of the framework, and might not be as straightforward as it sounds (especially if you want to also have gapless playback). Clementine audio player, for example, still can't get CUE sheets right, and QuodLibet audio player doesn't support them at all. On an almost daily basis, I listen to FLAC files using one of these: * 2009-vintage Nokia (Symbian OS) with the FolderPlay app. * Sansa Fuze v2 (not the Fuze+) running Rockbox. Both play FLAC files gapless, and while FolderPlay claims to support CUE files I have not been able to make it work with them. If I'm not mobile, I generally use vlc for music playback. FolderPlay (not to be confused with Folder Player for Android) used to be hosted on SourceForge until the lack of source code caused it to be removed. It seems to be back now, however, with source. I have yet to come across a player that I can reliably use with single track FLAC albums, either with embedded CUE or a separate CUE file. So I either rip from CD to per-track files, or split out single track FLAC album archives to individual tracks. Buying music online is almost always per-track, and usually an album is packaged as 1 ZIP file containing all the tracks (as MP3 or FLAC or whatever was chosen). Bandcamp and MusicGlue (to name just 2) do it that way. So there isn't much room for bonus track trickery with online releases. The OST album of the recent David Fincher movie was released initially as a 6-track sampler (online only) then as a full album with 39 tracks adding up to almost 3 hours. Digital release was one ZIP file containing the 39 tracks (in a choice of formats, including FLAC, but not exceeding 16/44.1 resolution) and for physical release the album was split across 3 CDs or 6 vinyl discs. -- -Dec. --- Mosaic is going to be on every computer in the world. - Marc Andreessen, 1994 ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] [PATCH] Include inttypes.h for PRIu64
Dave Yeo wrote: --- Thanks David. Applied. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] [Flac-dev] Git branch with compiling fixes for win32
On 2/3/2012 06:33, JonY wrote: On 2/3/2012 02:50, Erik de Castro Lopo wrote: JonY wrote: Attached patch builds without any warnings for MinGW. Sorry JonY, that patch does not apply against current git master which is here: https://git.xiph.org/?p=flac.git;a=summary Specifically I pulled out much of the #ifdef _MSC_VER printf stuff in this commit: https://git.xiph.org/?p=flac.git;a=commit;h=ce8a75134cace056f6c436d54b57bad1a1d93797 For example (damn thats a horrible URL): https://git.xiph.org/?p=flac.git;a=blobdiff;f=examples/c/decode/file/main.c;h=e5138b4f9a08f0cf3e9a26c8ab68ac76d161785d;hp=32b555947d5c576693dbb6a9ee13a0a67582d96a;hb=ce8a75134cace056f6c436d54b57bad1a1d93797;hpb=8bbbf56403808ff75126cd0840a936aedbc4113b Since your patch seems pretty similar to what I have already commited, I wouldn't be surprised it what we have now doesn't just compile correctly under MinGW. OK, will redo patch later today. My git repo still pointed to the old /mirrors/flac.git link, so I didn't get any updates. OK, rebuilt with latest master, no more printf warnings. Here's another attached patch to suppress redefinition warnings with mingw-w64 lfs64 support. diff --git a/src/flac/decode.c b/src/flac/decode.c index 05d86f3..2173669 100644 --- a/src/flac/decode.c +++ b/src/flac/decode.c @@ -29,10 +29,14 @@ #if defined _MSC_VER || defined __MINGW32__ #include sys/types.h /* for off_t */ #if _MSC_VER = 1600 /* @@@ [2G limit] */ +#ifndef fseeko #define fseeko fseek +#endif +#ifndef ftello #define ftello ftell #endif #endif +#endif #include errno.h #include math.h /* for floor() */ #include stdio.h /* for FILE etc. */ diff --git a/src/flac/encode.c b/src/flac/encode.c index dafa105..87ef2ef 100644 --- a/src/flac/encode.c +++ b/src/flac/encode.c @@ -29,10 +29,14 @@ #if defined _MSC_VER || defined __MINGW32__ #include sys/types.h /* for off_t */ #if _MSC_VER = 1600 /* @@@ [2G limit] */ +#ifndef fseeko #define fseeko fseek +#endif +#ifndef ftello #define ftello ftell #endif #endif +#endif #include errno.h #include limits.h /* for LONG_MAX */ #include math.h /* for floor() */ diff --git a/src/flac/foreign_metadata.c b/src/flac/foreign_metadata.c index 7e273a5..d4fb7c2 100644 --- a/src/flac/foreign_metadata.c +++ b/src/flac/foreign_metadata.c @@ -23,10 +23,14 @@ #if defined _MSC_VER || defined __MINGW32__ #include sys/types.h /* for off_t */ #if _MSC_VER = 1600 /* @@@ [2G limit] */ +#ifndef fseeko #define fseeko fseek +#endif +#ifndef ftello #define ftello ftell #endif #endif +#endif #include stdio.h /* for FILE etc. */ #include stdlib.h /* for calloc() etc. */ #include string.h /* for memcmp() etc. */ diff --git a/src/flac/iffscan.c b/src/flac/iffscan.c index da74a5f..2cb9075 100644 --- a/src/flac/iffscan.c +++ b/src/flac/iffscan.c @@ -26,10 +26,14 @@ #if defined _MSC_VER || defined __MINGW32__ #include sys/types.h /* for off_t */ #if _MSC_VER = 1600 /* @@@ [2G limit] */ +#ifndef fseeko #define fseeko fseek +#endif +#ifndef ftello #define ftello ftell #endif #endif +#endif #include foreign_metadata.h static FLAC__uint32 unpack32be_(const FLAC__byte *b) diff --git a/src/libFLAC/metadata_iterators.c b/src/libFLAC/metadata_iterators.c index ac6473e..9ef9882 100644 --- a/src/libFLAC/metadata_iterators.c +++ b/src/libFLAC/metadata_iterators.c @@ -47,9 +47,13 @@ #include io.h /* for chmod() */ #include sys/types.h /* for off_t */ #if _MSC_VER = 1600 || defined __BORLANDC__ /* @@@ [2G limit] */ +#ifndef fseeko #define fseeko fseek +#endif +#ifndef ftello #define ftello ftell #endif +#endif #else #include sys/types.h /* some flavors of BSD (like OS X) require this to get time_t */ #include utime.h /* for utime() */ diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 72d9e43..0323d73 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -48,10 +48,14 @@ #include sys/types.h /* for off_t */ #if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ #if _MSC_VER = 1600 || defined __BORLANDC__ /* @@@ [2G limit] */ +#ifndef fseeko #define fseeko fseek +#endif +#ifndef ftello #define ftello ftell #endif #endif +#endif #include FLAC/assert.h #include share/alloc.h #include protected/stream_decoder.h diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index 8fb3209..0b6d8c2 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -48,10 +48,14 @@ #include sys/types.h /* for off_t */ #if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ #if _MSC_VER = 1600 || defined __BORLANDC__ /* @@@ [2G limit] */ +#ifndef fseeko #define fseeko fseek +#endif +#ifndef ftello #define ftello ftell #endif #endif +#endif #include FLAC/assert.h #include FLAC/stream_decoder.h #include share/alloc.h diff --git a/src/test_libFLAC/decoders.c b/src/test_libFLAC/decoders.c index e45e722..70127cf 100644 --- a/src/test_libFLAC/decoders.c +++
Re: [flac-dev] Fix cuesheet.c to allow metaflac_test.sh to run to completion
Earl Chew wrote: Erik, My working view has this as the last commit: commit 19e3918d4e35f4ab99e7fcc58c169025c576dd16 Author: David Schleef d...@schleef.org Date: Thu Aug 25 18:40:29 2011 -0700 Fix md5 structure clearing in previous commit Using this, test_metaflac.sh runs cleanly with my cuesheet.c change. snip Do you have any more insight ? Ok, using a bit of git bisect magic, I find that if your cuesheet patch had been applied on top of commit 19e3918d4e, then this patch: commit ce8a75134cace056f6c436d54b57bad1a1d93797 Author: Erik de Castro Lopo er...@mega-nerd.com Date: Wed Feb 1 20:34:04 2012 +1100 Fix a bunch of printf format warnings. Broke it again. I'll work on this some more. Cheers, Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Fix cuesheet.c to allow metaflac_test.sh to run to completion
Erik de Castro Lopo wrote: Ok, using a bit of git bisect magic, I find that if your cuesheet patch had been applied on top of commit 19e3918d4e, then this patch: commit ce8a75134cace056f6c436d54b57bad1a1d93797 Author: Erik de Castro Lopo er...@mega-nerd.com Date: Wed Feb 1 20:34:04 2012 +1100 Fix a bunch of printf format warnings. Broke it again. There was a minor bug in that commit which I have now fixed. Your cuesheet patch has also been commited. Thanks for your hepl with this Ear. Cheers, Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[flac-dev] Moving CPP hackery
Hi all, especially David Yeo and JonY, I've started moving compiler specific CPP hacker into a separate file at include/share/compat.h. Eventually I hope to be able to move all of the require CPP hackery for $random_compiler into this file and have any C file which needs any compiler specific tweak to include this new compatibilty header. My belief is that one this CPP hackery is all in one place, it will be far easier to modify and keep correct. So, I would be very greatful if David Yeo and JonY could test current git HEAD and provide a patch if anything breaks. I will hold off on any further hacking for a couple of days to give you guys time to test this. Cheers, Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev