|
VRS
A file format for sensor data.
|
Specification of an audio content block. More...
#include <RecordFormat.h>
Public Member Functions | |
| AudioContentBlockSpec (const AudioContentBlockSpec &)=default | |
| Default copy constructor. | |
| AudioContentBlockSpec (AudioContentBlockSpec &&) noexcept=default | |
| AudioContentBlockSpec (AudioFormat audioFormat, uint8_t channelCount=0) | |
| For audio formats with encoding (mp3, flac, etc). | |
| AudioContentBlockSpec (AudioFormat audioFormat, AudioSampleFormat sampleFormat, uint8_t channelCount=0, uint8_t sampleFrameStride=0, uint32_t sampleFrameRate=0, uint32_t sampleFrameCount=0, uint8_t stereoPairCount=0) | |
| AudioContentBlockSpec (const string &formatStr) | |
| void | set (ContentParser &parser) |
| void | clear () |
| Clear/reset object to default values. | |
| AudioContentBlockSpec & | operator= (const AudioContentBlockSpec &)=default |
| AudioContentBlockSpec & | operator= (AudioContentBlockSpec &&) noexcept=default |
| bool | operator== (const AudioContentBlockSpec &rhs) const |
| bool | operator!= (const AudioContentBlockSpec &rhs) const |
| string | asString () const |
| size_t | getBlockSize () const |
| Get the number of bytes for this content block, or ContentBlock::kSizeUnknown. | |
| size_t | getPcmBlockSize () const |
| Assuming PCM, get the number of bytes for this content block, or ContentBlock::kSizeUnknown. | |
| bool | isCompatibleWith (const AudioContentBlockSpec &rhs) const |
| Tell if two audio block have identical audio formats. | |
| AudioFormat | getAudioFormat () const |
| Get audio format. | |
| AudioSampleFormat | getSampleFormat () const |
| Get audio sample format. | |
| string | getSampleFormatAsString () const |
| Get audio sample format as a string. | |
| bool | isLittleEndian () const |
| Tell if the audio sample format is little endian. | |
| bool | isIEEEFloat () const |
| Tell if the audio sample format is an IEEE float. | |
| uint8_t | getBitsPerSample () const |
| Get the number of bits per audio sample. | |
| uint8_t | getBytesPerSample () const |
| Get the number of bytes per audio sample. | |
| uint8_t | getSampleFrameStride () const |
| Number of bytes used by a group of synchronous audio samples, including padding. | |
| uint8_t | getChannelCount () const |
| Get the number of audio channels in each sample frame (not in the content block). | |
| uint32_t | getSampleRate () const |
| Get the audio frame sample rate. | |
| uint32_t | getSampleCount () const |
| Get the number of audio sample frames in the content block. | |
| void | setSampleCount (uint32_t sampleCount) |
| Set the number of audio sample frames in the content block. | |
| uint8_t | getStereoPairCount () const |
| bool | isSampleBlockFormatDefined () const |
Static Public Member Functions | |
| static bool | isLittleEndian (AudioSampleFormat sampleFormat) |
| Tell if a specific audio sample format is little endian. | |
| static bool | isIEEEFloat (AudioSampleFormat sampleFormat) |
| Tell if a specific audio sample format is an IEEE float. | |
| static uint8_t | getBitsPerSample (AudioSampleFormat sampleFormat) |
| Get the number of bits per audio sample for a specific audio sample format. | |
| static uint8_t | getBytesPerSample (AudioSampleFormat sampleFormat) |
| Get the number of bytes per audio sample for a specific audio sample format. | |
| static string | getSampleFormatAsString (AudioSampleFormat sampleFormat) |
| Get an audio sample format as a string. | |
Specification of an audio content block.
|
explicit |
Constructor used for factory construction.
| string vrs::AudioContentBlockSpec::asString | ( | ) | const |
Convert to string, to store on disk & reconstruct later using factory constructor.
| bool vrs::AudioContentBlockSpec::isSampleBlockFormatDefined | ( | ) | const |
Tell if the audio sample format is fully defined. For instance, PCM audio data when we have enough details: sample format & channel count.
| void vrs::AudioContentBlockSpec::set | ( | ContentParser & | parser | ) |
when constructing from a string.