WAVE File and AU File Functions

The following functions allow the user to manipulate WAVE and AU files through the VPBAPI:

vpb_wave_open_write()
vpb_wave_write()
vpb_wave_close_write()
vpb_wave_open_read()
vpb_wave_read()
vpb_wave_close_read()
vpb_wave_set_sample_rate()
vpb_wave_seek()
vpb_wave_get_mode()

When writing to a wave file the user must initially open up a wave file using vpb_wave_open_write() to set up the appropriate wave format and filename. Writing to the file is then handled by vpb_wave_write(). The wave file must be closed by the vpb_wave_close_write().

Reading a wave file requires a similar procedure, initially opening up the wave file using vpb_wave_open_read() to determine the file's wave format. Reading the file is then handled by vpb_wave_read(). The wave file must be closed by the vpb_wave_close_read().

The vpb_wave_get_mode() obtains the compression format of a wave file. This function is useful in instances where the user-define play routines are required. The vpb_wave_seek() moves the file pointer of the wave file to a specified location.