Wednesday, 16 January 2013

Recording a Phone Call


Recording a Phone Call

Interesting things happen when you record or play a sound during a
phone call. Calling play() plays the sound to the speech channel,
meaning that those participating in the phone call can hear it. Calling
record() starts recording the telephone call.
See Chapter 7 for more information about using the telephone.

Other Useful Functions of the Audio Module

A range of additional functions are provided by the audio module:
• state() returns the current state of the Sound object. The different
states are returned as constants:
◦ ENotReady – the Sound object has been constructed but no
audio file is open.
◦ EOpen – an audio file is open but no playing or recording operation
is in progress.
◦ EPlaying – an audio file is playing.
◦ ERecording – an audio file is being recorded.
• max volume() returns the maximum volume of the device.
• set volume(volume) sets the volume of the device. If the given
volume is negative, the volume is set to zero which mutes the device.
If the volume is greater than the maximum volume, the maximum
volume is used.
• current volume() returns the current volume level.
• duration() returns the duration of the file in microseconds.
• set position(microseconds) sets the position of the playhead.
• current position() returns the current playhead position in
microseconds.

No comments:

Post a Comment