Add fix convert and downmix audio providers.

Originally committed to SVN as r5302.
This commit is contained in:
Amar Takhar 2011-02-06 03:09:59 +00:00
parent e55ad2ed4d
commit f16fb6bb5f
5 changed files with 28 additions and 6 deletions

View File

@ -25,6 +25,8 @@ endif
SRC = \ SRC = \
common/video_frame.cpp \ common/video_frame.cpp \
audio/downmix.cpp \
audio/convert.cpp \
$(SRC_OPT) $(SRC_OPT)
HEADERS = \ HEADERS = \

View File

@ -37,10 +37,12 @@
#include "config.h" #include "config.h"
#include "aegisub_endian.h" #include "aegisub_endian.h"
#include "audio_provider_convert.h" #include "convert.h"
#include "audio_provider_downmix.h" #include "downmix.h"
namespace media {
/// @brief Constructor /// @brief Constructor
/// @param src /// @param src
/// ///
@ -218,3 +220,6 @@ AudioProvider *CreateConvertAudioProvider(AudioProvider *source_provider) {
return provider; return provider;
} }
} // namespace

View File

@ -34,12 +34,14 @@
/// @ingroup audio_input /// @ingroup audio_input
/// ///
#include "include/aegisub/audio_provider.h" #include "libmedia/audio.h"
#ifndef AGI_PRE #ifndef AGI_PRE
#include <tr1/memory> #include <tr1/memory>
#endif #endif
namespace media {
/// DOCME /// DOCME
/// @class ConvertAudioProvider /// @class ConvertAudioProvider
/// @brief DOCME /// @brief DOCME
@ -64,7 +66,10 @@ public:
void GetAudio(void *buf, int64_t start, int64_t count) const; void GetAudio(void *buf, int64_t start, int64_t count) const;
wxString GetFilename() const { return source->GetFilename(); } std::string GetFilename() const { return source->GetFilename(); }
}; };
AudioProvider *CreateConvertAudioProvider(AudioProvider *source_provider); AudioProvider *CreateConvertAudioProvider(AudioProvider *source_provider);
} // namespace

View File

@ -39,9 +39,11 @@
// Headers // Headers
#include "config.h" #include "config.h"
#include "audio_provider_downmix.h" #include "downmix.h"
namespace media {
/// @brief Constructor /// @brief Constructor
/// @param source /// @param source
/// ///
@ -123,3 +125,6 @@ void DownmixingAudioProvider::GetAudio(void *buf, int64_t start, int64_t count)
// Done downmixing, free the work buffer // Done downmixing, free the work buffer
delete[] tmp; delete[] tmp;
} }
} // namespace

View File

@ -34,12 +34,14 @@
/// @ingroup audio_input /// @ingroup audio_input
/// ///
#include "include/aegisub/audio_provider.h" #include "libmedia/audio.h"
#ifndef AGI_PRE #ifndef AGI_PRE
#include <tr1/memory> #include <tr1/memory>
#endif #endif
namespace media {
/// DOCME /// DOCME
/// @class DownmixingAudioProvider /// @class DownmixingAudioProvider
/// @brief DOCME /// @brief DOCME
@ -59,3 +61,6 @@ public:
void GetAudio(void *buf, int64_t start, int64_t count) const; void GetAudio(void *buf, int64_t start, int64_t count) const;
}; };
} // namespace