X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa95f52ee73cad88cfc111bd2eb9107c01eb1ba8..83ef322ddde548f8a0614fb9ac10a8875f652d61:/utils/wxMMedia2/sample/test_med2.cpp diff --git a/utils/wxMMedia2/sample/test_med2.cpp b/utils/wxMMedia2/sample/test_med2.cpp index a6bc06ddaa..26b7dfaaf2 100644 --- a/utils/wxMMedia2/sample/test_med2.cpp +++ b/utils/wxMMedia2/sample/test_med2.cpp @@ -9,14 +9,16 @@ #include #include #include "../lib/sndoss.h" +#include "../lib/sndesd.h" #include "../lib/sndwav.h" #include "../lib/sndaiff.h" class MyApp: public wxApp { bool OnInit() { - wxSoundStreamOSS *oss_dev = new wxSoundStreamOSS(); +// wxSoundStreamOSS *oss_dev = new wxSoundStreamOSS(); + wxSoundStreamESD *oss_dev = new wxSoundStreamESD(); wxFileInputStream *f_input = new wxFileInputStream(argv[1]); - wxSoundFileStream *wav_file = new wxSoundAiff(*f_input, *oss_dev); + wxSoundFileStream *wav_file; wxFrame *frame = new wxFrame(NULL, -1, "My Frame"); wxSoundFormatPcm pcm; @@ -25,6 +27,13 @@ class MyApp: public wxApp { return FALSE; } + wav_file = new wxSoundWave(*f_input, *oss_dev); + if (!wav_file->CanRead()) { + wav_file = new wxSoundAiff(*f_input, *oss_dev); + if (!wav_file->CanRead()) + return FALSE; + } + wav_file->Play(); frame->Show(TRUE); return TRUE;