chrriis.dj.nativeswing.swtimpl.components.win32
Class WMPSettings

java.lang.Object
  extended by chrriis.dj.nativeswing.swtimpl.components.win32.WMPSettings

public class WMPSettings
extends Object

A Media Player object responsible for settings-related actions.

Author:
Christopher Deckers

Method Summary
 int getPlayCount()
          Get the playCount, as a value strictly greater than 0.
 float getPlaySpeedFactor()
          Get the speed factor that is applied when a media is played, as a value strictly greater than 0.
 int getStereoBalance()
          Get the stereo balance.
 int getVolume()
          Get the volume, as a value between 0 and 100.
 boolean isAutoStart()
          Indicate whether loading some media should start playing automatically.
 boolean isMute()
          Indicate whether audio is mute.
 void setAutoStart(boolean isAutoStart)
          Set whether loaded media should automatically start.
 void setMute(boolean isMute)
          Set whether audio is mute.
 void setPlayCount(int playCount)
          Set the play count.
 void setPlaySpeedFactor(float speedFactor)
          Set the speed factor that is applied when a media is played.
 void setStereoBalance(int stereoBalance)
           
 void setVolume(int volume)
          Set the volume.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setVolume

public void setVolume(int volume)
Set the volume.

Parameters:
volume - the new volume, with a value between 0 and 100.

getVolume

public int getVolume()
Get the volume, as a value between 0 and 100.

Returns:
the volume, between 0 and 100, or -1 in case of failure. When mute, the volume is still returned.

setPlayCount

public void setPlayCount(int playCount)
Set the play count.

Parameters:
playCount - the new playCount, with a value stricly greater than 0.

getPlayCount

public int getPlayCount()
Get the playCount, as a value strictly greater than 0.

Returns:
the play count, strictly greater than 0, or -1 in case of failure.

setPlaySpeedFactor

public void setPlaySpeedFactor(float speedFactor)
Set the speed factor that is applied when a media is played.

Parameters:
speedFactor - the speed factor, with a value strictly greater than 0.

getPlaySpeedFactor

public float getPlaySpeedFactor()
Get the speed factor that is applied when a media is played, as a value strictly greater than 0.

Returns:
the speed factor, strictly greater than 0, or NaN in case of failure.

setStereoBalance

public void setStereoBalance(int stereoBalance)
Parameters:
stereoBalance - The stereo balance between -100 and 100, with 0 being the default.

getStereoBalance

public int getStereoBalance()
Get the stereo balance.

Returns:
the stereo balance, between -100 and 100, with 0 being the default, or -1 in case of failure. When mute, the balance is still returned.

setAutoStart

public void setAutoStart(boolean isAutoStart)
Set whether loaded media should automatically start.

Parameters:
isAutoStart - true if the media should start playing automatically when loaded, false otherwise.

isAutoStart

public boolean isAutoStart()
Indicate whether loading some media should start playing automatically.

Returns:
true if loading some media should start playing automatically.

setMute

public void setMute(boolean isMute)
Set whether audio is mute.

Parameters:
isMute - true if audio should be mute, false otherwise.

isMute

public boolean isMute()
Indicate whether audio is mute.

Returns:
true if audio is mute.