According to comments of my previous question, I was too broad. So, I'll try to ask specifics questions.
Context
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.
What I've found
Don't hesitate to correct me if a point is wrong.
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, ...).
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.
Then, I've read documentation included with the installation and I've found some answers... and some questions.
- Record from microphone
It's possible with System::recordStart and some other methods.
- Play song on speakers
It's possible and it's the default ouput : System::playSound.
- Play multiple sounds simultaneously
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.
- Save a sound
It's the same way that playing a song : System::playSound. We juste have to change output before with System::setOutput(FMOD_OUTPUTTYPE_WAVWRITER).
- Save a mix of multiple sounds
I think we juste have to set the correct ouput (wav writer) and then do "Play multiple sounds simultaneously" step described before.
- Change volume
It's possible thanks to Channel's method (setVolume).
Questions
- Play / Mix multiple sounds
Is that the solution described before is correct ?
- Play / Mix multiple sounds : don't start all sounds at the same time
As you can see on this multitracks screen, 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...).
- Select an extract (start-end point - between XX:XX and YY:YY)
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...).
- Cut/Copy/Paste
Here, I really don't know how I can do it.
- Qt and audio files
Do you agree that I can't use Qt to do all this manipulation ?
Thanks
I hope I'm clear. Don't hesitate if you don't understand a question.