Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.app.audio
Class AudioMediaControl

    java.lang.Object
      |
      +--quicktime.app.audio.AudioMediaControl

All Implemented Interfaces:
  AudioSpec, ExtendedAudioSpec

Direct Known Subclasses:
  MusicMediaControl

public class AudioMediaControl
extends java.lang.Object
implements ExtendedAudioSpec

This is a very simple implementation of the ExtendedAudioSpec interface to control Media that has an audio media component.

Field Summary
`protected AudioMediaHandler` | `audioHandler` This the AudioMediaHandler that is the MediaHandler for the AudioMedia
`protected Media` | `audioMedia` This is the audioMedia object that is represented by this class

Constructor Summary
`AudioMediaControl(Media media)` The constructor that deals with Media objects.

Method Summary
`float` | `getBalance()` This method gets the current balance for this media.
`Media` | `getMedia()` Returns the media controlled by this object
`float` | `getVolume()` Returns the current volume of the media (range: 0.0 - 1.0)
`boolean` | `isMuted()` Returns whether or not the media is currently muted.
`void` | `setBalance(float val)` This method sets the balance for this media.
`void` | `setMuted(boolean mute)` Sets the muted state of this media.
`void` | `setVolume(float vol)` This method sets the volume of the media (range: 0.0 - 1.0)

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### audioMedia

    protected Media audioMedia

  This is the audioMedia object that is represented by this class

### audioHandler

    protected AudioMediaHandler audioHandler

  This the AudioMediaHandler that is the MediaHandler for the AudioMedia

Constructor Detail

### AudioMediaControl

    public AudioMediaControl(Media media)
                      throws QTException

  The constructor that deals with Media objects. The media object must have an AudioMediaHandler as its media handler or an exception will be thrown
  Parameters:
    `media` - the Media object to control

Method Detail

### getMedia

    public Media getMedia()

  Returns the media controlled by this object
  Returns:
    the media

### isMuted

    public boolean isMuted()

  Returns whether or not the media is currently muted.
  Specified by:
    `isMuted` in interface `AudioSpec`
  Returns:
    the muted state of the media

### setMuted

    public void setMuted(boolean mute)
                  throws QTException

  Sets the muted state of this media.
  Specified by:
    `setMuted` in interface `AudioSpec`
  Parameters:
    `mute` - the desired muted state

### getVolume

    public float getVolume()
                    throws QTException

  Returns the current volume of the media (range: 0.0 - 1.0)
  Specified by:
    `getVolume` in interface `AudioSpec`
  Returns:
    the current volume.

### setVolume

    public void setVolume(float vol)
                   throws QTException

  This method sets the volume of the media (range: 0.0 - 1.0)
  Specified by:
    `setVolume` in interface `AudioSpec`
  Parameters:
    `vol` - the desired volume

### getBalance

    public float getBalance()
                     throws QTException

  This method gets the current balance for this media. Values range from -1.0 (left) to 0.0 (center) to 1.0 (right)
  Specified by:
    `getBalance` in interface `ExtendedAudioSpec`
  Returns:
    the current balance

### setBalance

    public void setBalance(float val)
                    throws QTException

  This method sets the balance for this media. Valid values range from -1.0 (left) to 0.0 (center) to 1.0 (right)
  Specified by:
    `setBalance` in interface `ExtendedAudioSpec`
  Parameters:
    `val` - the desired balance

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD