System object: dsp.AudioFileReader
Package: dsp

Read audio samples from audio file


AUDIO = step(H)
[AUDIO,EOF] = step(H)


AUDIO = step(H) outputs one frame of audio samples, AUDIO. You can specify the number of times to play the file using the PlayCount property. After playing the file for the number of times you specify, AUDIO contains silence.

[AUDIO,EOF] = step(H) returns an end-of-file indicator, EOF. EOF is true each time the output AUDIO contains the last audio sample in the file.

    Note:   H specifies the System object™ on which to run this step method.

    The object performs an initialization the first time the step method is executed. This initialization locks nontunable properties and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.

Was this topic helpful?