From e1645b11584d56369373d0d416a55440c81dfbe4 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Tue, 7 May 2013 12:48:35 -0700 Subject: [PATCH] Testing audio noise generation at client --- interface/src/Audio.cpp | 6 +++++- voxel-edit/src/main.cpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 7474f434b7..6a287a84f1 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -111,7 +111,11 @@ int audioCallback (const void *inputBuffer, int16_t *inputLeft = ((int16_t **) inputBuffer)[0]; - // printLog("Audio callback at %6.0f\n", usecTimestampNow()/1000); + // Add some noise to the audio we got from the callback + + for (int i = 0; i < BUFFER_LENGTH_SAMPLES; i++) { + inputLeft[i] = (int16_t) (rand() % 65536); + } if (inputLeft != NULL) { diff --git a/voxel-edit/src/main.cpp b/voxel-edit/src/main.cpp index 5a474f15ee..d93effc7fd 100644 --- a/voxel-edit/src/main.cpp +++ b/voxel-edit/src/main.cpp @@ -19,6 +19,10 @@ bool countVoxelsOperation(VoxelNode* node, void* extraData) { return true; // keep going } +void addLandscape(VoxelTree * tree) { + printf("Adding Landscape...\n"); +} + void addScene(VoxelTree * tree) { printf("adding scene...\n");