Game Development Reference
In-Depth Information
FModFile = ModPlug_Load_P(
( const void* )FRawData->GetDataConst(),
( int )FRawData->GetSize() );
}
4. The destructor unloads the ile:
virtual ~ModPlugProvider() { ModPlug_Unload_P( FModFile ); }
5.
The ReadFromFile() method calls the ModPlug's reading function:
virtual int ReadFromFile(int Size, int BytesRead)
{
return ModPlug_Read_P( FModFile,
&FBuffer[0] + BytesRead,
Size - BytesRead );
}
6.
To rewind the source stream, we use the ModPlug_Seek() member function:
virtual void Seek( float Time )
{
FEof = false;
ModPlug_Seek_P( FModFile, ( int )( Time * 1000.0f ) );
}
};
How it works...
There is no dedicated sample for module ile decoding. For better understanding, we suggest
modifying the 3_AL_PlayingOGG source code. The only required modiication is the
replacement of OggProvider by ModPlugProvider . For testing, you have the test.it
ile in the 3_AL_PlayingOGG folder.
See also
F Decoding Ogg Vorbis iles
 
Search WWH ::




Custom Search