Version 4.4.0

This commit is contained in:
Gary Scavone
2013-09-29 23:11:39 +02:00
committed by Stephen Sinclair
parent d199342e86
commit eccd8c9981
287 changed files with 11712 additions and 7676 deletions

View File

@@ -2,6 +2,7 @@
#include "SineWave.h"
#include "RtWvOut.h"
using namespace stk;
int main()
{
@@ -9,6 +10,7 @@ int main()
Stk::setSampleRate( 44100.0 );
Stk::showWarnings( true );
int nFrames = 100000;
SineWave sine;
RtWvOut *dac = 0;
@@ -22,8 +24,19 @@ int main()
sine.setFrequency( 441.0 );
// Play the oscillator for 40000 samples
for ( int i=0; i<40000; i++ ) {
// Option 1: Use StkFrames
/*
StkFrames frames( nFrames, 1 );
try {
dac->tick( sine.tick( frames ) );
}
catch ( StkError & ) {
goto cleanup;
}
*/
// Option 2: Single-sample computations
for ( int i=0; i<nFrames; i++ ) {
try {
dac->tick( sine.tick() );
}