|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.QTObject | +--quicktime.sound.SPBDevice
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 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. |
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 |
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.public static SPBDevice fromSoundChannel(SGSoundChannel sc) throws StdQTException
SGSoundChannel.getInputDriver()
public int millisecondsToBytes(int msecs) throws SoundException
msecs
- how many milliseconds you wish to recordpublic int bytesToMilliseconds(int bytes) throws SoundException
bytes
- how many bytes you wish to recordpublic void setLevelMeterOnOff(boolean flag) throws SoundException
flag
- set to true to turn the channel on, false to turn it off.public boolean getLevelMeterOnOff() throws SoundException
public int getLevelMeterLevel() throws SoundException
public void setAutomaticGainControl(boolean flag) throws SoundException
flag
- set to true to turn automatic gain on, false to turn it off.public boolean getAutomaticGainControl() throws SoundException
public void setInputGain(float gain) throws SoundException
gain
- a float (fixed value) to set the gain to.public float getInputGain() throws SoundException
public int getInputSource() throws SoundException
public void setInputSource(int source) throws SoundException
public java.lang.String[] getInputSourceNames() throws SoundException
public int getChannelAvailable() throws SoundException
public int getNumberChannels() throws SoundException
public void setNumberChannels(int channels) throws SoundException
channels
- number of channelspublic int getPlayThruOnOff() throws SoundException
public void setPlayThruOnOff(int volume) throws SoundException
public void setSampleRate(float rate) throws SoundException
rate
- the rate of the devicepublic float getSampleRate() throws SoundException
public float[] getSampleRateAvailable() throws SoundException
public void setSampleSize(int sampleSize) throws SoundException
sampleSize
- is the number of bits in an individual sample.public int getSampleSize() throws SoundException
public int[] getSampleSizeAvailable() throws 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)public float getStereoInputGainLeft() throws SoundException
public float getStereoInputGainRight() throws SoundException
public void setCompressionType(int compType) throws SoundException
compType
- the compressor type.public int getCompressionType() throws SoundException
public int[] getCompressionAvailable() throws SoundException
public boolean hasOptionsDialog() throws SoundException
public void showOptionsDialog() throws SoundException
public java.lang.String getName() throws SoundException
public int[] getActiveLevels() throws SoundException
public java.lang.String toString()
QTObject
toString
in class QTObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |