1/* 2 * Copyright 2008 Stephan A��mus <superstippi@gmx.de> 3 * All rights reserved. Distributed under the terms of the MIT licensce. 4 */ 5#ifndef AUDIO_CHANNEL_CONVERTER_H 6#define AUDIO_CHANNEL_CONVERTER_H 7 8 9/*! This AudioReader just converts the source channel count 10 into another one, e.g. 1 -> 2. Frame rate and sample format 11 remain unchanged. 12*/ 13 14 15#include "AudioReader.h" 16 17 18class AudioChannelConverter : public AudioReader { 19public: 20 AudioChannelConverter(AudioReader* source, 21 const media_format& format); 22 virtual ~AudioChannelConverter(); 23 24 virtual bigtime_t InitialLatency() const; 25 virtual status_t Read(void* buffer, int64 pos, int64 frames); 26 27 virtual status_t InitCheck() const; 28 29 AudioReader* Source() const; 30 31protected: 32 AudioReader* fSource; 33}; 34 35#endif // AUDIO_CHANNEL_CONVERTER_H 36