Playing audio in Windows = Core Audio API? (in: DSP and Plug-in Deve…)
By: flisk
24 Nov 21:15
Quick and dirty saw wave using [url=https://www.music.mcgill.ca/~gary/rtaudio/]RtAudio:
[code]
#include “RtAudio.h”
double freq=100.0;
unsigned int bufferFrames=512, sampleRate=44100;
signed short out=0;
signed short step=(unsigned short)(65535.0*freq/(double)sampleRate);
int saw(void *outputBuffer, void *, unsigned int nBufferFrames, double , RtAudioStreamStatus status, void *){
signed short* buffer=(signed short*)(outputBuffer);
for(unsigned int i=0; i<nBufferFrames; i++){
…
Go to first unread post in this topic
Read more here: Source link