I'm really new to c+ (this is day two) and I'm trying to write a program that will allow me to write audio data from a wave file into two arrays for the left channel and the right channel, i've pieced together this code so far and its definitely grabbing something from the wave file however i've no idea if its writing out left or right data or even a combination of the two.
any ideas what I could be doing wrong?
thanks
domm
int ReadWave::waveFileToArray(){
//sndfile obj + soundfile info object
SNDFILE *sf;
SF_INFO info;
int num;
int num_items;
int numFrames;
int sampleRate;
int channels;
int i;
int j;
FILE *out;
SNDFILE *outWave;
// open the wave
info.format = 0;
sf = sf_open(filePath, SFM_READ,&info);
if (sf == NULL)
{
printf("Failed to open the file.\n");
exit(-1);
}