]>
Commit | Line | Data |
---|---|---|
354616b0 GL |
1 | // -------------------------------------------------------------------------- |
2 | // Name: test_med.cpp | |
3 | // Purpose: | |
4 | // Date: 08/11/1999 | |
5 | // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999 | |
6 | // CVSID: $Id$ | |
7 | // -------------------------------------------------------------------------- | |
8 | #include <wx/app.h> | |
9 | #include <wx/wfstream.h> | |
10 | #include <wx/frame.h> | |
11 | #include "../lib/sndoss.h" | |
12 | #include "../lib/sndwav.h" | |
13 | #include "../lib/sndaiff.h" | |
14 | ||
15 | class MyApp: public wxApp { | |
16 | bool OnInit() { | |
17 | wxSoundStreamOSS *oss_dev = new wxSoundStreamOSS(); | |
18 | wxFileInputStream *f_input = new wxFileInputStream(argv[1]); | |
aa95f52e | 19 | wxSoundFileStream *wav_file = new wxSoundAiff(*f_input, *oss_dev); |
354616b0 GL |
20 | wxFrame *frame = new wxFrame(NULL, -1, "My Frame"); |
21 | wxSoundFormatPcm pcm; | |
22 | ||
23 | if (oss_dev->GetError() != wxSOUND_NOERR) { | |
24 | wxPrintf("No device\n"); | |
25 | return FALSE; | |
26 | } | |
27 | ||
28 | wav_file->Play(); | |
29 | frame->Show(TRUE); | |
30 | return TRUE; | |
31 | } | |
32 | }; | |
33 | ||
34 | IMPLEMENT_APP(MyApp) |