diff --git a/apps/openmw/mwsound/audiere_decoder.cpp b/apps/openmw/mwsound/audiere_decoder.cpp index 788d5ae40..3f3e3a62d 100644 --- a/apps/openmw/mwsound/audiere_decoder.cpp +++ b/apps/openmw/mwsound/audiere_decoder.cpp @@ -64,7 +64,8 @@ void Audiere_Decoder::open(const std::string &fname) close(); mSoundFile = audiere::FilePtr(new OgreFile(mResourceMgr.openResource(fname))); - mSoundSource = audiere::OpenSampleSource(file); + mSoundSource = audiere::OpenSampleSource(mSoundFile); + mSoundFileName = fname; int channels, srate; audiere::SampleFormat format; @@ -95,7 +96,7 @@ void Audiere_Decoder::close() std::string Audiere_Decoder::getName() { - return mSoundFile->getName(); + return mSoundFileName; } void Audiere_Decoder::getInfo(int *samplerate, ChannelConfig *chans, SampleType *type) diff --git a/apps/openmw/mwsound/audiere_decoder.hpp b/apps/openmw/mwsound/audiere_decoder.hpp index 91c07ccac..f432c32ec 100644 --- a/apps/openmw/mwsound/audiere_decoder.hpp +++ b/apps/openmw/mwsound/audiere_decoder.hpp @@ -12,6 +12,7 @@ namespace MWSound { class Audiere_Decoder : public Sound_Decoder { + std::string mSoundFileName; audiere::FilePtr mSoundFile; audiere::SampleSourcePtr mSoundSource; int mSampleRate;