User`s guide
To Wave Device
5-444
5To Wave Device
Purpose Send audio data to a standard audio device in real-time (Windows only).
Library DSP Sinks
Description The To Wave Device block sends audio data to a standard Windows audio 
device in real-time. It is compatible with most popular Windows hardware, 
including Sound Blaster cards. (Models that contain both this block and the 
From Wave Device block require a duplex-capable sound card.) The data is sent 
to the hardware in uncompressed PCM (pulse code modulation) format, and 
should typically be sampled at one of the standard Windows audio device rates: 
8000, 11025, 22050, or 44100 Hz. Some hardware may support other rates in 
addition to these. 
The 
Use default audio device parameter allows the block to detect and use the 
system’s default audio hardware. This option should be selected on systems 
that have a single sound device installed, or when the default sound device on 
a multiple-device system is the desired target. In cases when the default sound 
device is not the desired output device, deselect 
Use default audio device, and 
enter the desired device identification number in the 
Audio device ID 
parameter. The device ID is an integer value that the block associates with the 
sound device. A 3-device system, for example, has device ID numbers of 
1, 2, 
and
3. 
The input to the block, u, can contain audio data from a mono or stereo signal. 
A mono signal is represented as either a sample-based scalar or frame-based 
length-M vector, while a stereo signal is represented as a sample-based 
length-2 vector or frame-based M-by-2 matrix. If the input data type is 
double, 
single, or int16, the block conveys the signal samples to the audio device 
using 16 bits. If the input data type is 
uint8, the block conveys the signal 
samples to the audio device using 8 bits.
sound(u,Fs,bits) % Equivalent MATLAB code
Note that the block does not support uint16 or int8 data types. The 16-bit 
sample width requires more memory but in general yields better fidelity. The 
amplitude of the input should be in the range ±1. Values outside this range are 
clipped to the nearest allowable value.










