All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.sound.SPBDevice

java.lang.Object
   |
   +----quicktime.QTObject
           |
           +----quicktime.sound.SPBDevice

public final class SPBDevice
extends QTObject
implements QuickTimeLib

Constructor Index

 o SPBDevice(String, int)
The SPBOpenDevice function attempts to open a sound input device having the name indicated by the deviceName parameter.

Method Index

 o bytesToMilliseconds(int)
Reports how many milliseconds are required to record the specified bytes amount of sound data, given the input device’s current sample rate, sample size, number of channels, and compression factor.
 o fromSoundChannel(SGSoundChannel)
Get the Sound Input Driver

QuickTime::SGGetSoundInputDriver QuickTime::SGGetSoundInputDriver

 o getAutomaticGainControl()
Get the state of the automatic gain control.
 o getChannelAvailable()
Get the maximum number of channels this device can record.
 o getCompressionAvailable()
Returns an integer (OSTypes) list containing the available compression types.
 o getCompressionType()
Returns the current compression type.
 o getInputGain()
Get the input gain level.
 o getInputSource()
Get the input Source Index.
 o getInputSourceNames()
Get a list of the names of all the sound input sources supported by the sound input device
 o getLevelMeterLevel()
Get the current level of the level meter.
 o getLevelMeterOnOff()
Get the current state of the level meter.
 o getNumberChannels()
Returns the number of channels that this device is to record.
 o getPlayThruOnOff()
Get the PlayThru level, 0 means it's off.
 o getSampleRate()
Gets the sample rate produced by this device.
 o getSampleRateAvailable()
Returns a float list containing the sample rates available.
 o getSampleSize()
Returns the number of bits per sample.
 o getSampleSizeAvailable()
Returns an integer list containing the sample sizes available.
 o getStereoInputGainLeft()
Returns the current gain setting for the left channel of a stereo device

QuickTime::SPBGetDeviceInfo

 o getStereoInputGainRight()
Returns the current gain setting for the right channel of a stereo device

QuickTime::SPBGetDeviceInfo

 o hasOptionsDialog()
Returns true if the current device supports an options dialog box and false if not.
 o millisecondsToBytes(int)
Reports how many bytes are required to store a recording of duration milliseconds, given the input device’s current sample rate, sample size, number of channels, and compression factor.
 o setAutomaticGainControl(boolean)
Set the state of the automatic gain control.
 o setCompressionType(int)
Set the compression type.
 o setInputGain(float)
Set the input gain level.
 o setInputSource(int)
sets the input Source to the passed in (index) source.
 o setLevelMeterOnOff(boolean)
Set the current state of the level meter.
 o setNumberChannels(int)
Sets the number of channels that this device is to record.
 o setPlayThruOnOff(int)
Set the PlayThru level, 0 means it's off.
 o setSampleRate(float)
Set the sample rate to be produced by this device.
 o setSampleSize(int)
Set the number of bits per sample.
 o setStereoInputGain(float, float)
Set the the current stereo sound input gain.
 o showOptionsDialog()
Shows the options dialog if available.

Constructors

 o SPBDevice
 public SPBDevice(String deviceName,
                  int permission) throws SoundException
The SPBOpenDevice function attempts to open a sound input device having the name indicated by the deviceName parameter.

QuickTime::SPBOpenDevice

Parameters:
deviceName - The name of the sound input device to open, or the empty string if the default sound input device is to be opened.
permission - A flag that indicates whether subsequent operations with that device are to be read/write or read-only.

Methods

 o fromSoundChannel
 public static SPBDevice fromSoundChannel(SGSoundChannel sc) throws StdQTException
Get the Sound Input Driver

QuickTime::SGGetSoundInputDriver QuickTime::SGGetSoundInputDriver

Returns:
the Sound Input driver in use by this channel.
See Also:
getInputDriver
 o millisecondsToBytes
 public int millisecondsToBytes(int msecs) throws SoundException
Reports how many bytes are required to store a recording of duration milliseconds, given the input device’s current sample rate, sample size, number of channels, and compression factor.

QuickTime::SPBMillisecondsToBytes

Parameters:
msecs - how many milliseconds you wish to record
Returns:
how many bytes you would require to record the specifiec milliseconds.
 o bytesToMilliseconds
 public int bytesToMilliseconds(int bytes) throws SoundException
Reports how many milliseconds are required to record the specified bytes amount of sound data, given the input device’s current sample rate, sample size, number of channels, and compression factor.

QuickTime::SPBBytesToMilliseconds

Parameters:
bytes - how many bytes you wish to record
Returns:
how many milliseconds.
 o setLevelMeterOnOff
 public void setLevelMeterOnOff(boolean flag) throws SoundException
Set the current state of the level meter.

QuickTime::SPBGetDeviceInfo

Parameters:
flag - set to true to turn the channel on, false to turn it off.
 o getLevelMeterOnOff
 public boolean getLevelMeterOnOff() throws SoundException
Get the current state of the level meter.

QuickTime::SPBGetDeviceInfo

Returns:
a boolean that determines whether the channel is on or off.
 o getLevelMeterLevel
 public int getLevelMeterLevel() throws SoundException
Get the current level of the level meter.

QuickTime::SPBGetDeviceInfo

Returns:
an integer that signals the current level of the channel.
 o setAutomaticGainControl
 public void setAutomaticGainControl(boolean flag) throws SoundException
