How to know when the wav file was saved completed ?


(tianqiujie) #1

I add effects to a wave file. and save it to sdcard. and I have a progress bar, How to know the progress of save the file ?


(Brett Paterson) #2

FMOD doesnt save files. What are you saving a file with?


(tianqiujie) #3

HI, I use the result = FMOD_System_SetOutput(gSystem2, FMOD_OUTPUTTYPE_WAVWRITER);


(Brett Paterson) #4

The wave writer writes until you have finished and closed the system object with System::release or System::close.
To make a progress bar you need to know the end time, and then just interpolate from the start time to the end time.
If you use FMOD_OUTPUTTYPE_WAVWRITER_NRT then you can increment a progress bar every time you call System::update


(tianqiujie) #5

Thank you . How to know the end time use FMOD_OUTPUTTYPE_WAVWRITER? or how do i know whether need call the System::update use the FMOD_OUTPUTTYPE_WAVWRITER_NRT ?


(Brett Paterson) #6

You seem to be playing some sort of file, the wavwriter has no end, so the wavwriter is not relevant to how long you want to run. It will run forever if you want it to.

What are you wanting to end? If it is a sound you are playing, just check isPlaying on the Channel for when the wav file stops playing.