MATLAB: Sound audio playing and recording simultaneously

daqsound

Is it necessary to use DAQ toolbox to realize simultaneous audio playing and recording via sound card? Can audioplayer and audiorecorder objects achieve that?

Best Answer

  • It is necessary to use either DAQ or DSP to get simultaneous audio playing and recording if you want the two to be synchronized.
    If you do not care about the two being synchronized, the audioplayer() play() method is asynchronous, and the audiorecorder() record() method is also asynchronous, so you can start one and then the other while still being able to react to user events.