this it is the first time that I program with ogg libraries (I am a beginner).
it has happened me an error, the code is the following one:
/*********************************************/
OggVorbis_File *musica=NULL;
FILE *archiv =NULL;
archiv = fopen("prueba.ogg","r");
if(archiv==NULL)
exit(0);
int falla = ov_open(archiv,musica,NULL,0);//aca se produce el error
/*********************************************************************/
this is a messaje of windows (win98SE):
unhandled exception in intento.exe (KERNEL32.dll):0xC0000005: Access Violation
this is a messaje of MSVC(MSVC6.0):
Loaded 'C:\intento\Debug\vorbis.dll', no matching symbolic information
found.
Loaded 'C:\WINDOWS\SYSTEM\KERNEL32.DLL', no matching symbolic
information found.
Loaded 'C:\intento\Debug\ogg.dll', no matching symbolic information
found.
Loaded 'C:\intento\Debug\vorbisfile.dll', no matching symbolic
information found.
First-chance exception in intento.exe (KERNEL32.DLL): 0xC0000005: Access
Violation.
The program 'C:\intento\Debug\intento.exe' has exited with code 0 (0x0).
I hope they can help me to solve this error.
goodbye and thanking ahead of time.
Masa, Chile.
On Sat, Nov 27, 2004 at 01:37:31PM -0700, apoyomutuo@spymac.com wrote:> this it is the first time that I program with ogg libraries (I am a beginner). > it has happened me an error, the code is the following one: > /*********************************************/ > OggVorbis_File *musica=NULL; > FILE *archiv =NULL; > > archiv = fopen("prueba.ogg","r"); > if(archiv==NULL) > exit(0); > int falla = ov_open(archiv,musica,NULL,0);//aca se produce el error > /*********************************************************************/Two things I notice that are wrong: Ogg Vorbis is a binary format, so you should call fopen() with "rb" on windows. You are also passing a NULL value for musica, but this is where ov_open() expects to store its decoder context. You must allocate a structure and and pass its address instead of NULL. This is likely the origin of the access violation. Hope that helps, -r