- //soundFile = Sound_NewSampleFromFile(soundFile::getPath(getName()).c_str(),
- //0, BUFFER_SIZE);
- soundFile = fopen(Sound::getPath(getName()).c_str(), "rb");
-
- if (!soundFile)
- {
- logWarning("error while loading sound %s", getName().c_str());
- throw Exception(Exception::FILE_NOT_FOUND);
- }
-
- int result = ov_open(soundFile, &oggStream, NULL, 0);
+ std::string filePath = Sound::getPath(getName());
+ int result = ov_fopen((char*)filePath.c_str(), &oggStream);