objective-c - 如何在 iOS 14 Objective C 中录制立体声
问题描述
如何在 iOS 14 Objective C 中录制立体声
这是我的代码我现在不知道如何将AVAudioSessionPolarPatternStere o 添加到我的代码中 我找到了 Swift 的简单代码,但我需要在我的目标 c 代码中添加
AVAudioSession * audioSession = [AVAudioSession sharedInstance];
const AVAudioSessionPolarPattern AVAudioSessionPolarPatternStereo;
[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
[audioSession setActive:YES error:nil];
NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc] init];
[recordSetting setValue :[NSNumber numberWithInt:kAudioFormatMPEG4AAC] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey];
[recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey];
解决方案
推荐阅读
- c++ - 如何为 MSVC 设置 CMAKE_EXE_LINKER_FLAG -L 等效项
- c - STM32 Bare Metal C - 无法让 LED 工作
- angular - redux ngrx 存储保存在浏览器中的位置以及如何手动删除状态
- sql - 如何使用内部联接连接多个表?
- python - 基于两个过滤列的 For 循环
- c++ - CMake 标头依赖项跟踪似乎不适用于 target_include_directories?
- bash - 如何将变量值存储在关联数组键中
- android - 如何在 2 个不同的项目中使用 firebase?
- javascript - 不同显示尺寸的不同类别
- swift - 如何使用 SwiftUI 和 UIImagePickerController 拍摄多张照片