0
0

I am programming under windows in C++.
I know that the sound (.wav) output is not null because I can hear it! but the output of GetCurrentLevel on my current channel is 0 on the both right and the left sides.
If someone has already experienced this kind of trouble I would enjoy to share his experience.

  • You must to post comments
0
0

some of your code would help, if you are using hardware playback then this is not supported

  • You must to post comments
0
0

Here is some part of my code. It does the fft but I’m now interested by the level.
I am not very familiar with Fmod. How can I know if I am working with my hardware playback or not? and how can I disable my hardware?
Thank you very much for your help.

float *r,*l;

FSOUND_Init(44100,2,0);

FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE);

my_stream = FSOUND_Stream_Open("sound.wav",0,0,0);

FSOUND_Stream_Play(0,my_stream);


while (1)
  {
         FSOUND_Update();
         spectrum_buffer_ptr = FSOUND_DSP_GetSpectrum();
         for(int i=0; i<512; i++)
                 { 
                   Text_Output<< setprecision(50)<<*spectrum_buffer_ptr<<endl;
                   spectrum_buffer_ptr++;
                 }
          FSOUND_GetCurrentLevels(1,r,l);   
          if (!FSOUND_GetChannelsPlaying()) break;
  }
  • You must to post comments
0
0

the problem is that you are playing on channel 0 and the getting levels for channel 1. you should never use numbers as channels as they don’t directly relate to the channels. you should call play with FSOUND_FREE as the channel number when calling play then store its return value and use that as the channel to be passed to other functions such as getlevels
[code:h1q9hm3k]
chan=FSOUND_Stream_Play(FSOUND_FREE,my_stream);
FSOUND_GetCurrentLevels(chan,r,l);
[/code:h1q9hm3k]

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.