|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.neomedia.portaudio.streams.OutputPortAudioStream
public class OutputPortAudioStream
The output stream that opens and writes to the PortAudio stream.
| Constructor Summary | |
|---|---|
OutputPortAudioStream(int deviceIndex,
double sampleRate,
int channels)
Creates output stream. |
|
OutputPortAudioStream(int deviceIndex,
double sampleRate,
int channels,
long sampleFormat)
Creates output stream. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this OutputPortAudioStream and prepares it to be garbage collected. |
(package private) Object |
getCloseSyncObject()
Return the object we have used to synchronize Pa_CloseStream. |
int |
getDeviceIndex()
The index of the device that we use. |
long |
getStream()
The pointer of the PortAudio stream. |
void |
start()
Starts the stream operation |
void |
stop()
Stops the stream operation. |
void |
write(byte[] buffer,
int offset,
int length)
Writes a specific byte buffer of audio samples into the native PortAudio stream represented by this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OutputPortAudioStream(int deviceIndex,
double sampleRate,
int channels)
throws PortAudioException
deviceIndex - the index of the device to use.sampleRate - the sample rate.channels - the channels to serve.
PortAudioException - if stream fails to open.
public OutputPortAudioStream(int deviceIndex,
double sampleRate,
int channels,
long sampleFormat)
throws PortAudioException
deviceIndex - the index of the device to use.sampleRate - the sample rate.channels - the channels to serve.sampleFormat - the sample format to use.
PortAudioException - if stream fails to open.| Method Detail |
|---|
public void close()
throws PortAudioException
PortAudioException - if anything wrong happens while closing this
OutputPortAudioStream
public void write(byte[] buffer,
int offset,
int length)
throws PortAudioException
Splits the specified buffer and performs multiple writes with
PortAudioManager.getFramesPerBuffer() number of frames at a time.
If any bytes from the specified buffer remain unwritten, they are
retained for the next write to be prepended to its buffer.
buffer - the byte buffer to the written into the native
PortAudio stream represented by this instanceoffset - the offset in buffer at which the audio samples to
be written beginlength - the length of the audio samples in buffer to be
written
PortAudioException - if anything goes wrong while writing
public void start()
throws PortAudioException
PortAudioException
public void stop()
throws PortAudioException
PortAudioExceptionpublic int getDeviceIndex()
public long getStream()
Object getCloseSyncObject()
|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||