Drag[en]gine Game Engine  1.0
deBaseSoundModule Class Referenceabstract

Base sound module providing load/save support for sounds. More...

#include <deBaseSoundModule.h>

Inheritance diagram for deBaseSoundModule:
deBaseModule

Public Member Functions

Constructors and Destructors
 deBaseSoundModule (deLoadableModule &loadableModule)
 Create module. More...
 
virtual ~deBaseSoundModule ()
 Clean up module. More...
 
Management
virtual deBaseSoundInfoInitLoadSound (decBaseFileReader &reader)=0
 Quick check if file can be loaded by this module. More...
 
virtual void LoadSound (decBaseFileReader &reader, deSound &sound, deBaseSoundInfo &infos)=0
 Load sound. More...
 
virtual void SaveSound (decBaseFileWriter &writer, const deSound &sound)=0
 Save sound. More...
 
virtual deBaseSoundDecoderCreateDecoder (decBaseFileReader *reader)=0
 Create decoder for reader. More...
 
- Public Member Functions inherited from deBaseModule
 deBaseModule (deLoadableModule &loadableModule)
 Creates a new base module. More...
 
virtual ~deBaseModule ()
 Cleans up the base module. More...
 
virtual int GetParameterCount () const
 Retrieves the count of parameters. More...
 
virtual void GetParameterInfo (int index, deModuleParameter *parameter) const
 Retrieves the informations about the given indexec parameter. More...
 
virtual int FindParameter (const char *name) const
 Retrieves the index of the parameter with the given name or -1 if not found. More...
 
virtual float GetParameterValue (int index) const
 Retrieves the value of the parameter at the given index. More...
 
virtual void SetParameterValue (int index, float value)
 Sets the parameter of the parameter at the given index. More...
 
virtual void SendCommand (const decUnicodeArgumentList &command, decUnicodeString &answer)
 Sends a command to the module and retrieves an answer from it. More...
 
void LogInfo (const char *message)
 Outputs an information message on the console. More...
 
void LogInfoFormat (const char *message,...)
 Outputs a formated information message on the console. More...
 
void LogInfoFormatUsing (const char *message, va_list args)
 Outputs a formated information message on the console. More...
 
void LogWarn (const char *message)
 Outputs a warning message on the console. More...
 
void LogWarnFormat (const char *message,...)
 Outputs a formated warning message on the console. More...
 
void LogWarnFormatUsing (const char *message, va_list args)
 Outputs a formated warning message on the console. More...
 
void LogError (const char *message)
 Outputs an error message on the console. More...
 
void LogErrorFormat (const char *message,...)
 Outputs a formated error message on the console. More...
 
void LogErrorFormatUsing (const char *message, va_list args)
 Outputs a formated error message on the console. More...
 
void LogException (const deException &exception)
 Outputs an exception as error message on the console. More...
 
deEngineGetGameEngine () const
 Retrieves the game engine object. More...
 
deLoadableModuleGetLoadableModule () const
 Retrieves the loadable module. More...
 
deOSGetOS () const
 Retrieves the os object from the game engine. More...
 
deVirtualFileSystemGetVFS () const
 Retrieves the module virtual file system. More...
 
deErrorTracePointSetErrorTrace (const char *error, const char *sourceFunc, int sourceLine)
 Adds a new trace point and sets the error if the trace is empty. More...
 
deErrorTracePointSetErrorTrace (const deException &exception)
 Adds a new trace point and sets the error if the trace is empty. More...
 
deErrorTracePointAddErrorTracePoint (const char *sourceFunc, int sourceLine)
 Adds a new trace point to the engine error trace with an empty error. More...
 

Detailed Description

Base sound module providing load/save support for sounds.

Constructor & Destructor Documentation

◆ deBaseSoundModule()

deBaseSoundModule::deBaseSoundModule ( deLoadableModule loadableModule)

Create module.

◆ ~deBaseSoundModule()

virtual deBaseSoundModule::~deBaseSoundModule ( )
virtual

Clean up module.

Member Function Documentation

◆ CreateDecoder()

virtual deBaseSoundDecoder* deBaseSoundModule::CreateDecoder ( decBaseFileReader reader)
pure virtual

Create decoder for reader.

The decoder has to keep a live reference to the reader.

◆ InitLoadSound()

virtual deBaseSoundInfo* deBaseSoundModule::InitLoadSound ( decBaseFileReader reader)
pure virtual

Quick check if file can be loaded by this 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.

◆ LoadSound()

virtual void deBaseSoundModule::LoadSound ( decBaseFileReader reader,
deSound sound,
deBaseSoundInfo infos 
)
pure virtual

Load sound.

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.

◆ SaveSound()

virtual void deBaseSoundModule::SaveSound ( decBaseFileWriter writer,
const deSound sound 
)
pure virtual

Save sound.

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: