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

## quicktime.sound
Class SndCommand

    java.lang.Object
      |
      +--quicktime.QTObject
            |
            +--quicktime.util.QTPointerRef
                  |
                  +--quicktime.sound.SndCommand

All Implemented Interfaces:
  quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, com.apple.jdirect.SharedLibrary, quicktime.jdirect.SharedLibrary

public final class SndCommand
extends QTPointerRef
implements quicktime.jdirect.PrimitivesLib

This class represents a SndCommand as used by SndChannel's doCommand() and doImmediate methods. There are various convenience methods added BUT you must make sure that the cmd field has been set appropriately before using those methods - those calls fail silently if you do the wrong thing.

Field Summary
`static int` | `kNativeSize` This is the size (the number of bytes) that are required for this class

Fields inherited from interface quicktime.jdirect.PrimitivesLib
`JDirect_MacOSX, libraryInstance`

Fields inherited from interface quicktime.jdirect.QuickTimeLib
`JDirect_MacOSX, libraryInstance, name`

Constructor Summary
`SndCommand(int cmd)` Creates a SndCommand object and performs initialization
`SndCommand(int cmd, int param1, int param2)` Creates a SndCommand object and performs initialization

Method Summary
`ExtScheduledSoundHeader` | `getBuffer()`
`int` | `getCmd()` Retrieves the command.
`float` | `getLeftVolume()` Gets the value of the left volume IFF the cmd field is getVolumeCmd or volumeCmd otherwise this call returns 0.
`int` | `getParam1()` Retrieves the first optional parameter.
`int` | `getParam2()` Retrieves the second optional parameter.
`float` | `getRightVolume()` Gets the value of the right volume IFF the cmd field is getVolumeCmd or volumeCmd otherwise this call returns 0.
`void` | `setBuffer(ExtScheduledSoundHeader buffer)`
`void` | `setCmd(int cmd)` Sets the command.
`void` | `setParam1(int param1)` Sets the first optional parameter.
`void` | `setParam2(int param2)` Sets the second optional parameter.
`void` | `setVolumes(float leftVol, float rightVol)` Gets the value of the right volume IFF the cmd field is volumeCmd otherwise this call returns.
`java.lang.String` | `toString()` Returns a string representation of this object.

Methods inherited from class quicktime.util.QTPointerRef
`copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, getBytes, getSize`

Methods inherited from class quicktime.QTObject
`disposeQTObject, equals, ID`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### kNativeSize

    public static final int kNativeSize

  This is the size (the number of bytes) that are required for this class

Constructor Detail

### SndCommand

    public SndCommand(int cmd)
               throws QTException

  Creates a SndCommand object and performs initialization
  Parameters:
    `cmd` - the sound command (from StdQTConstants)

### SndCommand

    public SndCommand(int cmd,
                      int param1,
                      int param2)
               throws QTException

  Creates a SndCommand object and performs initialization
  Parameters:
    `cmd` - the sound command (from SoundConstants)
    `param1` - optional command parameter
    `param2` - optional command parameter

Method Detail

### setCmd

    public void setCmd(int cmd)

  Sets the command.
  Parameters:
    `cmd` - the sound command (from StdQTConstants)

### getCmd

    public int getCmd()

  Retrieves the command.
  Returns:
    cmd the sound command

### setParam1

    public void setParam1(int param1)

  Sets the first optional parameter.
  Parameters:
    `param1` - optional command parameter

### getParam1

    public int getParam1()

  Retrieves the first optional parameter.
  Returns:
    optional command parameter

### setParam2

    public void setParam2(int param2)

  Sets the second optional parameter.
  Parameters:
    `param2` - optional command parameter

### getParam2

    public int getParam2()

  Retrieves the second optional parameter.
  Returns:
    optional command parameter

### setBuffer

    public void setBuffer(ExtScheduledSoundHeader buffer)

### getBuffer

    public ExtScheduledSoundHeader getBuffer()

### setVolumes

    public void setVolumes(float leftVol,
                           float rightVol)

  Gets the value of the right volume IFF the cmd field is volumeCmd otherwise this call returns.
  Parameters:
    `vol` - the new volume for the right channel

### getRightVolume

    public float getRightVolume()

  Gets the value of the right volume IFF the cmd field is getVolumeCmd or volumeCmd otherwise this call returns 0.
  Returns:
    the right volume value

### getLeftVolume

    public float getLeftVolume()

  Gets the value of the left volume IFF the cmd field is getVolumeCmd or volumeCmd otherwise this call returns 0.
  Returns:
    the right volume value

### toString

    public java.lang.String toString()

  Returns a string representation of this object.
  Overrides:
    `toString` in class `QTPointerRef`
  Returns:
    a String

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