diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 635822e..f1f3f8e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: submodules: 'recursive' - uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '13.1' + xcode-version: '14' - name: Build run: | gem install --verbose xcpretty diff --git a/3rdparty/celt-0.7.0-build/Base.xcconfig b/3rdparty/celt-0.7.0-build/Base.xcconfig index d1f5f4b..121de43 100644 --- a/3rdparty/celt-0.7.0-build/Base.xcconfig +++ b/3rdparty/celt-0.7.0-build/Base.xcconfig @@ -10,7 +10,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0 SKIP_INSTALL = YES -OTHER_CFLAGS = -x c++ +//OTHER_CFLAGS = -x c++ HEADER_SEARCH_PATHS = . ALWAYS_SEARCH_USER_PATHS = NO diff --git a/src/MKMacAudioDevice.m b/src/MKMacAudioDevice.m index 2be75d1..9abe363 100644 --- a/src/MKMacAudioDevice.m +++ b/src/MKMacAudioDevice.m @@ -58,13 +58,13 @@ static OSStatus inputCallback(void *udata, AudioUnitRenderActionFlags *flags, co actual read bytes count. We need to write it back otherwise we'll reallocate the buffer even if not needed. */ - UInt32 dataByteSize = dev->_buflist.mBuffers->mDataByteSize; + UInt32 dataByteSize = dev->_recordBufList.mBuffers->mDataByteSize; err = AudioUnitRender(dev->_recordAudioUnit, flags, ts, busnum, nframes, &dev->_recordBufList); if (err != noErr) { NSLog(@"MKMacAudioDevice: AudioUnitRender failed. err = %ld", (unsigned long)err); return err; } - dev->_buflist.mBuffers->mDataByteSize = dataByteSize; + dev->_recordBufList.mBuffers->mDataByteSize = dataByteSize; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; short *buf = (short *) dev->_recordBufList.mBuffers->mData; diff --git a/src/MKVoiceProcessingDevice.m b/src/MKVoiceProcessingDevice.m index 02d0b3e..e21cded 100644 --- a/src/MKVoiceProcessingDevice.m +++ b/src/MKVoiceProcessingDevice.m @@ -9,7 +9,17 @@ #import #import #import -#import +#if defined(TARGET_OS_VISION) && TARGET_OS_VISION + #define IS_UIDEVICE_AVAILABLE 1 +#elif TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_MACCATALYST + #define IS_UIDEVICE_AVAILABLE 1 +#else + #define IS_UIDEVICE_AVAILABLE 0 +#endif + +#if IS_UIDEVICE_AVAILABLE + #import +#endif @interface MKVoiceProcessingDevice () { @public @@ -24,6 +34,7 @@ @interface MKVoiceProcessingDevice () { } @end +#if IS_UIDEVICE_AVAILABLE // DeviceIsRunningiOS7OrGreater returns YES if // the iOS device is on iOS 7 or greater. static BOOL DeviceIsRunningiOS7OrGreater() { @@ -38,6 +49,7 @@ static BOOL DeviceIsRunningiOS7OrGreater() { } return iOS7OrGreater; } +#endif static OSStatus inputCallback(void *udata, AudioUnitRenderActionFlags *flags, const AudioTimeStamp *ts, UInt32 busnum, UInt32 nframes, AudioBufferList *buflist) {