iPhone音频:音量微弱(但耳机可以) [英] IPhone audio: Volume faint ( but okay with headphones )
问题描述
我收到了意外的音频行为:
I'm getting unexpected audio behaviour:
问题-iPhone设备的音量非常微弱,但是如果我插入耳机,则音量非常完美
- 首先,在未插入任何内容的情况下在iPhone上启动应用.
- 音频有效,但是它是如此微弱,确实好像是在最小音量下.但已达到最大音量.
- 现在我插入了耳机.全量.很棒!
- 拔下耳机.转到(2)
无论是否插入耳机都没关系.这似乎是一个不相关的问题
It doesn't matter whether I start with the headphones plugged in or not. It seems to be an unrelated problem
此行为是我的应用程序所特有的.我已经尝试过Apple的AVTouch示例,无论是否戴耳机,此举都能正常工作.
this behaviour is peculiar to my app. I have tried Apple's AVTouch sample, and this behaves correctly with and without headphones.
推荐答案
wooHoo!
// kAudioSessionOverrideAudioRoute_Speaker would only work once.
// kAudioSessionProperty_OverrideCategoryDefaultToSpeaker works
// until the session changes.
SET_PROPERTY( kAudioSessionProperty_OverrideCategoryDefaultToSpeaker, UInt32, (UInt32) YES );
基本上,iPhone有2个内置扬声器,接收器"在接听电话时会卡在您的耳朵上,还有一个更大的外接扬声器(这2个格栅在电源插槽的两侧,左侧是外接扬声器)扬声器,最合适的扬声器是麦克风-令人困惑:我曾经将iPhone送到泰国的一家维修店,因为我的正确的扬声器"无法正常工作,他们甚至愿意为我修理它?!幸运的是,我没有就像价格...)
basically the iPhone has 2 internal speakers, the ' receiver ' which jams up against your ear when you receive a call, and a far bigger external speaker ( those 2 grills either side of the power slot, the left one is the external speaker, the right one is the mic -- confusing: I once took my iPhone to a repair shop in Thailand because my ' right speaker ' wasn't functioning, and they even offered to fix it for me?! luckily I didn't like the price... )
无论如何,我绝对没有充分的理由想到
anyway, for absolutely no good reason I can think of, the
SET_PROPERTY( kAudioSessionProperty_AudioCategory, UInt32,
kAudioSessionCategory_PlayAndRecord );
会话默认使用接收器,因此只需要告诉它使用扬声器即可.
session defaults to using the receiver, so it just needs to be told to use the speaker instead.
这篇关于iPhone音频:音量微弱(但耳机可以)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!