audiokit

AudioKit ios AKSamplerMetronome

安稳与你 提交于 2019-11-28 00:25:09
I'm currently using AudioKit's AKSamplerMetronome to generate and play Metronome sounds , now I need implement an callback to get current beat suppose If I'm having 5 beats I need to get current beat that is being played so that I can add some more functions based on the beat count , is there any callback available to achieve It ?? This is my current code // using AKSamplerMetronome var metronome1 = AKSamplerMetronome() var mixer = AKMixer() // first sound called let beatstart = Bundle.main.url(forResource: "mybeat", withExtension: "wav") // other sounds based on beat count let beaten = Bundle

AVAudioSession .defaultToSpeaker changes mic input

自古美人都是妖i 提交于 2019-11-28 00:09:58
I have an app taps the microphone and also play sounds depending on mic input(don't have to be simultaneously tho) This code below works. But one problem is the output plays on the small top speaker and not the bottom real loud speakers. I could solve this problem strangely by putting the 3 lines below just before the player starts , Then I can hear the sound on speakers. But then the microphone stops listening ! Even after the player stops playing. Basically mic does not like when it is .defaultToSpeaker Any idea? Here also documented what I am trying to do is correct: https://developer.apple