19 #ifndef _AUDIO_CONVERTER_H_
20 #define _AUDIO_CONVERTER_H_
24 #include "audio_capture_manager.h"
29 virtual int write_data(
const char * ptr,
unsigned int size) = 0;
41 DOWNMIX_AND_DOWNSAMPLE,
42 UNSUPPORTED_CONVERSION,
53 int process_conversion_params();
54 int downsample_and_downmix(
const std::list<audio_buffer *> &queue,
int size);
55 int passthrough(
const std::list<audio_buffer *> &queue,
int size);
58 conversion_ops_t m_op;
63 virtual int convert(
const std::list<audio_buffer *> &queue,
unsigned int size);
65 int downmix(
const std::list<audio_buffer *> &queue,
int size);
71 std::ofstream &m_file;
72 virtual int write_data(
const char * ptr,
unsigned int size)
override;
85 unsigned int m_write_offset;
90 virtual int write_data(
const char * ptr,
unsigned int size)
override;
91 inline char * get_buffer() {
return m_buffer; }
92 inline unsigned int get_size() {
return m_write_offset; }
96 friend int audio_converter::downmix(
const std::list<audio_buffer *> &queue,
int size);
99 #endif //_AUDIO_CONVERTER_H_