Changeset 2da7526
- Timestamp:
- Nov 2, 2015, 12:18:30 AM (9 years ago)
- 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
- Location:
- src/io
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink_apple_audio.c
r9ee1ee9 r2da7526 37 37 extern int createAubioBufferList(AudioBufferList *bufferList, int channels, int segmentSize); 38 38 extern void freeAudioBufferList(AudioBufferList *bufferList); 39 extern CFURLRef getURLFromPath(const char * path);39 extern CFURLRef createURLFromPath(const char * path); 40 40 char_t *getPrintableOSStatusError(char_t *str, OSStatus error); 41 41 … … 138 138 139 139 AudioFileTypeID fileType = kAudioFileWAVEType; 140 CFURLRef fileURL = getURLFromPath(s->path);140 CFURLRef fileURL = createURLFromPath(s->path); 141 141 bool overwrite = true; 142 142 OSStatus err = noErr; 143 143 err = ExtAudioFileCreateWithURL(fileURL, fileType, &clientFormat, NULL, 144 144 overwrite ? kAudioFileFlags_EraseFile : 0, &s->audioFile); 145 CFRelease(fileURL); 145 146 if (err) { 146 147 char_t errorstr[20]; -
src/io/source_apple_audio.c
r9ee1ee9 r2da7526 52 52 extern int createAubioBufferList(AudioBufferList *bufferList, int channels, int max_source_samples); 53 53 extern void freeAudioBufferList(AudioBufferList *bufferList); 54 extern CFURLRef getURLFromPath(const char * path);54 extern CFURLRef createURLFromPath(const char * path); 55 55 char_t *getPrintableOSStatusError(char_t *str, OSStatus error); 56 56 … … 99 99 100 100 // open the resource url 101 CFURLRef fileURL = getURLFromPath(path);101 CFURLRef fileURL = createURLFromPath(path); 102 102 err = ExtAudioFileOpenURL(fileURL, &s->audioFile); 103 CFRelease(fileURL); 103 104 if (err == -43) { 104 105 AUBIO_ERR("source_apple_audio: Failed opening %s, " -
src/io/utils_apple_audio.c
r9ee1ee9 r2da7526 34 34 } 35 35 36 CFURLRef getURLFromPath(const char * path) {36 CFURLRef createURLFromPath(const char * path) { 37 37 CFStringRef cfTotalPath = CFStringCreateWithCString (kCFAllocatorDefault, 38 38 path, kCFStringEncodingUTF8); 39 39 40 returnCFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfTotalPath,40 CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfTotalPath, 41 41 kCFURLPOSIXPathStyle, false); 42 CFRelease(cfTotalPath); 43 return url; 42 44 } 43 45
Note: See TracChangeset
for help on using the changeset viewer.