• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
        • Audio Statement
        • Audio.load Function
        • Audio.save Function
        • Audio.play Function
        • Audio.recordInteractive Function
        • Audio.record Function
        • Audio.stop Function
        • Audio.concat Function
        • Audio.length Function
        • Audio.clear Function
      • Barcode and QR Codes
      • Case Object
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Audio.save Function

Format
b = audio_name.save(audio_filename);
Description
The Audio.save function saves the audio recording in an Audio object to the file specified by audio_filename. If the audio file already exists, the recording will be appended to the existing audio.
Audio recorded using the functions Audio.record and Audio.recordInteractive is stored in m4a format (AAC encoded in an MPEG-4 container). Audio in this format should be saved with the extension .m4a so that it will be recognized by media players.
Return Value
The function returns a logical value of 1 (true) if the file was successfully saved or 0 (false) otherwise.
Example
PROC GLOBAL

Audio recordingQ1;

PROC Q1

preproc
    recordingQ1.
record();

postproc
    recordingQ1.
stop();
   
string audioFilename = maketext("recording%v.m4a", HOUSEHOLD_ID);
    recordingQ1.
save(audioFilename);
See also: Audio Object, Audio.load Function