Running AVAudioEngine on Watch Series 2

I'm running basic Oscillator with a sine wave (created with AVAudioEngine), but sound is scrannel on Apple Watch series 2 OS (6.2.6), however it sounds clear on Simulator. What could be the reason?
I'm running oscillator within the range of 100-900 frequency and 0-1 amplitude.
Answered by ozgurs in 639423022
  1. Sound is noisy and scrannel on watch. I'm using this repo, https://github.com/GrantJEmerson/SwiftSynth and set

Oscillator.amplitude and Synth.shared.frequency.
2. I didn't tried on other watches, I don't have them. I only tried with Watch simulators (Series 4 and Series 5) that worked fine. I will download Series 2 sim and try on that too.
3. I mean Hz for frequencies. I placed a slider between 100-900 Hz and tried different values on this range. Is there a spec where I can check available frequencies for watch hardware?
4. I couldn't. I don't have wireless headphones.
  1. Can you explain in more detail what's wrong with the sound on the watch?

  2. Have you tried this on other watches? Is the problem specific to Series 2?

  3. It's not clear what your frequency range means. If you mean 100-900 Hz, that's very much a bass sound, and it's possible that the watch hardware cannot reproduce it.

  4. Have you tried listening to the watch output on headphones? Does that work?

Accepted Answer
  1. Sound is noisy and scrannel on watch. I'm using this repo, https://github.com/GrantJEmerson/SwiftSynth and set

Oscillator.amplitude and Synth.shared.frequency.
2. I didn't tried on other watches, I don't have them. I only tried with Watch simulators (Series 4 and Series 5) that worked fine. I will download Series 2 sim and try on that too.
3. I mean Hz for frequencies. I placed a slider between 100-900 Hz and tried different values on this range. Is there a spec where I can check available frequencies for watch hardware?
4. I couldn't. I don't have wireless headphones.
Sound is scratchy on watch. I was looking for the right word in English :)
We tested it on Series 4 and it sounds clear on that.
Apart from anything else, it looks like your AVAudioSourceNode rendering callback isn't thread safe (relative to the frequency property).
Running AVAudioEngine on Watch Series 2
 
 
Q