Reads data from a .wav file into an array of waveforms. You must manually select the polymorphic instance you want to use.

(Windows) You must have DirectX 8.0 or later to use this VI.

Note This VI retrieves only uncompressed wave files. LabVIEW uses large amounts of memory when reading an entire wave file at once. Instead, read wave files in chunks.


icon

Inputs/Outputs

  • ci32.png number of samples/ch (-1: all)

    number of samples/ch specifies the number of samples per channel to read from the file. -1 specifies all samples.

  • cbsrn.png sound file refnum

    sound file refnum is the reference to the sound file.

    You generate sound file refnum with the Sound File Open VI.

  • cu16.png position mode

    position mode, together with position offset, specifies where the read operation begins.

    Absolute starts the operation at the beginning of the file plus position offset, so the offset is relative to the beginning of the file. Relative starts the operation at the current location of the file mark plus position offset. The default is Relative.

  • ci32.png position offset

    position offset specifies how far from the location specified by position mode to start reading.

    You express position offset in units of samples. The default is 0.

  • cerrcodeclst.png error in (no error)

    error in describes error conditions that occur before this node runs. This input provides standard error in functionality.

  • ibsrn.png sound file refnum out

    sound file refnum out is the reference to the sound file originally passed in the sound file refnum parameter.

  • i1dwdtint.png data

    data reads any sound data from the file. For multi-channel sound data, data is an array of waveforms where each element of the array is a single channel.

    The specified data type determines the range of values for the sound data.

  • ii32.png offset

    offset indicates the new location of the file mark relative to the beginning of the file, in units of samples.

    The default is 0.

  • ierrcodeclst.png error out

    error out contains error information. This output provides standard error out functionality.

  • ibool.png end of file?

    end of file? returns TRUE when the VI reaches the end of the file.

  • Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Graphics and Sound\Sound\Sound File to Sound Output.vi