crystalspace.jbind.interfaces.isound.source
Interface iSoundSource

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

public interface iSoundSource
extends iBase

The sound source is an instance of a sound. It can be a non-3d source, in which case it plays the sound as it was recorded, or a 3d source, in which case it represents an object in 3d space and adjusts L/R volume for 3d sound.

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

Method Summary
 float getFrequencyFactor()
          Get frequency factor.
 int getMode3D()
          return 3d mode
 csVector3 getPosition()
          get position of this source
 csVector3 getVelocity()
          get velocity of this source
 float getVolume()
          Get volume (range from 0.0 to 1.0);.
 void play()
          Play the sound.
 void play(long playMethod)
          Play the sound.
 void setFrequencyFactor(float factor)
          Set frequency factor : 1 = normal, >1 faster, 0-1 slower.
 void setMode3D(int m)
          set 3d mode
 void setPosition(csVector3 pos)
          set position of this source
 void setVelocity(csVector3 spd)
          set velocity of this source
 void setVolume(float volume)
          Set volume (range from 0.0 to 1.0);.
 void stop()
          Stop the sound.
 
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

getFrequencyFactor

public float getFrequencyFactor()
Get frequency factor.

Returns:

getMode3D

public int getMode3D()
return 3d mode

Returns:

getPosition

public csVector3 getPosition()
get position of this source

Returns:

getVelocity

public csVector3 getVelocity()
get velocity of this source

Returns:

getVolume

public float getVolume()
Get volume (range from 0.0 to 1.0);.

Returns:

play

public void play()
Play the sound. PlayMethod can be set to any combination of SOUND_*.


play

public void play(long playMethod)
Play the sound. PlayMethod can be set to any combination of SOUND_*.

Parameters:
playMethod -

setFrequencyFactor

public void setFrequencyFactor(float factor)
Set frequency factor : 1 = normal, >1 faster, 0-1 slower.

Parameters:
factor -

setMode3D

public void setMode3D(int m)
set 3d mode

Parameters:
m -

setPosition

public void setPosition(csVector3 pos)
set position of this source

Parameters:
pos -

setVelocity

public void setVelocity(csVector3 spd)
set velocity of this source

Parameters:
spd -

setVolume

public void setVolume(float volume)
Set volume (range from 0.0 to 1.0);.

Parameters:
volume -

stop

public void stop()
Stop the sound.