16

I have the following test code for getting realtime microphone input on macOS:

import AVFoundation // for AVAudioEngine

class Mic
{
    public let audioEngine = AVAudioEngine()

    func startRecording() throws
    {
        print("- - -")
        let inputNode = audioEngine.inputNode
        print("- - -")

        if inputNode.inputFormat(forBus: 0).sampleRate == 0 {
            exit(0);
        }

        let recordingFormat = inputNode.outputFormat(forBus: 0)
        inputNode.installTap(onBus: 0, bufferSize: 1024, format: recordingFormat) { (buffer: AVAudioPCMBuffer, when: AVAudioTime) in
            print( "YES! Got some samples!")
        }

        audioEngine.prepare()

        try audioEngine.start()
    }

    func stopRecording()
    {
        audioEngine.stop()
    }
}

I get output:


2019-07-22 16:26:36.773244+0300 realtime_mic[8111:540360] [plugin] AddInstanceForFactory: No factory registered for id F8BB1C28-BAE8-11D6-9C31-00039315CD46
2019-07-22 16:26:36.803372+0300 realtime_mic[8111:540360] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
2019-07-22 16:26:36.804020+0300 realtime_mic[8111:540360] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine


Does this mean I'm doing something wrong?

Is it possible to prevent these warnings from displaying on the console?

P i
  • 29,020
  • 36
  • 159
  • 267
  • 2
    I see these warnings only in the Xcode 11 betas, it's hidden in die Xcode 10 final. Hopefully they will also go away once Xcode 11 reaches final. – Günther Eberl Aug 01 '19 at 05:51
  • 2
    Still happening in Xcode 11.1 – mojuba Oct 23 '19 at 21:06
  • 4
    I got the same warnings. I didn't even use `AVFoundation` framework. I just used `NSSound` and `NSSound.play()` in `Cocoa`. – Owen Zhao Nov 26 '19 at 16:28
  • I don't even do something with audio, only MIDI, and I also get these warnings on Xcode 12.2. My app is working fine though, so I guess you can just ignore it and it's maybe a bug of Apple. – cbjeukendrup Sep 24 '20 at 15:37
  • 1
    i used audiotoolbox to test it if it invoke that warning. it did not. i wrote at here : https://stackoverflow.com/questions/58279150/is-anyone-else-getting-this-console-message-with-avaudioplayer-in-xcode-11-and/65127623#65127623 – EFE Dec 04 '20 at 08:06

0 Answers0