Menu

#422 Generate a CUE file without full Extract

Invalid
nobody
CUE (5)
Medium
Defect
2017-11-02
2017-11-01
No

Please add a way for XLD to generate a CUE file without attempting to extract the entire CD. The CUE file should cover all tracks, as it would be if extracting in Extraction Mode of "Save as a single file (+ cue)".

My situation is that I'm trying to extract from a damaged CD. The final tracks have errors which slow down the process so that, at 96.5% complete, it looks to take thousands of minutes more to finish. When I cancel the extraction task for the CD, the destination directory is empty. I see no menu item to generate the CUE file without extracting. I want the CUE file because I want to assemble a unitary FLAC file for the whole CD from individual extracted track audio files, and have a CUE file for that unitary FLAC file.

Workaround: I can assemble a CUE file by hand.

It would be enough to have a menu command which generates a CUE file without performing a complete extraction. I would be enough to have the CUE file get written during an Extract operation, even if the Extract operation was cancelled.

I am using XLD Version 20170729 (150.3) on Mac OS X El Capitan, version 10.11.6 (15G1611).

I believe that, once XLD has scanned the pregaps and fetched the metadata, it has enough information to write out a CUE file without performing the full extraction. I may be wrong about this, and I haven't read the code to check.

Discussion

  • James SF DeLaHunt

    Looking at the code for r437, I have some idea where the relevant parts of the code might be. This is only from a quick read, so I might be mistaken.

    The CUE file appears to be generated by routine (NSMutableData *)cueDataForTracks:(NSArray *)tracks withFileName:(NSString *)filename appendBOM:(BOOL)appendBOM samplerate:(int)samplerate in xld-code-437-trunk/XLD/XLDCustomClasses.m:285-380 .

    The caller for cueDataForTracks appears to be routine (void)convert in xld-code-437-trunk/XLD/XLDConverterTask.m:787-1133 . I see an else if(stopConvert) clause at lines 1043-1048, and an else clause below that. One clause, or the other, might execute, but not both. I guess the else if(stopConvert) clause handles the case where the user cancels extraction, and the else clause handles successful extraction. The code calling cueDataForTracks is in the else clause.

    A different way to structure this code would be to a more fine-grained notion of cancel, so that the user could ask for "cancel extraction but not the rest", or "cancel everything". Then refactor the if else if else structure so that other operations, like cueDataForTracks, can be called even if user asks for "cancel extraction but not the rest".

     
  • James SF DeLaHunt

    As an example, I set XLD to work on my difficult CD. After about 15 minutes, the progress displays as "96.6 %, 0.0x realtime, 10699:25 remaining". I could wait 7.4 days for XLD to finish, or I could press "Cancel", and lose the chance for a CUE file.

     
  • tmkk

    tmkk - 2017-11-02

    Well, how about File -> Save Cue Sheet As?

     
  • James SF DeLaHunt

    Yes, exactly like File -> Save Cue Sheet As! You are amazing, you implemented the enhancement already!

    In my defence, I looked for instructions on saving a cue sheet in Help -> XLD Help, and in http://tmkk.undo.jp/xld/index_e.html, and in the CDDB and Profile menus, but did not see any mention of this feature.

     
  • tmkk

    tmkk - 2017-11-02
    • status: New --> Invalid
     

Log in to post a comment.