Om
1.0.0
A universal framework for multimedia simulation
|
An enum wrapper class that specifies the type of a sample of audio data. More...
#include <omSoundSampleType.h>
Public Types | |
enum | Enum { SAMPLE_8, SAMPLE_16, SAMPLE_24, SAMPLE_32, SAMPLE_64, SAMPLE_32F, SAMPLE_64F, UNDEFINED } |
The underlying enum type that specifies the type of a sample of audio data. More... | |
Public Member Functions | |
SampleType () | |
Create a new sample type with the undefined sample type enum value. More... | |
SampleType (Enum newType) | |
Create a new sample type with the specified sample type enum value. More... | |
operator Enum () const | |
Convert this sample type to an enum value. More... | |
Size | getSizeInBytes () const |
Get the size in bytes that this sample type occupies. More... | |
Bool | isIntegral () const |
Return whether or not this sample type is an integer-based sample type. More... | |
Bool | isFloatingPoint () const |
Return whether or not this sample type is a floating-point-based sample type. More... | |
data::String | toString () const |
Return a string representation of the sample type. More... | |
operator data::String () const | |
Convert this sample type into a string representation. More... | |
An enum wrapper class that specifies the type of a sample of audio data.
In addition to providing conversion operator to and from the underlying enum type, the class also provides a way to query the size in bytes of a given sample type, avoiding the need for an external switch statement.
The underlying enum type that specifies the type of a sample of audio data.
|
inline |
Create a new sample type with the undefined sample type enum value.
|
inline |
Create a new sample type with the specified sample type enum value.
|
inline |
Convert this sample type to an enum value.
This operator is provided so that the SampleType object can be used directly in a switch statement without the need to explicitly access the underlying enum value.
|
inline |
Get the size in bytes that this sample type occupies.
|
inline |
Return whether or not this sample type is an integer-based sample type.
|
inline |
Return whether or not this sample type is a floating-point-based sample type.
data::String om::sound::base::SampleType::toString | ( | ) | const |
Return a string representation of the sample type.
|
inline |
Convert this sample type into a string representation.