Set the state of the automatic gain control.

QuickTime::SPBGetDeviceInfo

Parameters:
flag - set to true to turn automatic gain on, false to turn it off.
 o getAutomaticGainControl
 public boolean getAutomaticGainControl() throws SoundException
Get the state of the automatic gain control.

QuickTime::SPBGetDeviceInfo

Returns:
a boolean that determines whether automatic gain is on or off.
 o setInputGain
 public void setInputGain(float gain) throws SoundException
Set the input gain level.

QuickTime::SPBGetDeviceInfo

Parameters:
gain - a float (fixed value) to set the gain to.
 o getInputGain
 public float getInputGain() throws SoundException
Get the input gain level.

QuickTime::SPBGetDeviceInfo

Returns:
a float (fixed) of the current level on the input gain.
 o getInputSource
 public int getInputSource() throws SoundException
Get the input Source Index.

QuickTime::SPBGetDeviceInfo

Returns:
an integr which is the index of the current sound input source
 o setInputSource
 public void setInputSource(int source) throws SoundException
sets the input Source to the passed in (index) source.

QuickTime::SPBGetDeviceInfo

 o getInputSourceNames
 public String[] getInputSourceNames() throws SoundException
Get a list of the names of all the sound input sources supported by the sound input device

 o getChannelAvailable
 public int getChannelAvailable() throws SoundException
Get the maximum number of channels this device can record.

QuickTime::SPBGetDeviceInfo

Returns:
the maximum number of channels this device can record.
 o getNumberChannels
 public int getNumberChannels() throws SoundException
Returns the number of channels that this device is to record.

QuickTime::SPBGetDeviceInfo

Returns:
channels number of channels
 o setNumberChannels
 public void setNumberChannels(int channels) throws SoundException
Sets the number of channels that this device is to record.

QuickTime::SPBGetDeviceInfo

Parameters:
channels - number of channels
 o getPlayThruOnOff
 public int getPlayThruOnOff() throws SoundException
Get the PlayThru level, 0 means it's off.

QuickTime::SPBGetDeviceInfo

Returns:
the current PlayThru level.
 o setPlayThruOnOff
 public void setPlayThruOnOff(int volume) throws SoundException
Set the PlayThru level, 0 means it's off.

QuickTime::SPBGetDeviceInfo

 o setSampleRate
 public void setSampleRate(float rate) throws SoundException
Set the sample rate to be produced by this device.

QuickTime::SPBGetDeviceInfo

Parameters:
rate - the rate of the device
 o getSampleRate
 public float getSampleRate() throws SoundException
Gets the sample rate produced by this device.

QuickTime::SPBGetDeviceInfo

Returns:
the rate of the device
 o getSampleRateAvailable
 public float[] getSampleRateAvailable() throws SoundException
Returns a float list containing the sample rates available.

QuickTime::SPBGetDeviceInfo

Returns:
a float array containing the list of sample rates.
 o setSampleSize
 public void setSampleSize(int sampleSize) throws SoundException
Set the number of bits per sample.

QuickTime::SPBGetDeviceInfo

Parameters:
sampleSize - is the number of bits in an individual sample.
 o getSampleSize
 public int getSampleSize() throws SoundException
Returns the number of bits per sample.

QuickTime::SPBGetDeviceInfo

Returns:
number of bits in a sample.
 o getSampleSizeAvailable
 public int[] getSampleSizeAvailable() throws SoundException
Returns an integer list containing the sample sizes available.

QuickTime::SPBGetDeviceInfo

Returns:
an integer array containing the list of samples.
 o setStereoInputGain
 public void setStereoInputGain(float leftChannel,
                                float rightChannel) throws SoundException
Set the the current stereo sound input gain.

QuickTime::SPBGetDeviceInfo

Parameters:
leftChannel - the gain for the left channel (range 0.5 to 1.5)
rightChannel - the gain for the right channel (range 0.5 to 1.5)
 o getStereoInputGainLeft
 public float getStereoInputGainLeft() throws SoundException
Returns the current gain setting for the left channel of a stereo device

QuickTime::SPBGetDeviceInfo

Returns:
the gain setting
 o getStereoInputGainRight
 public float getStereoInputGainRight() throws SoundException
Returns the current gain setting for the right channel of a stereo device

QuickTime::SPBGetDeviceInfo

Returns:
the gain setting
 o setCompressionType
 public void setCompressionType(int compType) throws SoundException
Set the compression type.

QuickTime::SPBGetDeviceInfo

Parameters:
compType - the compressor type.
 o getCompressionType
 public int getCompressionType() throws SoundException
Returns the current compression type.

QuickTime::SPBGetDeviceInfo

Returns:
the compression type
 o getCompressionAvailable
 public int[] getCompressionAvailable() throws SoundException
Returns an integer (OSTypes) list containing the available compression types.

QuickTime::SPBGetDeviceInfo

Returns:
an integer array containing the list of compression types.
 o hasOptionsDialog
 public boolean hasOptionsDialog() throws SoundException
Returns true if the current device supports an options dialog box and false if not.

QuickTime::SPBGetDeviceInfo

Returns:
a boolean
 o showOptionsDialog
 public void showOptionsDialog() throws SoundException
Shows the options dialog if available.

QuickTime::SPBGetDeviceInfo


All Packages  Class Hierarchy  This Package  Previous  Next  Index