Guest User

Untitled

a guest
Apr 27th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. //the file size is always 0 when use FMOD_OUTPUTTYPE_WAVWRITER_NRT and while{update;}
  2. result = system->setOutput(FMOD_OUTPUTTYPE_WAVWRITER);
  3. ERRCHECK(result);
  4. result = system->init(16, FMOD_INIT_NORMAL, (void *) outpath);
  5. ERRCHECK(result);
  6. result = system->getMasterChannelGroup(&mastergroup);
  7. ERRCHECK(result);
  8. result = system->createSound(inputpath, FMOD_DEFAULT, NULL, &sound);
  9. ERRCHECK(result);
  10. result = system->playSound(sound, 0, false, &channel);
  11. ERRCHECK(result);
  12. system->createDSPByType(FMOD_DSP_TYPE_TREMOLO, &dsp);
  13. channel->addDSP(0, dsp);
  14.  
  15. bool playing = true;
  16. while(playing){
  17. result = channel->isPlaying(&playing);
  18. ERRCHECK(result);
  19. sleep(1);
  20. }
Add Comment
Please, Sign In to add comment