Overview
This VI demonstrates how to open a .WAV file, configure a sound output device (Sound Card) and play the WAV file on the device.
Description
The user is able to specify the number of samples to read from the WAV file per iteration which allows for signal processing before writing the data stream to the output device. The attached example determines the maximum amplitude in the sample set and displays its value on a second graph.
Requirements
- LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
- Download the attached VI (Play WAV File.vi).
- Select a WAV file in the 'WAV file location' control
- Run the VI.
Additional Information or References
The number 'Samples Per Read' control must be set high enough to ensure the loop can fully execute before the device runs out of data to write. The minimum acceptable value is around 2000 depending on your system specs.
VI Snippet


**This document has been updated to meet the current required format for the NI Code Exchange.**