Error trying to play sound

9 visualizzazioni (ultimi 30 giorni)
tan
tan il 4 Giu 2014
Commentato: Star Strider il 5 Giu 2014
Hi i wanted to use "play" to play the audioplayer(data,fs). 'GUI1' is a .m and .fig.
[data,fs]=wavread('test');
play(audioplayer(data,fs))
error:
Error using GUI1>play
Too many input arguments.
Error in GUI1>buttonPlay_Callback (line 286)
play(player);
Error in gui_mainfcn (line 96)
feval(varargin{:});
Please help, How can i solve this?
  1 Commento
tan
tan il 4 Giu 2014
I saw 1 explanation is that maybe there are hidden function in the matlab that takes some input argument. But i do not know how to find out the hidden function and solve it. Any one knows how?

Accedi per commentare.

Risposta accettata

Star Strider
Star Strider il 4 Giu 2014
Use the soundsc function instead:
soundsc(data,fs)
The play function is for audioplayer objects. You seem to have a ‘.wav’ file instead, so soundsc or sound would likely work best for you here.
  4 Commenti
tan
tan il 5 Giu 2014
Thank you!!
Star Strider
Star Strider il 5 Giu 2014
My pleasure!

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by