首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在我使用AVAudioSession将音频路由设置为扬声器后没有声音

在我使用AVAudioSession将音频路由设置为扬声器后没有声音
EN

Stack Overflow用户
提问于 2018-09-29 17:17:58
回答 2查看 108关注 0票数 0

在我将音频路由设置为扬声器后没有声音,我使用

[AVAudioSession sharedInstance overrideOutputAudioPort:AVAudioSessionPortOverrideSpeaker error:nil];设置音频路由,音量为最大,但仍无声音

EN

回答 2

Stack Overflow用户

发布于 2018-09-29 17:24:59

具体情况是,在类似的互动直播app中,蓝牙耳机挂起时,音频路由设置为扬声器,设置成功后,没有声音

票数 0
EN

Stack Overflow用户

发布于 2018-10-08 20:19:46

对不起,我来不及回答,我只是想在我弄坏蓝牙耳机后听到扬声器的声音,但实际上我什么也没听到,包括蓝牙耳机。-(void)centralManagerDidUpdateState:(CBCentralManager *) NSLog(@">>>CBCentralManagerStateUnknown------tb");{// NSLog(@">>>CBCentralManagerStateResetting----tb");break(@“NSLog”);第一次打开或者每次蓝牙状态改变都会调用这个函数(central.state) { case CBCentralManagerStateUnknown: NSLog(@“>>>CBCentralManagerStateUnknown------tb”);break;case CBCentralManagerStateUnknown:central break;case break: NSLog(@">>>CBCentralManagerStateUnsupported-----tb");break;case break: NSLog(@">>>CBCentralManagerStateUnauthorized-----tb");break;case CBCentralManagerStateUnauthorized: self CBCentralManagerStatePoweredOff;CurrentDevice // [AVAudioSession sharedInstance case error:nil];[ NSLog(@">>>CBCentralManagerStatePoweredOn----tb");options:@{CBCentralManagerScanOptionAllowDuplicatesKey集合类别:AVAudioSessionCategoryPlayback error:nil];break;case CurrentDevice:AVAudioSessionCategoryPlayback sharedInstance;//开始扫描周围的外设scanForPeripheralsWithServices:nil options:@{CBCentralManagerScanOptionAllowDuplicatesKey:@NO};break;AVAudioSession: break;}

}

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52566925

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档