Ruby Forum wxRuby > How can I play files .mp3 and midi ??

Posted by Pat Kiatchaipipat (blitzer)
on 11.03.2008 09:20
I use

    def button_event3()
      Sound.new('destiny.wav').play
    end

and I can play normally but this can't use with .mp3 and midi files. how
can I play it?? it work for .wav only??
Posted by Alex Fenton (Guest)
on 11.03.2008 10:21
(Received via mailing list)
Pat Kiatchaipipat wrote:
> and I can play normally but this can't use with .mp3 and midi files. how
> can I play it?? it work for .wav only??
>   
Yes, Wx::Sound is intended only for playing short .wav sounds.

You can use Wx::MediaCtrl to play mp3, if your platform supports that
format (definitely yes for Windows and OS X).

alex
Posted by Pat Kiatchaipipat (blitzer)
on 11.03.2008 12:21
thank you! I just see mediaCtrl in wxruby it can play mp3 :D