Get exception in OS Kernel when try to open a file
I am the author of a freeware game that runs in Windows and I am evaluating Ogg
Vorbis as a sound file format to support in the game engine. I am trying to use
the vorbisfile API to open a .ogg file and decode it to PCM for use as a
DirectSound buffer. Unfortunately I fell at the first hurdle :( When I try to
use ov_open to access a file I have opened, I get an exception in kernel32.dll
The code I'm using in my test prog is:
// oggtest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "vorbis\vorbisfile.h"
int main(int argc, char* argv[])
{
FILE *file;
OggVorbis_File vf;
if ((file = fopen("test.ogg", "rb")) == NULL)
return -1;
if (ov_open(file, &vf, NULL, 0) < 0)
return -1;
ov_clear(&vf);
return 0;
}
I hope you can answer what the problem is or I won't be able to add this
support :/