playerObj = audioplayer(y, fs)
playerObj = audioplayer(y, fs, nbits)
playerObj = audioplayer(y, fs, nbits, id)
| Parameter | Description |
|---|---|
| y | a vector or matrix array: int8,uint8, int16, single or double. |
| fs | a double value: sampling rate in Hz. |
| nbits | a double value: bits per sample (16 by default). |
| id | a double value: device identifier (-1 by default). |
| Parameter | Description |
|---|---|
| playerObj | audioplayer object |
audioplayer returns an audioplayer object to play data on an output device.
audioplayer object uses global scope and need to be deleted by user.
audioplayer can play multichannels data if your sound card supports it.
signal = rand(2, 44100) - 0.5;
playObj = audioplayer(signal, 44100, 16)
play(playObj)
sleep(2)
delete(playObj)
playObj
| Version | Description |
|---|---|
| 1.0.0 | initial version |