|
DSF2FLAC
|
This class extends dsdSampleReader providing acces to dsd samples and other info from dsf files. More...
#include <dsf_file_reader.h>
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. | |
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
| 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.
| dsfFileReader::~dsfFileReader | ( | ) | [virtual] |
Class destructor.
Closes the file and frees the internal buffers.
| 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.
1.7.6.1