Programmatically transfer audio to Cocoa on Mac

How can I programmatically create audio streams using Cocoa on a Mac. To make, say, a white noise generator using the main Mac OSX frameworks in Cocoa applications?

+3
source share
2 answers

One way: CoreAudio DefaultOutputUnit.

You can configure it with parameters such as output sample rate, resolution, and output sample format. You can then programmatically create a raw sound wave and provide it to the output device.

Take a look at this example on your computer at / Developer / Examples / CoreAudio / SimpleSDK / DefaultOutputUnit /

. , .

/Developer/Examples/CoreAudio/ .

+4

.

+2

Source: https://habr.com/ru/post/1697077/


All Articles