필터 지우기
필터 지우기

How to access both channels of soundcard

조회 수: 2 (최근 30일)
seme
seme 2013년 9월 8일
Could anyone has any idea how i could access both channels of sound card at the same time .
Thank you

채택된 답변

Jan
Jan 2013년 9월 8일
It depends on what "access" exactly means. If you show us, how you access one channel, an answer might be very easy. If you e.g. use the audio-recorder and mean capturing a stereo signal, there should not be a problem at all.
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 9월 8일
Right, it normally happens automatically if you are using the default audio.
If the sound card is being access through the data acquisition toolbox then we need to know more about it.
seme
seme 2013년 9월 9일
편집: Walter Roberson 2013년 9월 9일
Thank you Jan Simon
Here is an example code to output to the sound card that i try
AO = analogoutput('winsound',0);
chan = addchannel(AO,2);
duration =1;
SampleRate = 44100;
set(AO,'SampleRate',SampleRate)
set(AO,'TriggerType','Manual')
NumSamples = SampleRate*duration;
x = linspace(0,2*pi*500,NumSamples);
y = linspace(0,(2*pi*500)-1.57,NumSamples);
data = sin(x)';
data1=sin(y)';
putdata(AO,data)
start(AO)
trigger(AO)
waittilstop(AO,5)
delete(AO)
clear AO
what i want is to output the data1(Sin(y)) in the second channel(channel 2)) , while I send to data(Sin(x)) sound card to channel 1
Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile 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!

Translated by