<< audioplayer_used | Audio playback | audiosupportedformats >> |
y = audioread(filename) |
[y, fs] = audioread(filename) |
[y, fs] = audioread(filename, range) |
[y, fs] = audioread(filename, type) |
[y, fs] = audioread(filename, range, type) |
a string: an existing filename.
a vector: [start end].
a string: 'double' or 'native'.
a matrix: audio data.
an integer value: sampling rate.
audioread reads an audio file.
Supported format: 'wav', 'ogg', 'flac', 'mp3', 'caf', 'au', 'aiff'. See audiosupportedformats function to have all supported formats.
If type is 'native' then audio data depends on the file format (single, double, integers).
wav_audio = [modulepath('audio'), '/examples/haha.wav'];
[y, fs] = audioread(wav_audio);
playObj = audioplayer(y, fs);
playblocking(playObj)
delete(playObj)
clear playObj
playblocking, audioplayer, audiosupportedformats, audiowrite.
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET