Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Protected Member Functions | List of all members
om::sound::io::SoundTranscoder Class Referenceabstract

A class that provides the interface for objects that encode and decode sound data. More...

#include <omSoundTranscoder.h>

Inheritance diagram for om::sound::io::SoundTranscoder:
om::resources::ResourceTypeTranscoder< DataType > om::resources::ResourceTranscoder om::sound::io::AIFFTranscoder om::sound::io::FLACTranscoder om::sound::io::OggTranscoder om::sound::io::WaveTranscoder

Public Member Functions

virtual SoundFormat getSoundFormat () const =0
 Return an object that represents the sound format that this transcoder can encode and decode. More...
 
virtual Bool encode (const ResourceID &identifier, const Sound &sound, const ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0))
 Save the specified sound resource at the specified ID location. More...
 
virtual Bool encode (DataOutputStream &stream, const Sound &sound)=0
 Encode a sound to the specified output stream. More...
 
virtual Sounddecode (ResourceID &identifier, ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0))
 Load the sound pointed to by the specified identifier. More...
 
virtual Bool decode (DataInputStream &stream, Sound &sound)=0
 Decode a sound from the specified output stream. More...
 
virtual Bool decode (const Shared< DataInputStream > &stream, Sound &sound)=0
 Decode a sound from the specified persistent output stream. More...
 
- Public Member Functions inherited from om::resources::ResourceTypeTranscoder< DataType >
virtual const ResourceTypegetResourceType () const
 Return an object that represents the resource type that this transcoder can read and write. More...
 
virtual Bool canEncode (const DataType &resource) const =0
 Return whether or not this transcoder is able to encode the specified resource. More...
 
virtual Bool encode (const ResourceID &identifier, const DataType &resource, const ResourceSet *resourceSet=((void *) 0), ResourceManager *manager=((void *) 0))=0
 Save the specified resource object at the specified ID location. More...
 
- Public Member Functions inherited from om::resources::ResourceTranscoder
virtual ~ResourceTranscoder ()
 Destroy a resource transcoder and release all of its resources. More...
 
virtual const ResourceFormatgetResourceFormat () const =0
 Return an object that represents the resource format that this transcoder can read and write. More...
 
virtual Bool canDecode (const ResourceID &identifier) const =0
 Return whether or not the specified identifier refers to a valid resource for this transcoder. More...
 

Static Protected Member Functions

static Bool encodeToStream (const Sound &sound, SoundOutputStream &encoder)
 Encode a sound to the given sound output stream. More...
 
static Bool decodeFromStream (Sound &sound, SoundInputStream &decoder)
 Decode a sound from the given sound output stream. More...
 

Detailed Description

A class that provides the interface for objects that encode and decode sound data.

Member Function Documentation

virtual SoundFormat om::sound::io::SoundTranscoder::getSoundFormat ( ) const
pure virtual

Return an object that represents the sound format that this transcoder can encode and decode.

Implemented in om::sound::io::AIFFTranscoder, om::sound::io::FLACTranscoder, om::sound::io::OggTranscoder, and om::sound::io::WaveTranscoder.

virtual Bool om::sound::io::SoundTranscoder::encode ( const ResourceID identifier,
const Sound sound,
const ResourceSet resourceSet = ((void *) 0),
ResourceManager manager = ((void *) 0) 
)
virtual

Save the specified sound resource at the specified ID location.

virtual Bool om::sound::io::SoundTranscoder::encode ( DataOutputStream stream,
const Sound sound 
)
pure virtual
virtual Sound* om::sound::io::SoundTranscoder::decode ( ResourceID identifier,
ResourceSet resourceSet = ((void *) 0),
ResourceManager manager = ((void *) 0) 
)
virtual

Load the sound pointed to by the specified identifier.

Implements om::resources::ResourceTypeTranscoder< DataType >.

virtual Bool om::sound::io::SoundTranscoder::decode ( DataInputStream stream,
Sound sound 
)
pure virtual

Decode a sound from the specified output stream.

Implemented in om::sound::io::AIFFTranscoder, om::sound::io::FLACTranscoder, om::sound::io::OggTranscoder, and om::sound::io::WaveTranscoder.

virtual Bool om::sound::io::SoundTranscoder::decode ( const Shared< DataInputStream > &  stream,
Sound sound 
)
pure virtual

Decode a sound from the specified persistent output stream.

Implemented in om::sound::io::AIFFTranscoder, om::sound::io::FLACTranscoder, om::sound::io::OggTranscoder, and om::sound::io::WaveTranscoder.

static Bool om::sound::io::SoundTranscoder::encodeToStream ( const Sound sound,
SoundOutputStream encoder 
)
staticprotected

Encode a sound to the given sound output stream.

static Bool om::sound::io::SoundTranscoder::decodeFromStream ( Sound sound,
SoundInputStream decoder 
)
staticprotected

Decode a sound from the given sound output stream.


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