DSF2FLAC
Public Member Functions | Private Member Functions | Static Private Member Functions
dsfFileReader Class Reference

This class extends dsdSampleReader providing acces to dsd samples and other info from dsf files. More...

#include <dsf_file_reader.h>

Inheritance diagram for dsfFileReader:
DsdSampleReader

List of all members.

Public Member Functions

 dsfFileReader (char *filePath)
 Class constructor.
virtual ~dsfFileReader ()
 Class destructor.
bool step ()
 Step the reader forward by 8 DSD samples.
void rewind ()
 Set the reader position back to the start of the DSD data.
dsf2flac_int64 getLength ()
 Returns the total number of DSD samples in the reader.
dsf2flac_uint32 getNumChannels ()
 Returns the number of channels in the reader.
dsf2flac_uint32 getSamplingFreq ()
 Returns the DSD sampling rate of this reader (Hz).
bool msbIsPlayedFirst ()
 Describes the order that the samples are packed into the int8 buffer entries.
bool samplesAvailable ()
 Returns false if there are no more samples left in the reader.
ID3_Tag getID3Tag (dsf2flac_uint32 trackNum)
 Return the ID3 tag corresponding to the provided track number.
void dispFileInfo ()
 Can be called to display some useful info to stdout.

Private Member Functions

void allocateBlockBuffer ()
 Allocates the block buffer which holds the dsd data read from the file for when it is required by the circular buffer.
bool readHeaders ()
 Reads lots of info from the file.
void readMetadata ()
 Attempts to read the metadata from the end of the dsf file.
bool readNextBlock ()
 This private function is called whenever new data from the file is needed for the block buffer.

Static Private Member Functions

static bool checkIdent (dsf2flac_int8 *a, dsf2flac_int8 *b)
 A handy little helper for checking idents.

Detailed Description

This class extends dsdSampleReader providing acces to dsd samples and other info from dsf files.

Some of the rarer features of dsf are not well tested due to a lack of files: 8bit dsd


Constructor & Destructor Documentation

dsfFileReader::dsfFileReader ( char *  filePath)

Class constructor.

filePath must be a valid dsf file location. If there is an issue reading or loading the file then isValid() will be false.

Class destructor.

Closes the file and frees the internal buffers.


Member Function Documentation

void dsfFileReader::rewind ( ) [virtual]

Set the reader position back to the start of the DSD data.

Note that child classes implementing this method must call clearBuffer();

Reimplemented from DsdSampleReader.

bool dsfFileReader::step ( ) [virtual]

Step the reader forward by 8 DSD samples.

This causes the next 8 DSD samples to be added into the front of the circular buffers (one uint8).

Reimplemented from DsdSampleReader.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables