comparison data/fileio/CoreAudioFileReader.cpp @ 773:2079abf4f0c1 tonioni

make a new FlexiNoteModel.h file by copying from NoteModel.h -- will need to change names therein
author matthiasm
date Tue, 26 Mar 2013 14:16:54 +0000
parents b6bb0ecb7958
children 54829c1e155e
comparison
equal deleted inserted replaced
772:f3df2c35e6cd 773:2079abf4f0c1
86 (CFIndex)ba.length(), 86 (CFIndex)ba.length(),
87 false); 87 false);
88 88
89 //!!! how do we find out if the file open fails because of DRM protection? 89 //!!! how do we find out if the file open fails because of DRM protection?
90 90
91 #if (MACOSX_DEPLOYMENT_TARGET <= 1040 && MAC_OS_X_VERSION_MIN_REQUIRED <= 1040) 91 //#if (MACOSX_DEPLOYMENT_TARGET <= 1040 && MAC_OS_X_VERSION_MIN_REQUIRED <= 1040)
92 FSRef fsref; 92 // FSRef fsref;
93 if (!CFURLGetFSRef(url, &fsref)) { // returns Boolean, not error code 93 // if (!CFURLGetFSRef(url, &fsref)) { // returns Boolean, not error code
94 m_error = "CoreAudioReadStream: Error looking up FS ref (file not found?)"; 94 // m_error = "CoreAudioReadStream: Error looking up FS ref (file not found?)";
95 return; 95 // return;
96 } 96 // }
97 m_d->err = ExtAudioFileOpen(&fsref, &m_d->file); 97 // m_d->err = ExtAudioFileOpen(&fsref, &m_d->file);
98 #else 98 //#else
99 m_d->err = ExtAudioFileOpenURL(url, &m_d->file); 99 m_d->err = ExtAudioFileOpenURL(url, &m_d->file);
100 #endif 100 //#endif
101 101
102 CFRelease(url); 102 CFRelease(url);
103 103
104 if (m_d->err) { 104 if (m_d->err) {
105 m_error = "CoreAudioReadStream: Error opening file: code " + codestr(m_d->err); 105 m_error = "CoreAudioReadStream: Error opening file: code " + codestr(m_d->err);