Follow up:
Looking at the code for oggread~, I found that it does the actual opening of the file with
if(ov_open(x->x_file, &x->x_ov, NULL, -1) < 0)
on the ov_open documentation it warns windows programmers not to use ov_open but ov_open_callbacks instead [1] and [2] so I changed that line to the following and I'm getting the message "Bitstream does not contain any Vorbis data". I'm pretty sure my file is a valid ogg file. I created it using audacity and also tried with an ogg file downloaded from
freesound.org.
Any help with this will be very much appreciated
:)
int ret = ov_open_callbacks(x->x_file, &x->x_ov, NULL, -1, OV_CALLBACKS_DEFAULT);
switch(ret){
case OV_EREAD:
post("A read from media returned an error.");
break;
case OV_ENOTVORBIS:
post("Bitstream does not contain any Vorbis data");
break;
case OV_EVERSION:
post("OV_EVERSION - Vorbis version mismatch.");
break;
case OV_EBADHEADER:
post("Invalid Vorbis bitstream header.");
break;
case OV_EFAULT:
post("Internal logic fault; indicates a bug or heap/stack corruption.");
break;
}
if(ret <0)
links:
[1]
http://xiph.org/vorbis/doc/vorbisfile/ov_open_callbacks.html