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 = \
common/video_frame.cpp \
audio/downmix.cpp \
audio/convert.cpp \
$(SRC_OPT)
HEADERS = \

View File

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

View File

@ -34,12 +34,14 @@
/// @ingroup audio_input
///
#include "include/aegisub/audio_provider.h"
#include "libmedia/audio.h"
#ifndef AGI_PRE
#include <tr1/memory>
#endif
namespace media {
/// DOCME
/// @class ConvertAudioProvider
/// @brief DOCME
@ -64,7 +66,10 @@ public:
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);
} // namespace

View File

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

View File

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