From d2e7b6e59c2dcbbc152526bc67d4452b1a1372b0 Mon Sep 17 00:00:00 2001 From: ikework Date: Thu, 13 Sep 2007 17:41:02 +0000 Subject: [PATCH] on windows we have to use ov_open_callbacks instead of ov_open .. passing clients callbacks for fread, fclose .. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1240 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/music_ogg.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/music_ogg.cpp b/src/music_ogg.cpp index c99d42c41..186a65aee 100644 --- a/src/music_ogg.cpp +++ b/src/music_ogg.cpp @@ -69,7 +69,11 @@ bool MusicOggStream::load(const char* filename) } oggFile = fopen(m_fileName.c_str(), "rb"); +#if defined( WIN32 ) || defined( WIN64 ) + if( ov_open_callbacks((void *)oggFile, &m_oggStream, NULL, 0, OV_CALLBACKS_DEFAULT) < 0) +#else if (ov_open(oggFile, &m_oggStream, NULL, 0) < 0) +#endif { fclose(oggFile); printf("Loading Music: %s failed\n", m_fileName.c_str());