I’ve been farting about with C++ for some time now, I have a fair understanding.
I’ve tried QT, JUCE etc. all tied up in licencing that I don’t understand. I’m using latest VS now.
I would like to build an Audio Application, that records audio from an Interface, and plays it back, I don’t want to say ‘DAW’, but a very very limited ‘DAW’ might be appropriate…
Is it possible in SDL? I’ve searched obviously, and watched one or two videos eek! There doesn’t seem to be any good books or Tuts on the Subject of Audio in SDL. Could anyone point me in the right direction if so? Cheers.
Certainly, it’s even possible in ‘core’ SDL 2.0, i.e. without SDL_mixer. To record audio you first need to find out what capture devices are available, which you can do with SDL_GetNumAudioDevices() and SDL_GetAudioDeviceName(). Having selected your capture source you open it with SDL_OpenAudioDevice() and unpause it with SDL_PauseAudioDevice(). The actual audio capture (to memory, and typically then saved to file) is done with SDL_DequeueAudio().
The supported audio formats are listed here, 32-bit integer samples are included (e.g. AUDIO_S32LSB) but not 24-bits. However it tells you how to construct the corresponding SDL_AudioFormat value so it may possibly work if the hardware supports it. Trying it would be the only way to be sure.