CAShow() not outputting to console

Viewed 604

Trying to test the state of an AUGraph in a Swift 4.0 project.

var audioGraph: AUGraph? = nil

func createAUGraph() {

    NewAUGraph(&self.audioGraph)

    CAShow(UnsafeMutablePointer<AUGraph>(self.audioGraph!))
    CAShow(UnsafeMutablePointer(self.audioGraph!)) }

I am not seeing anything output to the Console, however.

I've stepped through the code and the AUGraph and AUNodes seem to be created and instantiated successfully..

Is this an indication the AUGraph does not exist ... Or have I used this AudioToolBox method incorrectly?

3 Answers

CAShow prints to os_log.

You can see the log in the Console.app. See this SO answer for more information: https://stackoverflow.com/a/48229691/1960783

Alternatively you can use the other method CAShowFile(void *inObject, FILE *inFile) and use stdout for the file pointer to log directly to the Xcode console.

In Swift that would be:

CAShowFile(UnsafeMutableRawPointer(graph), stdout)

Alternatively you can use the other method CAShowFile(void *inObject, FILE *inFile) and use stdout for the file pointer to log directly to the Xcode console

Related