To download NI software, including the products shown below, visit ni.com/downloads.
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
Steps to Implement or Execute Code
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.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.