Play sounds in background of GUI Matlab

조회 수: 1 (최근 30일)
Zaid Alyasseri
Zaid Alyasseri 2019년 11월 14일
답변: Walter Roberson 2019년 11월 14일
Hi dear,
I have a GUI to capture the EEG signal during the real-time by using the serial port. I faced a problem when I try to run the sound in the background using the same GUI, the problem in simple the capturing EEG signal will be stopped until the sound finishes. My question is there any method to run both of them (play sounds and capture EEG signals) at the same time using the same button.

답변 (1개)

Walter Roberson
Walter Roberson 2019년 11월 14일
You can use an audioPlayer object with play() method: that defaults to non-blocking. However, it is not all that good at playing continuous sound.
For continuous sound, especially sound that is computed on the fly (such as from the EEG data) then you should use the Audio System Toolbox https://www.mathworks.com/help/audio/gs/real-time-audio-in-matlab.html

카테고리

Help CenterFile Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by