b = audio_name.concat(audio_filename ‖ audio_object);
The
Audio.concat function appends an audio recording stored in a file specified by the argument
audio_filename or an
Audio object specified by the argument
audio_object to the current recording in an
Audio object. The result is a new recording that combines both recordings and is stored in the initial Audio object.
The
Audio.concat function only works with audio files stored in m4a format (AAC encoded audio stored in an MPEG-4 container). This is the format of files recorded in CSPro using the
Audio.record and
Audio.recordInteractive functions. Audio files that come from sources other than CSPro will most likely not work with
Audio.concat.
The function returns a logical value of 1 (true) if the recordings were concatenated successfully and a logical value of 0 (false) if there was an error combining the recordings.
Audio recording;
recording.load("recording1.m4a");
recording.concat("recording2.m4a");
recording.save("combined.m4a");