345

The situation goes a little something like this:

  1. I am programming Xcode whilst concurrently listening to music on my Bluetooth headphones... you know to block out the world.

  2. 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.

  3. 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?

8
  • 2
    It sounds like you should file a radar at bugreport.apple.com Jun 19, 2016 at 6:03
  • 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.
    – Reid
    Jul 27, 2016 at 15:39
  • 1
    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.
    – Dan
    Oct 20, 2016 at 14:07
  • I have the exact same problem. Also filed a bug report at bugreport.apple.com
    – Roland T.
    Oct 27, 2016 at 12:10
  • 6
    Same issue here, my wireless headphones: Bose Quiet Comfort 35. Dec 30, 2016 at 20:06

5 Answers 5

404

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').

system preferences print screen

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.

input selection from toolbar

14
  • 12
    Fixed it for me too (also with Bose QC35) – wonder why this happens :\ Jan 9, 2017 at 16:21
  • 7
    kind of lame that if you want to use the mic in your bose headphones that the audio quality goes to shit
    – odyth
    Feb 5, 2017 at 9:15
  • 4
    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
    – CoderDake
    Jun 8, 2017 at 15:54
  • 2
    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.
    – Swemoph
    Jun 27, 2017 at 7:34
  • 20
    For people using Mac Mini (no default input), use 'Soundflower' and set the simulator input to a different channel. github.com/mattingalls/Soundflower Nov 14, 2017 at 15:20
333

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.

Audio Input Setting

12
  • 49
    Should be accepted answer. Made my qc35 usable again
    – jalmaas
    Nov 7, 2017 at 8:19
  • Thanks for this, works for me, though the option is greyed out on the iPhone 5s and SE simulators oddly enough (maybe more, but iPhone X, 8, 8+ are fine). Mar 22, 2018 at 10:47
  • 3
    I'm using a Mac mini and there is no Internal Microphone to select.
    – Matt
    Jun 7, 2018 at 19:02
  • 2
    @Matt, See stackoverflow.com/questions/37901761/… Jun 28, 2018 at 9:52
  • 1
    It seems that the Audio options are available only for simulator with iOS 11 and up.
    – kientux
    Aug 2, 2018 at 7:26
15

On Simulator, Select;

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

Done.

Simulator Audio Input

1
  • 4
    Any solution for Mac Pros which does not have an internal mic so there is nothing to switch to?
    – ROC
    Nov 29, 2020 at 9:46
5

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)

3
  • 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. Jul 15, 2020 at 4:23
  • 17
    I am using XCode 12 (official release) and the issue still persists with simulator running iOS 14 (if that matters). Sep 24, 2020 at 13:02
  • 1
    Also still happens when running the Canvas simulator...
    – RPatel99
    May 26, 2021 at 5:46
0

enter image description hereYou can also switch to Mac's internal mic in System Preferences -> Sound, that's how I usually fix this bug (I have Sony Wh-1000XM3)

Not the answer you're looking for? Browse other questions tagged or ask your own question.