|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--quicktime.QTObject
|
+--quicktime.sound.SPBDevice
| Field Summary |
| Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
| Constructor Summary | |
SPBDevice(java.lang.String deviceName,
int permission)
The SPBOpenDevice function attempts to open a sound input device having the name indicated by the deviceName parameter. |
|
| Method Summary | |
int |
bytesToMilliseconds(int bytes)
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. |
static SPBDevice |
fromSoundChannel(SGSoundChannel sc)
Get the Sound Input Driver QuickTime::SGGetSoundInputDriver |
int[] |
getActiveLevels()
Get the current signal level for each active channel. |
boolean |
getAutomaticGainControl()
Get the state of the automatic gain control. |
int |
getChannelAvailable()
Get the maximum number of channels this device can record. |
int[] |
getCompressionAvailable()
Returns an integer (OSTypes) list containing the available compression types. |
int |
getCompressionType()
Returns the current compression type. |
boolean |
getContinuousRecording()
Get the state of continuous recording from this device QuickTime::SPBGetDeviceInfo |
static java.lang.String |
getIndexedDevice(int count)
You can use the SPBGetIndexedDevice function to help generate a list of sound input devices. |
float |
getInputGain()
Get the input gain level. |
int |
getInputSource()
Get the input Source Index. |
java.lang.String[] |
getInputSourceNames()
Get a list of the names of all the sound input sources supported by the sound input device |
int |
getLevelMeterLevel()
Get the current level of the level meter. |
boolean |
getLevelMeterOnOff()
Get the current state of the level meter. |
java.lang.String |
getName()
Returns the name of this device. |
int |
getNumberChannels()
Returns the number of channels that this device is to record. |
int |
getPlayThruOnOff()
Get the PlayThru level, 0 means it's off. |
float |
getSampleRate()
Gets the sample rate produced by this device. |
float[] |
getSampleRateAvailable()
Returns a float list containing the sample rates available. |
int |
getSampleSize()
Returns the number of bits per sample. |
int[] |
getSampleSizeAvailable()
Returns an integer list containing the sample sizes available. |
float |
getStereoInputGainLeft()
Returns the current gain setting for the left channel of a stereo device QuickTime::SPBGetDeviceInfo |
float |
getStereoInputGainRight()
Returns the current gain setting for the right channel of a stereo device QuickTime::SPBGetDeviceInfo |
boolean |
hasOptionsDialog()
Returns true if the current device supports an options dialog box and false if not. |
int |
millisecondsToBytes(int msecs)
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. |
void |
setAutomaticGainControl(boolean flag)
Set the state of the automatic gain control. |
void |
setCompressionType(int compType)
Set the compression type. |
void |
setContinuousRecording(boolean isContinuous)
Set the state of continuous recording from this device. |
void |
setInputGain(float gain)
Set the input gain level. |
void |
setInputSource(int source)
sets the input Source to the passed in (index) source. |
void |
setLevelMeterOnOff(boolean flag)
Set the current state of the level meter. |
void |
setNumberChannels(int channels)
Sets the number of channels that this device is to record. |
void |
setPlayThruOnOff(int volume)
Set the PlayThru level, 0 means it's off. |
void |
setSampleRate(float rate)
Set the sample rate to be produced by this device. |
void |
setSampleSize(int sampleSize)
Set the number of bits per sample. |
void |
setStereoInputGain(float leftChannel,
float rightChannel)
Set the the current stereo sound input gain. |
void |
showOptionsDialog()
Shows the options dialog if available. |
java.lang.String |
toString()
A String representation of the class. |
| Methods inherited from class quicktime.QTObject |
disposeQTObject, equals, ID |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SPBDevice(java.lang.String deviceName,
int permission)
throws SoundException
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.| Method Detail |
public static java.lang.String getIndexedDevice(int count)
throws SoundException
count - The index number of the sound input device you wish to obtain information about.
2return the name of the sound input device specified by the count parameter or null if there isn't a device at that index.
SoundException
public static SPBDevice fromSoundChannel(SGSoundChannel sc)
throws StdQTException
StdQTExceptionSGSoundChannel.getInputDriver()
public int millisecondsToBytes(int msecs)
throws SoundException
msecs - how many milliseconds you wish to record
SoundException
public int bytesToMilliseconds(int bytes)
throws SoundException
bytes - how many bytes you wish to record
SoundException
public void setLevelMeterOnOff(boolean flag)
throws SoundException
flag - set to true to turn the channel on, false to turn it off.
SoundException
public boolean getLevelMeterOnOff()
throws SoundException
SoundException
public int getLevelMeterLevel()
throws SoundException
SoundException
public void setAutomaticGainControl(boolean flag)
throws SoundException
flag - set to true to turn automatic gain on, false to turn it off.
SoundException
public boolean getAutomaticGainControl()
throws SoundException
SoundException
public void setInputGain(float gain)
throws SoundException
gain - a float (fixed value) to set the gain to.
SoundException
public float getInputGain()
throws SoundException
SoundException
public int getInputSource()
throws SoundException
SoundException
public void setInputSource(int source)
throws SoundException
SoundException
public java.lang.String[] getInputSourceNames()
throws SoundException
SoundException
public int getChannelAvailable()
throws SoundException
SoundException
public int getNumberChannels()
throws SoundException
SoundException
public void setNumberChannels(int channels)
throws SoundException
channels - number of channels
SoundException
public int getPlayThruOnOff()
throws SoundException
SoundException
public void setPlayThruOnOff(int volume)
throws SoundException
SoundException
public void setSampleRate(float rate)
throws SoundException
rate - the rate of the device
SoundException
public float getSampleRate()
throws SoundException
SoundException
public float[] getSampleRateAvailable()
throws SoundException
SoundException
public void setSampleSize(int sampleSize)
throws SoundException
sampleSize - is the number of bits in an individual sample.
SoundException
public int getSampleSize()
throws SoundException
SoundException
public int[] getSampleSizeAvailable()
throws SoundException
SoundException
public void setStereoInputGain(float leftChannel,
float rightChannel)
throws SoundException
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)
SoundException
public float getStereoInputGainLeft()
throws SoundException
SoundException
public float getStereoInputGainRight()
throws SoundException
SoundException
public boolean getContinuousRecording()
throws SoundException
SoundException
public void setContinuousRecording(boolean isContinuous)
throws SoundException
isContinuous - the state of continuous recording (false is off, true is on)
SoundException
public void setCompressionType(int compType)
throws SoundException
compType - the compressor type.
SoundException
public int getCompressionType()
throws SoundException
SoundException
public int[] getCompressionAvailable()
throws SoundException
SoundException
public boolean hasOptionsDialog()
throws SoundException
SoundException
public void showOptionsDialog()
throws SoundException
SoundException
public java.lang.String getName()
throws SoundException
SoundException
public int[] getActiveLevels()
throws SoundException
SoundExceptionpublic java.lang.String toString()
QTObject
toString in class QTObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||