0
0

Hello, friends!

I try load array with function FSOUND_Sample_Load and play it. I’m doing right?

[code:25e2339f]#include <fmod.h>

FSOUND_SAMPLE* handle;
int main ()
{
char buf[2048];
int i;

for (i=0; i<=2048; i++){
buf[i]=i;
}

// init FMOD sound system
FSOUND_Init (44100, 32, 0);

// load and play sample
handle=FSOUND_Sample_Load (0, buf, FSOUND_LOOP_NORMAL || FSOUND_8BITS, 0, 2048);
FSOUND_PlaySound (0,handle);

// wait until the users hits a key to end the app
while (!_kbhit())
{
}

// clean up
FSOUND_Sample_Free (handle);
FSOUND_Close();
}[/code:25e2339f]

Sound output must be like sawtooth. If I don’t right please say my how do it. Thanks! Sorry for my English :)

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.