필터 지우기
필터 지우기

How to identify the default audio device

조회 수: 8 (최근 30일)
Do.
Do. 2017년 3월 20일
댓글: Alain Kuchta 2017년 4월 20일
Calling audioplayer with ID=-1 will use the default output audiodevice, but how can I know which one is the default when I have multiple devices availabe on the system ? I tried audiodevinfo(0,-1), but this returns an error. Is the default always the first device on the list returned by audiodevinfo ?

답변 (1개)

Alain Kuchta
Alain Kuchta 2017년 3월 22일
The default audio device for recording or playing sound is determined by the operating system and is typically a user-customization preference. For example, in Windows 10, default audio devices are selected via Control Panel -> Hardware and Sound -> Sound.
MATLAB uses the default audio device as selected by the operating system. The default is not always the first device on the list returned by audiodevinfo.
Can you give more detail about the workflow for which you need to know which audio device will be used as the default?
  댓글 수: 2
Do.
Do. 2017년 3월 23일
I use audioplayer with the default output device to play sounds in a routine used for experiments. I assume the default playback device will be correctly selected by the user (me or another) in the OS settings when the experiment is performed, but these are likely to be changed by other users between two experiments, so I would like to automatically save this information along with the results of the experiment, in a MAT file, so as to be able to check the settings in retrospect when I analyze the results.
So if I understand correctly, MATLAB just passes the information to the OS that the default should be used, but cannot access the default settings information from the OS ? So there is no way to monitor and save the OS settings from MATLAB as I would like to do ?
Alain Kuchta
Alain Kuchta 2017년 4월 20일
@Do. Yes, your understanding is correct.

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

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by