23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2audioplayer<br />

Purpose Create an audio player object<br />

Syntax y = audioplayer(x,Fs)<br />

y = audioplayer(x,Fs,nbits)<br />

audioplayer<br />

Description Note To use all of the audioplayer features, your system needs a properly<br />

installed and configured sound card with 8- and 16-bit I/O, two channels, and<br />

support for sampling rates of up to 48 kHz.<br />

y = audioplayer(x,Fs) returns a handle to an audio player object y using<br />

input audio signal x. The input signal x can be a vector or two-dimensional<br />

array containing single, double, int8, uint8, or int16 <strong>MATLAB</strong> data types.<br />

The input sample values for single and double data must be between -1 and<br />

1. For int8, uint8 and int16 data, the ranges of sample values are -128 to 127,<br />

0 to 255, and -32768 to 32767, respectively.<br />

Fs is the sampling rate in Hz to use for playback. Valid values for Fs depend on<br />

the specific audio hardware installed. Typical values supported by most sound<br />

cards are 8000, 11025, 22050, and 44100 Hz.<br />

y = audioplayer(x,Fs,nbits) returns a handle to an audio player object<br />

where nbits is the bit quantization to use for single or double data types. This<br />

is an optional parameter with a default value of 16. Valid values for nbits are<br />

8 and 16. You do not need to specify nbits for int8 or uint8 or for int16 data<br />

because the quantization is set automatically to 8 or 16, respectively.<br />

After you create an audio player object, you can use the methods listed below<br />

on that object. y in each function is the name of the returned audio player. Each<br />

2-69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!