0
0

getWaveData is a tricky one…

I’m trying to fill an array from getWaveData, so I can draw an WaveForm. I don’t want to play the file to soundcard so I used NOSOUND_NRT. But I dont get it right, some times the array is filled, some times not and not alwas with the same values….

I’m using C#

[code:2anl1cbq]private float[] _audioArray = new float[1024];
bool _isplaying=false;

result = system.playSound(FMOD.CHANNELINDEX.FREE, sound, false, ref channel);
ERRCHECK(result);

        do 
        {   
            channel.getWaveData(_audioArray,1024,0);

            channel.isPlaying(ref _isplaying);
            system.update();    


        } while (_isplaying); [/code:2anl1cbq]

Help… 😉

  • You must to post comments
0
0

I want to draw a waveform for the hole audiofile “offline” then I can serialize the array for late use for that particular audiofile.

So I want to draw the waveform as fast as possible, not in realtime.

  • You must to post comments
0
0

I’m trying to get how readData can give me a wave form.

Do I get “level” as output from readData or, a simple code example would be a great help. I also understand that FMOD_OPENONLY would be used in my case.

Thanks!

  • You must to post comments
0
0

Thanks. I give it a try.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.