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.
6 #ifndef AUDIO_FORMAT_CONVERTER_H
7 #define AUDIO_FORMAT_CONVERTER_H
10 /*! This AudioReader just converts the source sample format (and byte order)
11 into another one, e.g. LE short -> BE float. Frame rate and channel
12 count remain unchanged.
16 #include "AudioReader.h"
19 class AudioFormatConverter
: public AudioReader
{
21 AudioFormatConverter(AudioReader
* source
,
22 uint32 format
, uint32 byte_order
);
23 virtual ~AudioFormatConverter();
25 virtual bigtime_t
InitialLatency() const;
26 virtual status_t
Read(void* buffer
, int64 pos
, int64 frames
);
28 virtual status_t
InitCheck() const;
30 AudioReader
* Source() const;
36 #endif // AUDIO_FORMAT_CONVERTER_H