How to put the inputs for audiorecording in a Drop Down on appdesigner?

조회 수: 2 (최근 30일)
Walter Fabián
Walter Fabián 2024년 5월 9일
편집: Mario Malic 2024년 5월 9일
Hello!. I'm trying to create a Drop Down on appdesigner where you can chosse the input for an audiorecording. I mean, choose the microphone. I need to record an audio and then play it. Some ideas? . I puted an image for giving u an idea. Thanks a lot!
  댓글 수: 1
Mann Baidi
Mann Baidi 2024년 5월 9일
Hi,
You can use audiodevinfo function for listing all types of input available for the computer.
If you would like to explore more about the function you can refer to the link mentioned below:

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

답변 (1개)

Mario Malic
Mario Malic 2024년 5월 9일
Hello,
uidropdown consists of several useful properties for your question, Values, Items, ItemsData. You should collect device information with audiodevinfo whose output is a structure with input and output devices.
info = audiodevinfo
You can populate dropdown Items property with corresponding Name property
dropdown.Items = {info.input.Name}
and corresponding device IDs
dropdown.ItemsData = [info.input.ID]
So, when you need to provide ID for the selected device, you can use the Value property of dropdown to obtain it.
When dropdown is populated with ItemsData, Value of the dropdown is the one associated with ItemsData.
  댓글 수: 2
Walter Fabián
Walter Fabián 2024년 5월 9일
편집: Walter Fabián 2024년 5월 9일
I tried this but the options didnt show up. Could u help me? pls .
Mario Malic
Mario Malic 2024년 5월 9일
편집: Mario Malic 2024년 5월 9일
Ah, I forgot. You should make a button with the callback to populate the devices in the dropdown menu. Also, check for App Designer tutorials.

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

카테고리

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

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by