Controlling Sound in GUI
2 views (last 30 days)
Show older comments
I've created a program, and I want the user to have music while it's running. I tried to use the 'audioplayer' function, but I couldn't get the music to play. To get around this, I added in the Window Media Player activex. I've figure out how to get it to start or stop playing with a toggle button, but I wan't to assign the volume to a slider. I can't figure out how to do this. I would also like to assign the mute feature to a check box. How do I do this?
1 Comment
Geoff Hayes
on 19 Apr 2015
Darryl - see one of the "answers" at http://www.mathworks.com/matlabcentral/answers/94399-how-can-i-play-a-windows-media-file-using-the-appropriate-activex-control-in-my-gui-in-matlab which asks the question on how to control the volume. Perhaps you can access the volume with the handles.activex1.settings.volume (or something similar).
By the way, what problems did you have with the audioplayer?
Answers (0)
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!