Main Content

waitfor

Wait for playback and/or recording to end

Since R2025a

    Description

    waitfor(as) blocks MATLAB® execution until the audiostreamer is finished both playing and recording.

    waitfor(as,mode) blocks execution until the specified mode of the audiostreamer is finished.

    Input Arguments

    collapse all

    The audiostreamer object that is playing and/or recording the audio.

    The audiostreamer mode to wait for, specified as "player", "recorder", or "both".

    Data Types: char | string

    Version History

    Introduced in R2025a