can we access the audio while recording online using matlab?

by using fpga we can do simultaneous tasks like accessing audio while recording. But in matlab, can we do like that? I want to play online while recording.. is it possible with matlab?

 Accepted Answer

I am not sure what "play online while recording" means. You can play and record sounds "simultaneously" with audioplayer/audiorecorder. You cannot access what is being recorded by audiorecorder while it is being recorded. So therefore you cannot play a modified version of your recording as it is being recorded with audioplayer/audiorecorder.
For Windows the data acquisition toolbox will give you a little more flexibility, but the latency will be unknown and variable.
For the best results, you need something based on PortAudio. I recommend the psychtoolbox implementation, even though it comes with lots of unrelated stuff. There are still latency issues, but they are probably as minimal as you can make them without going to specialized hardware.

2 Comments

what i mean to "play online while recording" is "i want record the audio through mic in and i want to play the same audio simultaneously"... is it possible using matlab?
It depends on you definition of simultaneously. Obtaining latencies of less than 5-10 ms is hard with standard soundcards. If you can handle 10-20 ms latency, then look at PsychToolbox, pawavplay, paplayrec or any of the other port audio implementations in MATLAB.

Sign in to comment.

More Answers (0)

Products

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!