crystalspace.jbind.interfaces.isound.data
Interface iSoundData

All Superinterfaces:
iBase, iPointer
All Known Implementing Classes:
csSoundData

public interface iSoundData
extends iBase

The sound data is a template used to play sounds. It represents a sound file just after it was loaded. To play the sound, you must first prepare it and obtain a sound handle.

Author:
Java wrapper - Quentin Anciaux, c++ version - http://crystal.sourceforge.net/docs/online/devapi/structiSoundData.php

Method Summary
 csSoundFormat getFormat()
          Get the format of the sound data.
 iPointer getStaticData()
          Get a pointer to the data buffer (static sounds only);.
 long getStaticSampleCount()
          Get size of this sound in samples (static sounds only);.
 boolean initialize(csSoundFormat fmt)
          Prepare the sound for output using the given format.
 boolean isStatic()
          Return true if this is a static sound, false if it is streamed.
 iPointer readStreamed(long NumSamples)
          Read a data buffer from the sound (streamed sounds only);.
 void resetStreamed()
          Reset the sound to the beginning (streamed sounds only);.
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getName, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Method Detail

getFormat

public csSoundFormat getFormat()
Get the format of the sound data. Implemented in csModSoundData, and csOggSoundData.

Returns:

getStaticData

public iPointer getStaticData()
Get a pointer to the data buffer (static sounds only);. Implemented in csModSoundData, and csOggSoundData.

Returns:

getStaticSampleCount

public long getStaticSampleCount()
Get size of this sound in samples (static sounds only);. Implemented in csModSoundData, and csOggSoundData.

Returns:

initialize

public boolean initialize(csSoundFormat fmt)
Prepare the sound for output using the given format. Implemented in csModSoundData, and csOggSoundData.

Parameters:
fmt -
Returns:

isStatic

public boolean isStatic()
Return true if this is a static sound, false if it is streamed. Implemented in csModSoundData, and csOggSoundData.

Returns:

readStreamed

public iPointer readStreamed(long NumSamples)
Read a data buffer from the sound (streamed sounds only);. The NumSamples parameter is modified to a smaller value if not all samples could be read (i.e. the stream is finished);. The returned buffer is valid until the next call to Read();. Implemented in csModSoundData, and csOggSoundData.

Parameters:
NumSamples -
Returns:

resetStreamed

public void resetStreamed()
Reset the sound to the beginning (streamed sounds only);. Implemented in csModSoundData, and csOggSoundData.