crystalspace.jbind.impl.sound.data
Class csSoundData

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.sound.data.csSoundData
All Implemented Interfaces:
iBase, iPointer, iSoundData

public class csSoundData
extends csBase
implements iSoundData

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csSoundData(iPointer nPointer)
           
 
Method Summary
 csSoundFormat getFormat()
          Get the format of the sound data.
 java.lang.String getName()
          Return the name of the interface
 iPointer getStaticData()
          Get a pointer to the data buffer (static sounds only);.
 long getStaticSampleCount()
          Get size of this sound in samples (static sounds only);.
 int getVersion()
          Return the version of the interface
 boolean initialize(csSoundFormat fmt)
          Prepare the sound for output using the given format.
protected  boolean isNativePointerValidSafe(long pointer)
           
 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 class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csSoundData

public csSoundData(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase
See Also:
iBase.getVersion()

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase
See Also:
iBase.getName()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long pointer)
Specified by:
isNativePointerValidSafe in class csNativeObject
See Also:
csNativeObject.isNativePointerValidSafe(long)

getFormat

public csSoundFormat getFormat()
Description copied from interface: iSoundData
Get the format of the sound data. Implemented in csModSoundData, and csOggSoundData.

Specified by:
getFormat in interface iSoundData
Returns:
See Also:
iSoundData.getFormat()

getStaticData

public iPointer getStaticData()
Description copied from interface: iSoundData
Get a pointer to the data buffer (static sounds only);. Implemented in csModSoundData, and csOggSoundData.

Specified by:
getStaticData in interface iSoundData
Returns:
See Also:
iSoundData.getStaticData()

getStaticSampleCount

public long getStaticSampleCount()
Description copied from interface: iSoundData
Get size of this sound in samples (static sounds only);. Implemented in csModSoundData, and csOggSoundData.

Specified by:
getStaticSampleCount in interface iSoundData
Returns:
See Also:
iSoundData.getStaticSampleCount()

initialize

public boolean initialize(csSoundFormat fmt)
Description copied from interface: iSoundData
Prepare the sound for output using the given format. Implemented in csModSoundData, and csOggSoundData.

Specified by:
initialize in interface iSoundData
Parameters:
fmt -
Returns:
See Also:
iSoundData.initialize(crystalspace.jbind.impl.sound.data.csSoundFormat)

isStatic

public boolean isStatic()
Description copied from interface: iSoundData
Return true if this is a static sound, false if it is streamed. Implemented in csModSoundData, and csOggSoundData.

Specified by:
isStatic in interface iSoundData
Returns:
See Also:
iSoundData.isStatic()

readStreamed

public iPointer readStreamed(long NumSamples)
Description copied from interface: iSoundData
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.

Specified by:
readStreamed in interface iSoundData
Parameters:
NumSamples -
Returns:
See Also:
iSoundData.readStreamed(long)

resetStreamed

public void resetStreamed()
Description copied from interface: iSoundData
Reset the sound to the beginning (streamed sounds only);. Implemented in csModSoundData, and csOggSoundData.

Specified by:
resetStreamed in interface iSoundData
See Also:
iSoundData.resetStreamed()