rem: char *wav;
context: read_ogg (char *filename,  AUDIOHDR *audiohdr) {	OggVorbis_File vf;	vorbis_info *vi;	FILE  *fh;	char *wav;	int current_section;	fh = fopen(filename, "rb");	if (fh == NULL) {		fprintf (stderr, "Couldn't find file: %s\n", filename);		return (1);	}	if(ov_open(fh, &vf, NULL, 0) < 0) {		fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n");		return (1);	}	vi=ov_info(&vf,-1);	audiohdr->samp_freq = vi->rate;	audiohdr->channels = vi->channels;	audiohdr->bits_per_sample = 16;	{		const unsigned int extra=10000;		unsigned int numsamples = extra+(unsigned int)ov_pcm_total(&vf,0);		unsigned int numbytes = numsamples*vi->channels*2; // 16bit output wav		char *wavptr;		int eof  = 0;		unsigned long readbytes = 0;		audiohdr->data = new char[numbytes];		wavptr = audiohdr->data;		while(!eof){			long ret=ov_read(&vf,wavptr,numbytes-readbytes,0,2,1,&current_section);			if (ret == 0) {				eof=1;			} else if (ret > 0) {				readbytes += ret;				wavptr += ret;			}		}		audiohdr->data_len = readbytes;	}	ov_clear(&vf);	fclose(fh);	return (0);}