diff --git a/aegisub/libmedia/audio/ffms_audio.cpp b/aegisub/libmedia/audio/ffms_audio.cpp index 8bf9ed984..c1eb0e7f7 100644 --- a/aegisub/libmedia/audio/ffms_audio.cpp +++ b/aegisub/libmedia/audio/ffms_audio.cpp @@ -35,7 +35,7 @@ namespace media { /// @brief Constructor /// @param filename /// -Audio::Audio(std::string filename) +FFmpegSourceAudioProvider::FFmpegSourceAudioProvider(std::string filename) : AudioSource(NULL) , COMInited(false) { @@ -72,7 +72,7 @@ Audio::Audio(std::string filename) /// @brief Load audio file /// @param filename /// -void Audio::LoadAudio(std::string filename) { +void FFmpegSourceAudioProvider::LoadAudio(std::string filename) { // wxString FileNameShort = wxFileName(filename).GetShortPath(); FFMS_Indexer *Indexer = FFMS_CreateIndexer(filename.c_str(), &ErrInfo); @@ -195,13 +195,13 @@ void Audio::LoadAudio(std::string filename) { /// @brief Destructor /// -Audio::~Audio() { +FFmpegSourceAudioProvider::~FFmpegSourceAudioProvider() { Close(); } /// @brief Clean up /// -void Audio::Close() { +void FFmpegSourceAudioProvider::Close() { if (AudioSource) FFMS_DestroyAudioSource(AudioSource); #ifdef WIN32 if (COMInited) @@ -214,7 +214,7 @@ void Audio::Close() { /// @param Start /// @param Count /// -void Audio::GetAudio(void *Buf, int64_t Start, int64_t Count) const { +void FFmpegSourceAudioProvider::GetAudio(void *Buf, int64_t Start, int64_t Count) const { if (FFMS_GetAudio(AudioSource, Buf, Start, Count, &ErrInfo)) { throw AudioDecodeError(std::string("Failed to get audio samples: ") + ErrInfo.Buffer); } diff --git a/aegisub/libmedia/audio/ffms_audio.h b/aegisub/libmedia/audio/ffms_audio.h index b971b2e97..fa34d29ea 100644 --- a/aegisub/libmedia/audio/ffms_audio.h +++ b/aegisub/libmedia/audio/ffms_audio.h @@ -35,7 +35,7 @@ namespace media { /// @class Audio /// Audio file support. -class Audio : public AudioProvider, FFmpegSourceProvider { +class FFmpegSourceAudioProvider : public AudioProvider, FFmpegSourceProvider { FFMS_AudioSource *AudioSource; ///< audio source object bool COMInited; ///< COM initialization state @@ -45,8 +45,9 @@ class Audio : public AudioProvider, FFmpegSourceProvider { void Close(); void LoadAudio(std::string filename); - Audio(std::string filename); - virtual ~Audio(); +public: + FFmpegSourceAudioProvider(std::string filename); + virtual ~FFmpegSourceAudioProvider(); /// @brief Checks sample endianness /// @return Returns true.