Can audioPlayerRecorder system object input stereo audio?
조회 수: 6 (최근 30일)
이전 댓글 표시
Can the audioPlayerRecorder system object input stereo audio? I know it can output stereo audio, but looking at the diagrams and code examples for the audioPlayerRecorder system object it appears it can only input one channel at a time. Testing my code, when I output stereo audio, audioPlayerRecorder still only inputs a one-channel vector.
댓글 수: 0
답변 (3개)
Astha Singh
2018년 9월 11일
playRec = audioPlayerRecorder
the audio signal read from the device (‘audioFromDevice’) depends on size and data type of the data being written (‘audioToDevice’) to the audio device selected
audioFromDevice = playRec(audioToDevice)
Thus if you are sending a two channel stereo audio data to be played, a two-channel audio data only will be read through the sound card.
댓글 수: 0
JIAHUI LIAO
2021년 9월 15일
You can try like this
aPR = audioPlayerRecorder('SampleRate',fs);
aPR.RecorderChannelMapping = 1:2;
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!