Hi, yeah the second parameter is wavedata. It wouldnt compile using an array of float but is ok now pointing to the first element of the array.
However, no values in the array seem to be changing. At first I thought it could be due to opening with the FMOD_HARDWARE flag, but I still cant get it to work.
The code Im using is: to start the stream
result := FMOD_System_CreateSound(xsystem, PChar(fPath), FMOD_SOFTWARE or FMOD_2D or FMOD_CREATESTREAM, nil, sound);
result := FMOD_System_PlaySound(xsystem, FMOD_CHANNEL_REUSE, sound, TRUE, channel);
Then to get the data (on a timer)
FMod_System_GetWaveData(channel, fData, 512, 0);
Can anyone see anything obviously wrong? Im sure its something simple…
The GetWaveData function is ‘channel’ specific (in the conventional stereo sense), but I don’t think the function is channel specific in the FMOD sense; it returns whatever data happen to be playing on the left or right (but not both) audio channel [b:29wlow2k]at the system level.[/b:29wlow2k] Thus, shouldn’t the first parameter correspond to the FMOD system variable (in your example, xsystem)?
I’m not a big fan of GetWaveData, but maybe my hunch will solve your problem.
- stdev answered 12 years ago
Please login first to submit.