How to put the inputs for audiorecording in a Drop Down on appdesigner?
3 次查看(过去 30 天)
显示 更早的评论
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
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
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 个评论
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 Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!