biner88 / metronome

Efficient, accurate, cross-platform metronome; supports volume, BPM, and audio source settings.
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Error while using bluetooth earphones in ios #15

Open sunghoonC opened 2 weeks ago

sunghoonC commented 2 weeks ago

I encountered an issue while using bluetooth earphones (sony) at my IOS physical device(Ipad), and checked that it also happens at the example app provided.

I have tried both enableSession: true and false, but the same issue occured. I also tried to manually set the session with audio_sessions, but couldnt fix the problem.

How to cause error:

  1. Start metronome by pressing the floating action button. -> Metronome comes out well through the default speaker.

  2. Connect a bluetooth earphone. -> Cant hear the metronome from either speaker nor earphones. -> Checked _metronomePlugin.isPlaying() at this point, but still returns [true], even when i cant hear it.

  3. Press the floating action button. ->The icon now turns to Icons.pause.

  4. Press the floating action button again. ->App stops(crashes), with a error in XCode.

ERROR:

AVAEInternal.h:76 required condition is false: [AVAudioPlayerNode.mm:591:StartImpl: (_engine->IsRunning())] Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: _engine->IsRunning()' First throw call stack: (0x1a6d50f20 0x19ec4b2b8 0x1a6e4f66c 0x1c09dc198 0x1c0ac9c24 0x1c09dc608 0x1c0ac6a84 0x1053af9b0 0x1053b3424 0x1053b4098 0x109a45f24 0x1094b5794 0x1060ecb98 0x1060ee7bc 0x1060fed58 0x1060fe90c 0x1a6d23710 0x1a6d20914 0x1a6d1fcd8 0x1eb76d1a8 0x1a9359ae8 0x1a940dd98 0x10212cdb8 0x1ca4f7154) libc++abi: terminating due to uncaught exception of type NSException

biner88 commented 2 weeks ago

Sorry, I don't have the right equipment (iPad and Sony bluetooth headphones), if possible you can fix it.

sunghoonC commented 2 weeks ago

I found out that this error occurs at every type of ios device, with any bluetooth earphones.