Ignore:
Timestamp:
Nov 2, 2015, 12:18:30 AM (9 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
43b7c6d
Parents:
9ee1ee9
Message:

src/io/{sink,source,utils}_apple_audio.c: fix memory leak calling CFRelease (closes #26, closes #27, and closes #28)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_apple_audio.c

    r9ee1ee9 r2da7526  
    3737extern int createAubioBufferList(AudioBufferList *bufferList, int channels, int segmentSize);
    3838extern void freeAudioBufferList(AudioBufferList *bufferList);
    39 extern CFURLRef getURLFromPath(const char * path);
     39extern CFURLRef createURLFromPath(const char * path);
    4040char_t *getPrintableOSStatusError(char_t *str, OSStatus error);
    4141
     
    138138
    139139  AudioFileTypeID fileType = kAudioFileWAVEType;
    140   CFURLRef fileURL = getURLFromPath(s->path);
     140  CFURLRef fileURL = createURLFromPath(s->path);
    141141  bool overwrite = true;
    142142  OSStatus err = noErr;
    143143  err = ExtAudioFileCreateWithURL(fileURL, fileType, &clientFormat, NULL,
    144144     overwrite ? kAudioFileFlags_EraseFile : 0, &s->audioFile);
     145  CFRelease(fileURL);
    145146  if (err) {
    146147    char_t errorstr[20];
Note: See TracChangeset for help on using the changeset viewer.