Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
om::sound::base::SoundFormat Class Reference

An enum class representing the different kinds of sound encoding formats. More...

#include <omSoundFormat.h>

Public Types

enum  Enum {
  UNDEFINED, WAVE, AIFF, OGG,
  MP3, M4A, FLAC, CAF
}
 An enum type representing the different kinds of sound encoding formats. More...
 

Public Member Functions

 SoundFormat ()
 Create an sound format object with an UNDEFINED sound format. More...
 
 SoundFormat (SoundFormat::Enum newFormat)
 Create a sound format object from the specified sound format Enum. More...
 
 SoundFormat (const om::resources::ResourceFormat &newFormat)
 Create a sound format object from the specified resource format. More...
 
 operator Enum () const
 Convert this sound format to an enum value. More...
 
Bool isLossy () const
 Return whether or not this sound format is lossy (loses information). More...
 
UTF8String getExtension () const
 Return the standard file extension used for this sound format. More...
 
String toString () const
 Return a string representation of the sound format. More...
 
 operator String () const
 Convert this sound format into a string representation. More...
 

Static Public Member Functions

static SoundFormat getFormatForExtension (const UTF8String &extension)
 Return a sound format which corresponds to the format with the given extension string. More...
 

Static Public Attributes

static const om::resources::ResourceFormat WAVE_FORMAT
 The resource format for WAVE sound files. More...
 
static const om::resources::ResourceFormat AIFF_FORMAT
 The resource format for AIFF sound files. More...
 
static const om::resources::ResourceFormat OGG_FORMAT
 The resource format for OGG sound files. More...
 
static const om::resources::ResourceFormat MP3_FORMAT
 The resource format for MP3 sound files. More...
 
static const om::resources::ResourceFormat M4A_FORMAT
 The resource format for M4A sound files. More...
 
static const om::resources::ResourceFormat FLAC_FORMAT
 The resource format for FLAC sound files. More...
 
static const om::resources::ResourceFormat CAF_FORMAT
 The resource format for CAF sound files. More...
 

Detailed Description

An enum class representing the different kinds of sound encoding formats.

Member Enumeration Documentation

An enum type representing the different kinds of sound encoding formats.

Enumerator
UNDEFINED 

An undefined sound format.

WAVE 

The WAVE sound format.

AIFF 

The Audio Interchange File Format (AIFF) sound format.

OGG 

The compressed OGG sound format.

MP3 

The compressed MPEG-3 sound format.

M4A 

The MPEG-4 audio-only sound format.

FLAC 

The Free Lossless Audio Codec (FLAC) sound format.

CAF 

The Core Audio Format (CAF) sound format.

Constructor & Destructor Documentation

om::sound::base::SoundFormat::SoundFormat ( )
inline

Create an sound format object with an UNDEFINED sound format.

om::sound::base::SoundFormat::SoundFormat ( SoundFormat::Enum  newFormat)
inline

Create a sound format object from the specified sound format Enum.

om::sound::base::SoundFormat::SoundFormat ( const om::resources::ResourceFormat newFormat)

Create a sound format object from the specified resource format.

Member Function Documentation

om::sound::base::SoundFormat::operator Enum ( ) const
inline

Convert this sound format to an enum value.

Bool om::sound::base::SoundFormat::isLossy ( ) const

Return whether or not this sound format is lossy (loses information).

Lossy formats will suffer from generation loss each time they are re-encoded.

UTF8String om::sound::base::SoundFormat::getExtension ( ) const

Return the standard file extension used for this sound format.

static SoundFormat om::sound::base::SoundFormat::getFormatForExtension ( const UTF8String &  extension)
static

Return a sound format which corresponds to the format with the given extension string.

String om::sound::base::SoundFormat::toString ( ) const

Return a string representation of the sound format.

om::sound::base::SoundFormat::operator String ( ) const
inline

Convert this sound format into a string representation.

Member Data Documentation

const om::resources::ResourceFormat om::sound::base::SoundFormat::WAVE_FORMAT
static

The resource format for WAVE sound files.

const om::resources::ResourceFormat om::sound::base::SoundFormat::AIFF_FORMAT
static

The resource format for AIFF sound files.

const om::resources::ResourceFormat om::sound::base::SoundFormat::OGG_FORMAT
static

The resource format for OGG sound files.

const om::resources::ResourceFormat om::sound::base::SoundFormat::MP3_FORMAT
static

The resource format for MP3 sound files.

const om::resources::ResourceFormat om::sound::base::SoundFormat::M4A_FORMAT
static

The resource format for M4A sound files.

const om::resources::ResourceFormat om::sound::base::SoundFormat::FLAC_FORMAT
static

The resource format for FLAC sound files.

const om::resources::ResourceFormat om::sound::base::SoundFormat::CAF_FORMAT
static

The resource format for CAF sound files.


The documentation for this class was generated from the following file: