deBaseSoundModule Class Reference

Base Sound Module. More...

#include <deBaseSoundModule.h>

Inheritance diagram for deBaseSoundModule:
deBaseModule

List of all members.

Public Member Functions

Constructors and Destructors
 deBaseSoundModule (deLoadableModule *loadableModule)
 Creates a new module.
virtual ~deBaseSoundModule ()
 Cleans up the module.
Management
virtual deBaseSoundInfoInitLoadSound (decBaseFileReader *file)=0
 Do a quick check if the given file can be loaded by this sound module.
virtual void LoadSound (decBaseFileReader *file, deSound *sound, deBaseSoundInfo *infos)=0
 Load the sound into the provided storage.
virtual void SaveSound (decBaseFileWriter *file, deSound *sound)=0
 Save the sound in the provided storage into file.
virtual deBaseSoundDecoderCreateDecoder (decBaseFileReader *file)=0
 Creates a sound decoder object for the given file.

Detailed Description

Base Sound Module.

Sound modules allow to load and save sounds.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

deBaseSoundModule::deBaseSoundModule ( deLoadableModule loadableModule )

Creates a new module.

virtual deBaseSoundModule::~deBaseSoundModule (  ) [virtual]

Cleans up the module.


Member Function Documentation

virtual deBaseSoundDecoder* deBaseSoundModule::CreateDecoder ( decBaseFileReader file ) [pure virtual]

Creates a sound decoder object for the given file.

virtual deBaseSoundInfo* deBaseSoundModule::InitLoadSound ( decBaseFileReader file ) [pure virtual]

Do a quick check if the given file can be loaded by this sound module.

This is usually a header check and is used to detect with what sound module a file could be possibly loaded if it does not match any patterns. If the sound can be loaded store the necessary informations into an SoundInfo object and return it. Otherwise return NULL. The returned SoundInfo object is used to create the sound and as parameter to LoadSound. You can be sure that the file pointer is located at the beginning of the file.

virtual void deBaseSoundModule::LoadSound ( decBaseFileReader file,
deSound sound,
deBaseSoundInfo infos 
) [pure virtual]

Load the sound into the provided storage.

You can be sure that the file pointer is at the same place left off after the prior call of CheckLoadSound on the same file and module. You can be sure that the sound object specified in the function call has been created with the information stored in the infos parameter obtained from a prior call to the CheckLoadSound function.

virtual void deBaseSoundModule::SaveSound ( decBaseFileWriter file,
deSound sound 
) [pure virtual]

Save the sound in the provided storage into file.

You can be sure that the file provided has been rewinded prior to this function call.


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