   OGG Function Failing...
  Hey, I''ve been working on an OGG-Player for Win32 using OpenAL. Well, I''ve got everything setup, but when I try to open an OGG file using ''ov_open'', the program freezes until I kill it with task-manager. Everything before that line is logged, and everything is as it should be. I actually followed through a few tutorials and everything I have up to that line is perfect. Here''s an example of the code, with the debugging log removed.bool OGGDATA::OpenOGG(char *Filename, short int BufSize, pSOUNDDATA pSndInf)  {  if(SoundFile != NULL)    CloseOGG();  if((SoundFile = fopen(Filename, "rb")) == NULL)    {    MessageBox(sWinData.ReturnHandle(), "Failed to open the specified file for reading.\0", "File I/O Error\0", MB_OK | MB_ICONEXCLAMATION);    sLog.Write("Error: Failed to open \''%s\'' for reading.", Filename);    return false;    }  if((ov_open(SoundFile, OVFile, NULL, 0)) < 0)    {    MessageBox(sWinData.ReturnHandle(), "The specified file does not appear to be a valid OGG file.\0", "File Format Error\0", MB_OK | MB_ICONEXCLAMATION);    sLog.Write("Error: The file \''%s\'' does not appear to be a valid OGG file.", Filename);    CloseOGG();    return false;    }  if((SoundBuffer = (char*)malloc(BufSize)) == NULL)    {    MessageBox(sWinData.ReturnHandle(), "Could not allocate any memory for the sound buffer.\0", "Memory Allocation Error\0", MB_OK | MB_ICONEXCLAMATION);    sLog.Write("Error: Could not create a sound buffer %i bytes in size.", BufSize);    CloseOGG();    return false;    }  pOVInfo = ov_info(OVFile, -1);  pSndInf->Frequency = pOVInfo->rate;  if(pOVInfo->channels == 1)    pSndInf->Format = AL_FORMAT_MONO16;  else    pSndInf->Format = AL_FORMAT_STEREO16;  Initialized = true;  CurrentStream = 0;  return true;  }  Can anybody see what is wrong there? My ''OVFile'' member is a pointer to an ''OggVorbis_File'' and ''SoundFile'' is a pointer to a good old-fashioned ''FILE''. Any ideas?   -The Great Sephiroth 
  i assume OVFile is a struct of some sort?have you tried zeroing it? ;  You can''t zero a NULL pointer. I am not sure, but if OggVorbis_File is defined the same as FILE, then it''s just an integer. I''ll check it out, but it''s still a pointer assigned by OV. -The Great Sephiroth ;  OggVorbis_File is NOT defined as FILE. in my ogg player, its not a pointer. try changing the runtime libraries, and the libs you link with with ogg vorbis. i''ve had a lot of instability with openal or ogg, i like to avoid touching the ogg/openal code because it has a bad habit of hanging with the slightest changes. ;  Yeah, well try porting DirectX to Mac and Linux. My engine already runs on all three platforms thanks to OpenGL, OpenAL, and soon, OGG. I also despise the two outdated "pay to use" formats, MP3 and WMA. OGG supports so much more, compresses smaller, and sounds better. Why stick with the old? Besides, look at the powerful Unreal Engine. It is setup the way mine is, but it naturally supports DX as well. -The Great Sephiroth 