Anda di halaman 1dari 3

WaveIO: A Soundcard Interface for LabView

Author: C. Zeitnitz

Last modified: November 2010

Features:

Play and Record sound via the soundcard from LabView (™ by National Instruments) utilizing
the Windows Sound API.

• All sampling rates supported by the soundcard can be selected


• The number of channels supported by the soundcard can be selected. E.g. a 5.1 sound
system allows to play 6 channels.
• Resolution of up to 32Bits (if supported by hardware). Most cards are limited to 16Bit and
some work up to 24Bits.
• Multiple soundcard support

More Information:
Most modern soundcards support not only standard sampling rates of up to 44.1kHz, but will work
up to 100kSamples at 16Bit resolution. This is even true for low cost soundcards. The provided
windows DLL and the interface VIs allow to select all possible combinations of channel numbers,
sampling rates and resolutions. The number of used buffers is user selectable for input and
output of data. The buffer size can be defined in terms of time (msec) or samples per buffer and
channel.

LabView example VIs to play multiple channels as well as the recording of sound data are
provided in the package.

The above example opens a sound device to record data. After starting the device the data are
read in a loop and displayed in a graph until either the stop button is pressed, or an error occurs.
When the sound device is no longer needed by the application it has to be stopped and closed.
A user selectable timeout should avoid any hangup within the DLL code. The DLL makes only
Windows system calls and does not use any LabView libraries.

Currently the code supports only PCM data. No other sound codecs are supported at this time!

Requirements
This program has been tested under Windows 2000/XP/Vista/7 with LabView 7.1 or above. Be
aware, that the load on the machine can be substantial, if multiple channels are used with high
sampling rates. For an output of 6 channels to a 5.1 soundcard with 100kHz the transfer rate of
the data is already 1.2MBytes per second (16Bit resolution) ! So, choose the parameters acording
to the ability of your system and monitor the load !

Terms of usage
This Software and all previous versions are NO Freeware!
The use of the software and of the documentation is granted free of charge for private and non-
commercial use in educational institutions. Any commercial application, distribution and sale is
prohibited. For commercial usage contact the author!
All right reserved.

Downloads

Version 0.70:

• Windows Dll, LabView lib, examples and manual: waveio_v070.zip


• Only the Manual

Changes

• Added routines for wave file recording


• Improved performance: reentrant VIs for play back and recording and optimized
synchronization of i/o threads

Version 0.60:

• Windows Dll, LabView lib, examples and manual: waveio_v060.zip


• Only the Manual

Changes

• Improved handling of multiple simultaneously used sound cards for play back and
recording
• Examples for multi sound card support
Instructions:

• Unpack the file into a directory of your choice


• Copy waveio.llb and waveio.dll into the LabView user.lib directory
• Start one of the sample VIs
• Enjoy !

Anda mungkin juga menyukai