dots
dots

Reputation: 11

AudioKit - Trying to generate sound in Audio Kit 5

I am setting up a start application that on start up, will generate some white noise using AudioKit.

I have set up the following code that gets called on start up of my application:

let engine = AudioEngine()
let noise = WhiteNoise()
            
let mixer = Mixer(noise)
mixer.volume = 1

engine.output = mixer
try! engine.start()

But when I start up the application I do not hear any sound being generated. I set up a simple example to generate a sine wave using AVFoundation and I was able to hear the sound generated from my simulator.

I found an old thread - AudioKit - no sound output but I checked the AudioKit repo and it looks like this feature was removed a couple months back since it was not being used.

Any help would be appreciated!

Upvotes: 1

Views: 503

Answers (1)

Aurelius Prochazka
Aurelius Prochazka

Reputation: 4573

Try noise.start() Generators don't default to being on.

Upvotes: 1

Related Questions