Changeset 98a3887 for src/io/utils_apple_audio.c
- Timestamp:
- Jan 24, 2014, 5:09:50 PM (11 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:
- 5ab8e59
- Parents:
- 16dda03
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/utils_apple_audio.c
r16dda03 r98a3887 10 10 void freeAudioBufferList(AudioBufferList *bufferList); 11 11 CFURLRef getURLFromPath(const char * path); 12 char_t *getPrintableOSStatusError(char_t *str, OSStatus error); 12 13 13 14 int createAubioBufferList(AudioBufferList * bufferList, int channels, int max_source_samples) { … … 39 40 } 40 41 42 char_t *getPrintableOSStatusError(char_t *str, OSStatus error) 43 { 44 // see if it appears to be a 4-char-code 45 *(UInt32 *)(str + 1) = CFSwapInt32HostToBig(error); 46 if (isprint(str[1]) && isprint(str[2]) && isprint(str[3]) && isprint(str[4])) { 47 str[0] = str[5] = '\''; 48 str[6] = '\0'; 49 } else 50 // no, format it as an integer 51 sprintf(str, "%d", (int)error); 52 return str; 53 } 54 41 55 #endif /* __APPLE__ */
Note: See TracChangeset
for help on using the changeset viewer.