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
-
SPBDevice(String, int)
- The SPBOpenDevice function attempts to open a sound input device having the name indicated by the deviceName parameter.
-
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.
-
fromSoundChannel(SGSoundChannel)
- Get the Sound Input Driver
QuickTime::SGGetSoundInputDriver QuickTime::SGGetSoundInputDriver
-
getAutomaticGainControl()
- Get the state of the automatic gain control.
-
getChannelAvailable()
- Get the maximum number of channels this device can record.
-
getCompressionAvailable()
- Returns an integer (OSTypes) list containing the available compression types.
-
getCompressionType()
- Returns the current compression type.
-
getInputGain()
- Get the input gain level.
-
getInputSource()
- Get the input Source Index.
-
getInputSourceNames()
- Get a list of the names of all the sound input sources
supported by the sound input device
-
getLevelMeterLevel()
- Get the current level of the level meter.
-
getLevelMeterOnOff()
- Get the current state of the level meter.
-
getNumberChannels()
- Returns the number of channels that this device is to record.
-
getPlayThruOnOff()
- Get the PlayThru level, 0 means it's off.
-
getSampleRate()
- Gets the sample rate produced by this device.
-
getSampleRateAvailable()
- Returns a float list containing the sample rates available.
-
getSampleSize()
- Returns the number of bits per sample.
-
getSampleSizeAvailable()
- Returns an integer list containing the sample sizes available.
-
getStereoInputGainLeft()
- Returns the current gain setting for the left channel of a stereo device
QuickTime::SPBGetDeviceInfo
-
getStereoInputGainRight()
- Returns the current gain setting for the right channel of a stereo device
QuickTime::SPBGetDeviceInfo
-
hasOptionsDialog()
- Returns true if the current device supports an options dialog box and false if not.
-
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.
-
setAutomaticGainControl(boolean)
- Set the state of the automatic gain control.
-
setCompressionType(int)
- Set the compression type.
-
setInputGain(float)
- Set the input gain level.
-
setInputSource(int)
- sets the input Source to the passed in (index) source.
-
setLevelMeterOnOff(boolean)
- Set the current state of the level meter.
-
setNumberChannels(int)
- Sets the number of channels that this device is to record.
-
setPlayThruOnOff(int)
- Set the PlayThru level, 0 means it's off.
-
setSampleRate(float)
- Set the sample rate to be produced by this device.
-
setSampleSize(int)
- Set the number of bits per sample.
-
setStereoInputGain(float, float)
- Set the the current stereo sound input gain.
-
showOptionsDialog()
- Shows the options dialog if available.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
setInputSource
public void setInputSource(int source) throws SoundException
- sets the input Source to the passed in (index) source.
QuickTime::SPBGetDeviceInfo
getInputSourceNames
public String[] getInputSourceNames() throws SoundException
- Get a list of the names of all the sound input sources
supported by the sound input device
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.
getNumberChannels
public int getNumberChannels() throws SoundException
- Returns the number of channels that this device is to record.
QuickTime::SPBGetDeviceInfo
- Returns:
- channels number of channels
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
getPlayThruOnOff
public int getPlayThruOnOff() throws SoundException
- Get the PlayThru level, 0 means it's off.
QuickTime::SPBGetDeviceInfo
- Returns:
- the current PlayThru level.
setPlayThruOnOff
public void setPlayThruOnOff(int volume) throws SoundException
- Set the PlayThru level, 0 means it's off.
QuickTime::SPBGetDeviceInfo
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
getSampleRate
public float getSampleRate() throws SoundException
- Gets the sample rate produced by this device.
QuickTime::SPBGetDeviceInfo
- Returns:
- the rate of the device
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.
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.
getSampleSize
public int getSampleSize() throws SoundException
- Returns the number of bits per sample.
QuickTime::SPBGetDeviceInfo
- Returns:
- number of bits in a sample.
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.
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)
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
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
setCompressionType
public void setCompressionType(int compType) throws SoundException
- Set the compression type.
QuickTime::SPBGetDeviceInfo
- Parameters:
- compType - the compressor type.
getCompressionType
public int getCompressionType() throws SoundException
- Returns the current compression type.
QuickTime::SPBGetDeviceInfo
- Returns:
- the compression type
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.
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
showOptionsDialog
public void showOptionsDialog() throws SoundException
- Shows the options dialog if available.
QuickTime::SPBGetDeviceInfo
All Packages Class Hierarchy This Package Previous Next Index