0
0

Hey !
I’d like to “run a song without sound” (sorry I couldn’t find out the proper word, maybe “background”) so that a I can analyse it faster.
I thought it was just a matter of init flag (i use a NONREALTIME flag) but when i start my program, i can hear the sound.
Here is my code :
[code:3mww2tu5]int main()
{
FMOD_SYSTEM *sys;
FMOD_SOUND *stream;
FMOD_CHANNEL *channel=0;
float *wavedata;
int playing = 0;

FMOD_System_Create(&sys);
FMOD_System_Init(sys,32,16,FMOD_INIT_NONREALTIME,NULL);
FMOD_System_CreateSound(sys,song,FMOD_SOFTWARE,0,&stream);
FMOD_System_PlaySound(sys, FMOD_CHANNEL_FREE, stream, 0, &channel);

do {

  FMOD_Channel_GetPosition(channel,&time,FMOD_TIMEUNIT_MS);
  FMOD_Channel_GetWaveData(channel,wavedata,1,0);

  if (time-old_time >= 1000) {
     old_time=time;
     printf("[waveData:%lf]\n", wavedata);
  }

  FMOD_Channel_IsPlaying(channel,&playing);      
  FMOD_System_Update(sys);

} while (playing);

return 0;
}[/code:3mww2tu5]
Thanks

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.