Fixed wxMemoryOutputStream (it wasn't working at all)

Fixed wxStreamBuffer to support features of wxMemoryOutputStream
wxMMedia2 updates (various fixes)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1999-11-06 17:44:03 +00:00
parent 81915974f6
commit 56dc1ffd50
20 changed files with 257 additions and 87 deletions

View File

@@ -9,14 +9,16 @@
#include <wx/wfstream.h>
#include <wx/frame.h>
#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;