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