ChatGPT解决这个技术问题 Extra ChatGPT

Bluetooth headphone music quality deteriorates when launching iOS simulator

The situation goes a little something like this:

I am programming Xcode whilst concurrently listening to music on my Bluetooth headphones... you know to block out the world. Then, I go to launch my app in the iOS simulator and BOOM all of a sudden my crystal clear music becomes garbled and super low quality like it is playing in a bathtub 2 blocks away... in the 1940s. Note: the quality deterioration does NOT occur if I am playing music on my laptop or cinema display and I launch the sim. It seems to be exclusively a Sim -> Bluetooth issue.

The problem is more than just annoying. Because often after stopping the simulator the crappy bathtub quality music continues. To fix it I have to open sound preferences in OSX and briefly toggle back to my laptop sound and then back to my Bluetooth headphones.

This is a big deal because I launch the simulator 50x a day and have to do this toggle thing every time as well as suffer listening to 40s era mono ham radio quality music.

For your information, the headphones I am using are Plantronics BackBeat Pro and I am up to date on firmware. I am on OSX 10.11.4 and Xcode 7.3... but this problem has persisted through all versions for 2+ years now. Can you save me from the 1940s?

It sounds like you should file a radar at bugreport.apple.com
Dealing with a similar issue, except in my case the sound quality goes to crap (or the music stops outright) when I kill an app on the simulator. I'm getting around it by running all my music through my phone, but wish I didn't have to. Even worse and more strange: if I quit the simulator, my wireless Logitech mouse stops working entirely! I have to unplug and re-plug the USB receiver. Really strange and annoying.
I have the same problem with the same headphones - when playing through bluetooth, the minute an app I'm working in is playing sound, the microphone turns on and the sound quality greatly deteriorates. It's easily reproducible with an app that simply uses AudioServicesCreateSystemSoundID() to load a sound file and then calls AudioServicesPlaySystemSound() to play it.
I have the exact same problem. Also filed a bug report at bugreport.apple.com
Same issue here, my wireless headphones: Bose Quiet Comfort 35.

A
Almir Filho

I've managed to fix it, and it actually seems to be a microphone issue. Go to System Preferences -> Sound, select the Input tab and set Internal Microphone as the input (mine was set with my headphones').

https://i.stack.imgur.com/EeZoo.png

Crappy sound goes way after that =)

EDIT (May 30 2018):

I've found out an easier way to do the same as above. Instead of opening the System Preferences, you can just go to the Mac OSX toolbar, press Option (alt) + click on the sound icon and then select "Internal Microphone" from the "Input Device" list. Print screen as follows.

https://i.stack.imgur.com/D7tAw.png


Fixed it for me too (also with Bose QC35) – wonder why this happens :\
kind of lame that if you want to use the mic in your bose headphones that the audio quality goes to shit
The headphones are switching to their call mode where frequencies are being filtered out. My guess is that when the simulator asks for the microphone to turn on, it switches the headphone mode or something
Thank you!! Now I can listen to music while coding again. If anyone's curious I took a look at the audio codec. Occasionally when the simulator is open it will switch from AAC to SCO, which seems to cause a deterioration in quality. Quitting the simulator will change the codec back to AAC.
For people using Mac Mini (no default input), use 'Soundflower' and set the simulator input to a different channel. github.com/mattingalls/Soundflower
C
Cezar

If you're using Xcode 9 or higher, you can set a default audio input and output for the simulator. This can be done by launching the simulator from Xcode and navigating to I/O > Audio Input within the menu bar and selecting Internal Microphone. This solution will save your audio preference so you won't have to change it on every launch.

https://i.stack.imgur.com/w4LlW.png


Should be accepted answer. Made my qc35 usable again
You are a lifesaver!
I'm using a Mac mini and there is no Internal Microphone to select.
It seems that the Audio options are available only for simulator with iOS 11 and up.
m
muhasturk

On Simulator, Select;

I/O -> Audio Input -> Macbook [Pro]

Done.

https://i.stack.imgur.com/60HYz.png


Any solution for Mac Pros which does not have an internal mic so there is nothing to switch to?
M
Max O

Seems like years of suffering are finally over, Xcode 12 Beta Release Notes:

Simulator defaults to the internal microphone unless you explicitly choose a different audio source. This avoids triggering phone call mode on Bluetooth headsets which degrades audio quality while listening to music. (59338925, 59803381)


I came here to comment the same thing! I knew the workaround was to change the audio, but I (like others here) reported this back in 2016, can't believe it wasn't addressed until now.
I am using XCode 12 (official release) and the issue still persists with simulator running iOS 14 (if that matters).
Also still happens when running the Canvas simulator...
m
marc_s

https://i.stack.imgur.com/YUkBh.png