This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To run: | |
| // clang core-audio-sine-wave.c -framework AudioUnit && ./a.out | |
| #include <AudioUnit/AudioUnit.h> | |
| #define SAMPLE_RATE 48000 | |
| #define TONE_FREQUENCY 440 | |
| #define M_TAU 2.0 * M_PI | |
| OSStatus RenderSineWave( | |
| void *inRefCon, |