Audacity 3.2.0
|
MultiFormatReader reads raw audio files in different formats and machine endianness representations. More...
#include <MultiFormatReader.h>
Public Types | |
enum | FormatT { Int8 = 0 , Int16 , Int32 , Uint8 , Uint16 , Uint32 , Float , Double } |
Public Member Functions | |
MultiFormatReader (const char *filename) | |
~MultiFormatReader () | |
void | Reset () |
size_t | ReadSamples (void *buffer, size_t len, MultiFormatReader::FormatT format, MachineEndianness::EndiannessT end) |
size_t | ReadSamples (void *buffer, size_t len, size_t stride, MultiFormatReader::FormatT format, MachineEndianness::EndiannessT end) |
Private Member Functions | |
size_t | Read (void *buffer, size_t size, size_t len, size_t stride) |
void | SwapBytes (void *buffer, size_t size, size_t len) |
Private Attributes | |
FILE * | mpFid |
MachineEndianness | mEnd |
uint8_t | mSwapBuffer [8] |
MultiFormatReader reads raw audio files in different formats and machine endianness representations.
Definition at line 49 of file MultiFormatReader.h.
MultiFormatReader::MultiFormatReader | ( | const char * | filename | ) |
Definition at line 39 of file MultiFormatReader.cpp.
References mpFid.
MultiFormatReader::~MultiFormatReader | ( | ) |
Definition at line 50 of file MultiFormatReader.cpp.
References mpFid.
|
private |
Definition at line 109 of file MultiFormatReader.cpp.
Referenced by ReadSamples().
size_t MultiFormatReader::ReadSamples | ( | void * | buffer, |
size_t | len, | ||
MultiFormatReader::FormatT | format, | ||
MachineEndianness::EndiannessT | end | ||
) |
Definition at line 66 of file MultiFormatReader.cpp.
References details::end(), anonymous_namespace{ExportPCM.cpp}::format, and ReadSamples().
Referenced by ReadSamples(), and FormatClassifier::ReadSignal().
size_t MultiFormatReader::ReadSamples | ( | void * | buffer, |
size_t | len, | ||
size_t | stride, | ||
MultiFormatReader::FormatT | format, | ||
MachineEndianness::EndiannessT | end | ||
) |
Definition at line 74 of file MultiFormatReader.cpp.
References Double, details::end(), Float, anonymous_namespace{ExportPCM.cpp}::format, Int16, Int32, Int8, mEnd, Read(), SwapBytes(), Uint16, Uint32, Uint8, and MachineEndianness::Which().
void MultiFormatReader::Reset | ( | ) |
Definition at line 58 of file MultiFormatReader.cpp.
References mpFid.
Referenced by FormatClassifier::ReadSignal().
|
private |
Definition at line 135 of file MultiFormatReader.cpp.
References mSwapBuffer, and size.
Referenced by ReadSamples().
|
private |
Definition at line 52 of file MultiFormatReader.h.
Referenced by ReadSamples().
|
private |
Definition at line 51 of file MultiFormatReader.h.
Referenced by MultiFormatReader(), Read(), Reset(), and ~MultiFormatReader().
|
private |
Definition at line 53 of file MultiFormatReader.h.
Referenced by SwapBytes().