wave.rtrim ("<Source Filename>", [Millisec], "[Destination Filename]")
This function is to trim the audio data from a wave file from its extreme right end.
The duration or length of the audio can be specified in the function.
Specify the name of source file.
Specify the duration or length of audio data to be trimed in milliseconds.
Specify the name of the destination file.
Returns 1 on success and 0 on failure.
We cannot use this function in a GSM compressed file. If the file is GSM, then convert this file into PCM, then rtrim it.
If the destination file is not mentioned as a parameter, then the source file itself is overwritten.
$stat = wave.rtrim ("bgplay.wav", 1000, "out.wav")
- The source wavefile is trimed 1000 millisec from the right end and wrote to destination file.
On successful excecution of the function $stat returns the value 1.