|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.havi.ui.HSound
org.ocap.hardware.device.OCSound
public class OCSound
Extends the HAVi HSound
class, adding additional configuration options.
Instances of this class provide control over audio gain level, muting, and
output ports.
AudioOutputPort
Constructor Summary | |
---|---|
OCSound()
Creates an OCSound object. |
Method Summary | |
---|---|
void |
addAudioOutput(AudioOutputPort au)
Add an AudioOutputPort to the set of audio output ports where
this clip will be played. |
AudioOutputPort[] |
getAudioOutputs()
Get the audio output ports on which this audio clip would be played. |
float |
getLevel()
Get the current gain set for this OCSound
as a value between 0.0 and 1.0. |
boolean |
isMuted()
Get the mute state of the audio signal associated with this audio clip. |
void |
removeAudioOutput(AudioOutputPort au)
Remove an AudioOutputPort from the set of audio ouput ports where
this clip will be played. |
float |
setLevel(float level)
Set the gain using a floating point scale with values between 0.0 and 1.0. |
void |
setMuted(boolean mute)
Mute or unmute the signal associated with this OCSound . |
Methods inherited from class org.havi.ui.HSound |
---|
dispose, load, load, loop, play, set, stop |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OCSound()
OCSound
object.
The following defaults apply upon construction:
Attribute | Method | Default |
---|---|---|
Level | getLevel() |
1.0 |
Mute | isMuted() |
false |
Outputs | getAudioOutputs() |
the default audio output for the application constructing the
OCSound instance |
Method Detail |
---|
public float setLevel(float level)
level
- The new gain value specified in the level scale.
getLevel()
,
AudioOutputPort.setLevel(float)
,
AudioOutputPort.getLevel()
public float getLevel()
OCSound
as a value between 0.0 and 1.0.
setLevel(float)
public boolean isMuted()
true
if muted and false
otherwise.setMuted(boolean)
public void setMuted(boolean mute)
OCSound
.
Redundant invocations of this method are ignored.
The mute state does not effect the gain (as represented by getLevel()
.
mute
- The new mute state:
true
mutes the signal and false
unmutes the signal.isMuted()
public AudioOutputPort[] getAudioOutputs()
OCSound
.
Unless AudioOutputPort
s have been removed by calling
removeAudioOutput
, this method SHALL return the
at least the default AudioOutputPort
for the application.
Unless AudioOutputPort
s have been added by calling
addAudioOutput
, this method SHALL return at most
the default AudioOutputPort
for the application.
AudioOutputPort
s as an array.
If all ports have been removed, then an empty array SHALL be returned.addAudioOutput(org.ocap.hardware.device.AudioOutputPort)
,
removeAudioOutput(org.ocap.hardware.device.AudioOutputPort)
public void addAudioOutput(AudioOutputPort au)
AudioOutputPort
to the set of audio output ports where
this clip will be played.
Redundant additions SHALL have no effect.
au
- The AudioOutputPort
to add.public void removeAudioOutput(AudioOutputPort au)
AudioOutputPort
from the set of audio ouput ports where
this clip will be played.
Attempting to remove an AudioOutputPort
that is not currently
in the set of audio output ports for this OCSound
SHALL have
no effect.
au
- The AudioOutputPort
to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |