title: Manipulate audio file with FMOD
body: <p>According to comments of my previous question, I was too broad. So, I'll try to ask specifics questions.</p>
  
  <p><strong>Context</strong></p>
  
  <p>I want to develop with C++ a very very simple version of the software "Audacity"; in other words a software usefull for manipulating audio files with a graphical user interface. For example, I would like to select an extract of a sound A (start-end point - between XX:XX and YY:YY) then cut/copy it and then paste in another sound B (at ZZ:ZZ), mix two or more sounds, etc.</p>
  
  <p><strong>What I've found</strong></p>
  
  <p>Don't hesitate to correct me if a point is wrong.</p>
  
  <p>Firstly, I think I'll use Qt to make the graphical user interface. I've seen that Qt can also manage audio files BUT, I feel that it can't really manipulate them (cut/paste, mix, ...).</p>
  
  <p>I don't know exactly how an audio file works, and manipulating them can also be complex because of multiple formats, bitrates, sounds mixing... So, I've searched a library to facilitate manipulation and I've found FMOD Ex API.</p>
  
  <p>Then, I've read documentation included with the installation and I've found some answers... and some questions.</p>
  
  <ul>
  <li>Record from microphone</li>
  </ul>
  
  <p>It's possible with System::recordStart and some other methods.</p>
  
  <ul>
  <li>Play song on speakers</li>
  </ul>
  
  <p>It's possible and it's the default ouput : System::playSound.</p>
  
  <ul>
  <li>Play multiple sounds simultaneously</li>
  </ul>
  
  <p>I've seen that it can be done with multiple Channel : we begin by init a System object with several channels and then, we can play several music : for each one, we call System::createSound and then System::playSound. We also need to update with System::update.</p>
  
  <ul>
  <li>Save a sound</li>
  </ul>
  
  <p>It's the same way that playing a song : System::playSound.
  We juste have to change output before with System::setOutput(FMOD_OUTPUTTYPE_WAVWRITER).</p>
  
  <ul>
  <li>Save a mix of multiple sounds</li>
  </ul>
  
  <p>I think we juste have to set the correct ouput (wav writer) and then do "Play multiple sounds simultaneously" step described before.</p>
  
  <ul>
  <li>Change volume</li>
  </ul>
  
  <p>It's possible thanks to Channel's method (setVolume).</p>
  
  <p><strong>Questions</strong></p>
  
  <ul>
  <li>Play / Mix multiple sounds</li>
  </ul>
  
  <p>Is that the solution described before is correct ?</p>
  
  <ul>
  <li>Play / Mix multiple sounds : don't start all sounds at the same time</li>
  </ul>
  
  <p>As you can see on this <a href="http://images.digitalmedianet.com/2008/Week_6/4t7y57m8/story/audition%20multitrack.jpg" rel="nofollow">multitracks screen</a>, we can have multiple sounds and they can start at differents times. For example, how can I start playing FILE B six seconds after the begining of FILE A (which also continue to play) ? Is it the function Channel->setDelay ? How it works ? (I'm not sure to understand the DSP clock value...).</p>
  
  <ul>
  <li>Select an extract (start-end point - between XX:XX and YY:YY)</li>
  </ul>
  
  <p>I'm not sure about this point, maybe we can use Channel:setPosition and/or Channel->setDelay ? But, how it works ? (I'm not sure to understand the value of position and the DSP clock value for delay...).</p>
  
  <ul>
  <li>Cut/Copy/Paste</li>
  </ul>
  
  <p>Here, I really don't know how I can do it. </p>
  
  <ul>
  <li>Qt and audio files</li>
  </ul>
  
  <p>Do you agree that I can't use Qt to do all this manipulation ?</p>
  
  <p><strong>Thanks</strong></p>
  
  <p>I hope I'm clear. Don't hesitate if you don't understand a question.</p>