Sound File Info VI

Owning Palette: Sound Files VIs

Requires: Base Development System

Retrieves data about a .wav file. This VI accepts either a path or a refnum.

(Windows) You must have DirectX 8.0 or later to use this VI. (Linux) You must have the Open Sound System (OSS) driver to use this VI.

Example

Use the pull-down menu to select an instance of this VI.

 Add to the block diagram  Find on the palette

Sound File Info

path specifies the absolute path to the wave file. If the path is empty or invalid, the VI returns an error. The default is <Not A Path>.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
path out identifies the wave file passed in path.
total number of samples/ch returns the total number of samples per channel in the wave file.
sound format returns the sample rate, the number of channels, and the number of bits per sample in the wave file.
sample rate (S/s) is the sampling rate for the wave file. Common rates are 44,100 S/s, 22,050 S/s, and 11,025 S/s.
number of channels specifies the number of channels in the wave file. This input can accept as many channels as the sound card supports. For most sound cards 1 is Mono and 2 is Stereo.
bits per sample is the quality of each sample in bits. Common resolutions are 16 bits and 8 bits.
error out contains error information. This output provides standard error out functionality.

Sound File Info (refnum)

sound file refnum is the reference to the sound file. You generate sound file refnum with the Sound File Open VI.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
sound file refnum out is the reference to the sound file originally passed in the sound file refnum parameter.
total number of samples/ch returns the total number of samples per channel in the wave file.
sound format returns the sample rate, the number of channels, and the number of bits per sample in the wave file.
sample rate (S/s) is the sampling rate for the wave file. Common rates are 44,100 S/s, 22,050 S/s, and 11,025 S/s.
number of channels specifies the number of channels in the wave file. This input can accept as many channels as the sound card supports. For most sound cards 1 is Mono and 2 is Stereo.
bits per sample is the quality of each sample in bits. Common resolutions are 16 bits and 8 bits.
error out contains error information. This output provides standard error out functionality.

Example

Refer to the Sound File to Sound Output VI in the labview\examples\Graphics and Sound\Sound directory for an example of using the Sound File Info VI.

 Open example  Find related examples