I write a program for learning english and I want to record sounds and my program didn't work at all I don't know why, this is the code:
#include <SDL.h>
#include <stdio.h>
#include <string>
#include <sstream>
//Recieved audio spec
SDL_AudioSpec gReceivedRecordingSpec;
SDL_AudioSpec gReceivedPlaybackSpec;
//Maximum recording time
const int MAX_RECORDING_SECONDS = 5;
//Maximum recording time plus padding
const int RECORDING_BUFFER_SECONDS = MAX_RECORDING_SECONDS + 1;
//Recording data buffer
Uint8* gRecordingBuffer = NULL;
//Size of data buffer
Uint32 gBufferByteSize = 0;
//Position in data buffer
Uint32 gBufferBytePosition = 0;
//Maximum position in data buffer for recording
Uint32 gBufferByteMaxPosition = 0 …