Skip to content

Commit

Permalink
Pass kAudioFileFlags_EraseFile to AudioFileCreateWithURL
Browse files Browse the repository at this point in the history
Fixes #31
  • Loading branch information
sbooth committed Mar 5, 2020
1 parent 42b8636 commit 760783e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Rippers/BasicRipper.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ - (oneway void) ripToFile:(NSString *)filename
outputASBD.mChannelsPerFrame = 2;
outputASBD.mBitsPerChannel = 16;

err = AudioFileCreateWithURL((CFURLRef)[NSURL fileURLWithPath:filename], kAudioFileCAFType, &outputASBD, 0, &audioFile);
err = AudioFileCreateWithURL((CFURLRef)[NSURL fileURLWithPath:filename], kAudioFileCAFType, &outputASBD, kAudioFileFlags_EraseFile, &audioFile);
NSAssert2(noErr == err, NSLocalizedStringFromTable(@"The call to %@ failed.", @"Exceptions", @""), @"AudioFileCreateWithURL", UTCreateStringForOSType(err));

err = ExtAudioFileWrapAudioFileID(audioFile, YES, &extAudioFileRef);
Expand Down
2 changes: 1 addition & 1 deletion Rippers/ComparisonRipper.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ - (oneway void) ripToFile:(NSString *)filename
outputASBD.mChannelsPerFrame = 2;
outputASBD.mBitsPerChannel = 16;

err = AudioFileCreateWithURL((CFURLRef)[NSURL fileURLWithPath:filename], kAudioFileCAFType, &outputASBD, 0, &audioFile);
err = AudioFileCreateWithURL((CFURLRef)[NSURL fileURLWithPath:filename], kAudioFileCAFType, &outputASBD, kAudioFileFlags_EraseFile, &audioFile);
NSAssert2(noErr == err, NSLocalizedStringFromTable(@"The call to %@ failed.", @"Exceptions", @""), @"AudioFileInitialize", UTCreateStringForOSType(err));

err = ExtAudioFileWrapAudioFileID(audioFile, YES, &extAudioFileRef);
Expand Down
2 changes: 1 addition & 1 deletion Rippers/ParanoiaRipper.m
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ - (oneway void) ripToFile:(NSString *)filename
outputASBD.mChannelsPerFrame = 2;
outputASBD.mBitsPerChannel = 16;

err = AudioFileCreateWithURL((CFURLRef)[NSURL fileURLWithPath:filename], kAudioFileCAFType, &outputASBD, 0, &audioFile);
err = AudioFileCreateWithURL((CFURLRef)[NSURL fileURLWithPath:filename], kAudioFileCAFType, &outputASBD, kAudioFileFlags_EraseFile, &audioFile);
NSAssert2(noErr == err, NSLocalizedStringFromTable(@"The call to %@ failed.", @"Exceptions", @""), @"AudioFileCreateWithURL", UTCreateStringForOSType(err));

err = ExtAudioFileWrapAudioFileID(audioFile, YES, &extAudioFileRef);
Expand Down

0 comments on commit 760783e

Please sign in to comment.