|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.util.QTByteObject | +--quicktime.sound.SPB
The SPB class is used in conjunction with a SPBDevice to record sound. It contains fields that describe how much sound the device should record and a buffer of memory where the recorded sound is recorded.
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.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Constructor Summary | |
SPB(SPBDevice device,
int count,
int milliseconds,
QTPointerRef buffer)
Create a SPB. |
Method Summary | |
QTPointerRef |
getBuffer()
Sets the buffer that the device will record into. |
int |
getBufferLength()
Get the number of bytes that are or were recorded. |
int |
getCount()
Get the number of bytes that are or were recorded. |
SPBDevice |
getDevice()
Gets the device that is attached to this object. |
short |
getError()
You can call this to check the value of the error code. |
int |
getMilliseconds()
Get the the number of milliseconds that are or were recorded. |
boolean |
isRecording()
The status of the recording. |
short |
meterLevel()
The level of the meter. |
int |
numberOfMsecsRecorded()
The total number of msecs recorded. |
int |
numberOfSamplesRecorded()
The total number of samples recorded. |
void |
pauseRecording()
Pause recording from a sound input device. |
void |
record(boolean flag)
Record audio data into memory, either synchronously or asynchronously. |
void |
removeCompletionProc()
|
void |
resumeRecording()
Pause recording from a sound input device. |
void |
setBuffer(QTPointerRef buffer)
Sets the buffer that the device will record into. |
void |
setCompletionProc(SICompletion comp)
|
void |
setCount(int count)
Sets the number of bytes that are to be recorded. |
void |
setMilliseconds(int msecs)
Sets the the number of milliseconds that are to be recorded. |
void |
stopRecording()
End a recording from a sound input device. |
int |
totalMsecsToRecord()
The total number of msecs to record. |
int |
totalSamplesToRecord()
The total number of samples to record. |
Methods inherited from class quicktime.util.QTByteObject |
equals, fromArray, getBytes, getSize, toString |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int kNativeSize
Constructor Detail |
public SPB(SPBDevice device, int count, int milliseconds, QTPointerRef buffer)
device
- the SPBDevice that is to be used for recording the soundcount
- how many bytes of data to recordmilliseconds
- On input, the number of milliseconds to record. If this field indicates a longer recording time than the count field, then the count field is ignored.buffer
- A QTPointer to the buffer for the sampled-sound data. If this buffer length is too small to contain the amount of sampled-sound data specified in the count and milliseconds fields, then recording time is truncated so that the sampled-sound data fits in the buffer.Method Detail |
public void setCompletionProc(SICompletion comp)
public void removeCompletionProc()
public int getCount()
public void setCount(int count)
count
- number of bytespublic int getBufferLength()
public int getMilliseconds()
public void setMilliseconds(int msecs)
msecs
- millisecondspublic SPBDevice getDevice()
public void setBuffer(QTPointerRef buffer)
buffer
- the record bufferpublic QTPointerRef getBuffer()
buffer
- the record bufferpublic short getError()
public void record(boolean flag) throws SoundException
flag
- if true record asynchronously, if false records synchronously.public void pauseRecording() throws SoundException
public void resumeRecording() throws SoundException
public void stopRecording() throws SoundException
public boolean isRecording() throws SoundException
public short meterLevel() throws SoundException
public int totalSamplesToRecord() throws SoundException
public int numberOfSamplesRecorded() throws SoundException
public int totalMsecsToRecord() throws SoundException
public int numberOfMsecsRecorded() throws SoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |