mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-16 04:05:54 +00:00
projectM-test random sound data
git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/personal/carm/represet@1197 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
#include "sdltoprojectM.h"
|
||||
#include "ConfigFile.h"
|
||||
#include "getConfigFilename.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
// FIXME: portable includes?
|
||||
// i just added what works for me -fatray
|
||||
@ -86,6 +87,8 @@ int main(int argc, char **argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
float fakePCM[512];
|
||||
|
||||
void renderLoop() {
|
||||
while (1) {
|
||||
projectMEvent evt;
|
||||
@ -139,6 +142,18 @@ void renderLoop() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
fakePCM[0]=0;
|
||||
for (int x = 1; x< 512;x++)
|
||||
{
|
||||
fakePCM[x] = fakePCM[x-1] + (rand()%200 - 100) *.002;
|
||||
}
|
||||
|
||||
|
||||
globalPM->pcm()->addPCMfloat(fakePCM, 512);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
globalPM->renderFrame();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user