One of the typical uses of the waveform audio device is to digitize an input signal or sound into discrete samples for storage in a file. An example of this would be recording an electronic audio mail message to actually tell someone about an idea, as opposed to typing a memo on the same subject. An electronic audio mail application would be completely shielded from the complexity of digitizing a signal and would only need to specify a file, while providing the user with a simple control panel to allow the message to be recorded. The user might press a stop button on the control panel when finished describing the idea. The application could then issue a stop command to the waveaudio device to discontinue the recording.
open myidea.wav waveaudio alias wave wait record wave notify . . . ** recording the idea into myidea.wav ** . . . stop wave wait
Like many text editors, the waveform audio media driver will not actually modify the original file until it receives a command to save the changes. Any temporary files created during the record operation will be located in the directory specified by the MSV_WORKPATH multimedia system variable. The path can be specified on the system page of the Multimedia Setup application. The use of temporary files is completely transparent to the application.
The file can be saved using the original file name, or a new file name can be specified. If a save command is not issued before closing the waveform audio device, all changes will be discarded.
save wave wait close wave wait
It is possible to open or load the waveaudio device specifying a special readonly option. In this mode, the waveaudio device prevents any modification to the file from either the save or record commands. In certain circumstances, the driver might be able to optimize performance by utilizing the information that the file will not be modified. The option will also allow multiple applications to share the same file for playback purposes and will prevent inadvertent modification of the file.
open bigwave.wav type waveaudio alias wave readonly shareable