From: Guilhem Lavaux Date: Sun, 9 Jan 2000 15:13:57 +0000 (+0000) Subject: Some other mini test I used for wxmedia2 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a5f4a1bdc8a6038a2ee4a4f842d0246514af4818 Some other mini test I used for wxmedia2 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/wxMMedia2/sample/test_med3.cpp b/utils/wxMMedia2/sample/test_med3.cpp new file mode 100644 index 0000000000..8d34c964e1 --- /dev/null +++ b/utils/wxMMedia2/sample/test_med3.cpp @@ -0,0 +1,23 @@ +// -------------------------------------------------------------------------- +// Name: test_med.cpp +// Purpose: +// Date: 08/11/1999 +// Author: Guilhem Lavaux (C) 1999 +// CVSID: $Id$ +// -------------------------------------------------------------------------- +#include +#include +#include +#include "../lib/vidxanm.h" + +class MyApp: public wxApp { + bool OnInit() { + wxFileInputStream *file = new wxFileInputStream(argv[1]); + wxVideoXANIM *vidxanm = new wxVideoXANIM(*file); + + vidxanm->Play(); + return TRUE; + } +}; + +IMPLEMENT_APP(MyApp) diff --git a/utils/wxMMedia2/sample/test_med4.cpp b/utils/wxMMedia2/sample/test_med4.cpp new file mode 100644 index 0000000000..86c7d2cf7d --- /dev/null +++ b/utils/wxMMedia2/sample/test_med4.cpp @@ -0,0 +1,54 @@ +// -------------------------------------------------------------------------- +// Name: test_med.cpp +// Purpose: +// Date: 08/11/1999 +// Author: Guilhem Lavaux (C) 1999 +// CVSID: $Id$ +// -------------------------------------------------------------------------- +#include +#include +#include +#include +#include "../lib/sndoss.h" +#include "../lib/sndwav.h" +#include "../lib/sndaiff.h" +#include "../lib/sndwin.h" + +class MyApp: public wxApp { + wxSoundStream *oss_dev; + wxOutputStream *f_output; + wxSoundFileStream *wav_file; + + bool OnInit() { + wxFrame *frame = new wxFrame(NULL, -1, "My Frame"); + wxSoundFormatPcm pcm; + + oss_dev = new wxSoundStreamWin(); + f_output = new wxFileOutputStream(argv[1]); + wav_file = new wxSoundWave(*f_output, *oss_dev); + + if (oss_dev->GetError() != wxSOUND_NOERR) { + wxPrintf("No device\n"); + return FALSE; + } + + pcm.SetSampleRate(22050); + pcm.SetBPS(8); + pcm.SetChannels(1); + + wav_file->SetSoundFormat(pcm); + + // Record 10 sec of sound + wav_file->Record(10); + frame->Show(TRUE); + return TRUE; + } + int OnExit() { + delete wav_file; + delete f_output; + delete oss_dev; + return 0; + } +}; + +IMPLEMENT_APP(MyApp) diff --git a/utils/wxMMedia2/sample/test_med5.cpp b/utils/wxMMedia2/sample/test_med5.cpp new file mode 100644 index 0000000000..c5e095ca5a --- /dev/null +++ b/utils/wxMMedia2/sample/test_med5.cpp @@ -0,0 +1,22 @@ +// -------------------------------------------------------------------------- +// Name: test_med.cpp +// Purpose: +// Date: 08/11/1999 +// Author: Guilhem Lavaux (C) 1999 +// CVSID: $Id$ +// -------------------------------------------------------------------------- +#include +#include +#include +#include "../lib/cdunix.h" + +class MyApp: public wxApp { + bool OnInit() { + wxCDAudioLinux m_cd; + + m_cd.Play(m_cd.GetToc().GetTrackTime(0),m_cd.GetToc().GetTrackTime(1)); + return TRUE; + } +}; + +IMPLEMENT_APP(MyApp)