My app uses
Ti.Media.startMicrophoneMonitor to monitor average ambient sound level. While this, I have to play some sound samples, which also work - but they are played only on the phone speaker (the small one on the top). (I had to use
AUDIO_SESSION_MODE_PLAY_AND_RECORD to enable them.) How can I set
Ti.Media.AUDIO_SPEAKER to use the bottom speaker instead?
Hi Kristof! I'm having the same problem... Here are some of my ideas on the subject, not sure if everything is 100% correct...
AUDIO_SESSION_MODE_PLAY_AND_RECORD ---->> will set Ti.Media.audioLineType = AUDIO_RECEIVER_AND_MIC (1) or if the headphones are plugged in AUDIO_HEADPHONES_AND_MIC (2)
---the sound comes from the top speaker, used for phone-calls, not the bottom speaker, therefore it sounds muted / you are supposed to have your ear at the top of the phone
---user can record sound from the mic at the bottom
AUDIO_SESSION_MODE_RECORD ----->> Ti.Media.audioLineType = AUDIO_MICROPHONE (6) -only mic is used, no speaker, no playback of the recorded audio
AUDIO_SESSION_MODE_AMBIENT ----->> Ti.Media.audioLineType = Ti.Media.AUDIO_LINEOUT (4) - sound comes from bottom speaker - -but no mic/recording option
...so it looks to me like there is no audio session which enables bottom speaker and mic, and I can't figure out how to set sound to come from bottom speaker while recording
here some 2 years old ideas
[inline link text] (http://stackoverflow.com/questions/1613556/iphone-sdk-audiosession-question)
[inline link text] http://developer.appcelerator.com/question/56451/output-speaker
This seems to be an issue only on the iPhone. On iPad and iPod Touch the AUDIO_SESSION_MODE_PLAY_AND_RECORD should be enough.
Think you can help? Login to answer this question!