I'm hoping someone can help me with what sounds like a buffer underrun problem when burning audio CDs. First up, here are two sound samples. Goodfile is the original and badfile has been ripped from a burned CD:
This CD was burned by my app, VinylStudio. The customer who has this problem tells me he has an iMac which is about 12 months old equipped with a MATSHITA drive. We don't see this problem anywhere else but he tells me that iTunes burns CDs OK on his machine. What is particularly odd is that our app will burn MP3 CDs OK, but not audio CDs. I also successfully burned a CD on an iMac of similar vintage here, albeit one with an OPTIARC drive.
The customer has tried all the obvious things, including reducing the write speed and checking that buffer underrun protection is enabled. We also tried turning off CD-Text.
The burning code is actually very simple - it writes out the audio tracks as WAV files in a scratch directory, builds a CD layout and then calls [DRBurn burnForDevice: device]. I have checked that these WAV files are not located on a slow device - they are written out to $TMPDIR before the burn is initiated.
Here's the code that builds the CD layout:
NSMutableArray *layout = [[[NSMutableArray alloc] initWithCapacity: n_tracks] autorelease];
for (int i = 0; i < n_tracks; ++i)
DRTrack *track = [DRTrack trackForAudioFile: temporary_wav_file_name [i]];
DRMSF *pregap = [DRMSF msfWithFrames: 150];
[track setPreGap: pregap];
SetTrackVerify (track, DRVerificationTypeNone);
[layout addObject: track];
And here's an excerpt from the console log:
VinylStudio: Burn started, Wed Jan 20 17:16:32 2010
VinylStudio: Burning to CD-R media with SAO strategy in MATSHITA DVD-R UJ-875 DB09 via ATAPI.
VinylStudio: Requested burn speed was 8x, actual burn speed is 8x.
VinylStudio: Burn underrun protection is supported, and enabled.
VinylStudio: Burn finished, Wed Jan 20 17:19:25 2010
VinylStudio: Verify started, Wed Jan 20 17:19:25 2010
VinylStudio: Verify finished, Wed Jan 20 17:19:25 2010
What could I possibly be doing wrong? As th is happening at a customer site, I cannot debug it I can provide a copy of the application, if that would help. We are adding CD-Text, in case that is relevant.