The abstract audio interface. More...
Classes | |
interface | Packetizer |
Audio sender interface used by instance of the AudioInterface class to send captured audio samples to the remote peer. More... | |
Public Member Functions | |
abstract int | getSampleSize () |
Returns the minimum sample size for use in creating buffers etc. | |
abstract long | readWithTimestamp (byte[] buff) throws IOException |
Reads from the microphone, using the buffer provided, but only filling getSampSize() bytes. | |
abstract void | stopRecording () |
Stops the recorder - but don't throw it away. | |
abstract long | startRecording () |
Starts the recorder (returning the time-stamp) | |
abstract void | startPlay () |
Starts the player. | |
abstract void | stopPlay () |
Stops the player. | |
abstract void | startRinging () |
Starts ringing signal. | |
abstract void | stopRinging () |
Stops ringing signal. | |
abstract void | writeBuffered (byte[] buff, long timestamp) throws IOException |
Plays the sample given (AudioInterface.getSampleSize() bytes) assuming that it's timestamp is long. | |
abstract void | writeDirectly (byte[] buff) throws IOException |
Writes directly to source line without buffering. | |
abstract int | getVoicePduSubclass () |
Gets the VoicePDU subclass attribute of the AbstractAudio object. | |
abstract void | setAudioSender (AudioInterface.Packetizer as) |
Sets the audioSender attribute of the AbstractAudio object. | |
abstract void | cleanUp () |
Cleans up resources used by the interface. | |
abstract AudioInterface | getByFormat (Integer format) |
Creates new instance of the interface by choosing specified CODEC format. |
The abstract audio interface.
Definition at line 14 of file AudioInterface.java.
abstract void audio.AudioInterface.cleanUp | ( | ) | [pure virtual] |
Cleans up resources used by the interface.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
Referenced by CryptoPhoneApp.stopKryptofonServices().
abstract AudioInterface audio.AudioInterface.getByFormat | ( | Integer | format ) | [pure virtual] |
Creates new instance of the interface by choosing specified CODEC format.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
Referenced by CryptoPhoneApp.acceptIncomingCall(), and CryptoPhoneApp.deferredOnAccept().
abstract int audio.AudioInterface.getSampleSize | ( | ) | [pure virtual] |
Returns the minimum sample size for use in creating buffers etc.
Implemented in audio.AudioCodecAlaw, audio.AudioCodecUlaw, and audio.AudioInterfacePCM.
Referenced by protocol.CallContext.getAudioSampleSize(), and protocol.VoicePDUSender.VoicePDUSender().
abstract int audio.AudioInterface.getVoicePduSubclass | ( | ) | [pure virtual] |
Gets the VoicePDU subclass attribute of the AbstractAudio object.
Implemented in audio.AbstractCODEC, audio.AudioCodecAlaw, audio.AudioCodecUlaw, and audio.AudioInterfacePCM.
Referenced by protocol.VoicePDUSender.VoicePDUSender().
abstract long audio.AudioInterface.readWithTimestamp | ( | byte[] | buff ) | throws IOException [pure virtual] |
Reads from the microphone, using the buffer provided, but only filling getSampSize() bytes.
Returns the time-stamp of the sample from the audio clock.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
Referenced by protocol.VoicePDUSender.send().
abstract void audio.AudioInterface.setAudioSender | ( | AudioInterface.Packetizer | as ) | [pure virtual] |
Sets the audioSender attribute of the AbstractAudio object.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
Referenced by protocol.CallContext.cleanUp(), and protocol.CallContext.startAudioRecording().
abstract void audio.AudioInterface.startPlay | ( | ) | [pure virtual] |
Starts the player.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
abstract long audio.AudioInterface.startRecording | ( | ) | [pure virtual] |
Starts the recorder (returning the time-stamp)
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
Referenced by protocol.CallContext.startAudioRecording().
abstract void audio.AudioInterface.startRinging | ( | ) | [pure virtual] |
Starts ringing signal.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
Referenced by CryptoPhoneApp.deferredOnInvite(), and CryptoPhoneApp.deferredOnRing().
abstract void audio.AudioInterface.stopPlay | ( | ) | [pure virtual] |
Stops the player.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
Referenced by protocol.CallContext.cleanUp(), and CryptoPhoneApp.stopKryptofonServices().
abstract void audio.AudioInterface.stopRecording | ( | ) | [pure virtual] |
Stops the recorder - but don't throw it away.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
Referenced by protocol.CallContext.cleanUp(), protocol.CallContext.stopAudioRecording(), and CryptoPhoneApp.stopKryptofonServices().
abstract void audio.AudioInterface.stopRinging | ( | ) | [pure virtual] |
Stops ringing signal.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
Referenced by CryptoPhoneApp.deferredOnBye(), CryptoPhoneApp.executeCommand(), protocol.CallContext.onReceivedVoicePDU(), and protocol.CallContext.setCallEstablished().
abstract void audio.AudioInterface.writeBuffered | ( | byte[] | buff, |
long | timestamp | ||
) | throws IOException [pure virtual] |
Plays the sample given (AudioInterface.getSampleSize() bytes) assuming that it's timestamp is long.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.
Referenced by protocol.CallContext.audioWrite().
abstract void audio.AudioInterface.writeDirectly | ( | byte[] | buff ) | throws IOException [pure virtual] |
Writes directly to source line without buffering.
Implemented in audio.AbstractCODEC, and audio.AudioInterfacePCM.