From f739a5d07cace97d6cfd6a526b682460b0e20b38 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 25 Jun 2006 15:23:42 +0000 Subject: [PATCH] New code from Marten --- audio.cc | 2 ++ audiomvp.cc | 2 -- audiowin.cc | 11 ++++++----- videowin.cc | 40 ++++++++++++++++++++++++++++++++++++++-- videowin.h | 6 ++++++ 5 files changed, 52 insertions(+), 9 deletions(-) diff --git a/audio.cc b/audio.cc index 0ce36dc..a601421 100644 --- a/audio.cc +++ b/audio.cc @@ -27,6 +27,8 @@ Audio::Audio() if (instance) return; instance = this; memset(&Aoffset, 0, sizeof(Aoffset)); + userMute = 0; + systemMute = 0; } Audio::~Audio() diff --git a/audiomvp.cc b/audiomvp.cc index 3ef84e1..d826534 100644 --- a/audiomvp.cc +++ b/audiomvp.cc @@ -28,8 +28,6 @@ AudioMVP::AudioMVP() streamType = 0; volume = 20; muted = 0; - userMute = 0; - systemMute = 0; } AudioMVP::~AudioMVP() diff --git a/audiowin.cc b/audiowin.cc index 097247f..3ab1b78 100644 --- a/audiowin.cc +++ b/audiowin.cc @@ -89,32 +89,32 @@ int AudioWin::play() { if (!initted) return 0; firstsynched=false; + return ((VideoWin*)Video::getInstance())->dsplay(); - return 1; } int AudioWin::stop() { if (!initted) return 0; - return 1; + return ((VideoWin*)Video::getInstance())->dsstop(); } int AudioWin::pause() { if (!initted) return 0; - return 1; + return ((VideoWin*)Video::getInstance())->dspause(); } int AudioWin::unPause() { if (!initted) return 0; - return 1; + return ((VideoWin*)Video::getInstance())->dsunPause(); } int AudioWin::reset() { if (!initted) return 0; - return 1; + return ((VideoWin*)Video::getInstance())->dsreset(); } int AudioWin::setVolume(int tvolume) @@ -277,3 +277,4 @@ int AudioWin::test() } #endif + diff --git a/videowin.cc b/videowin.cc index 35ddff6..e610a84 100644 --- a/videowin.cc +++ b/videowin.cc @@ -198,6 +198,12 @@ int VideoWin::sync() #define DO_VIDEO int VideoWin::play() +{ + if (!initted) return 0; + return 1; +} + +int VideoWin::dsplay() { if (!initted) return 0; @@ -303,7 +309,7 @@ int VideoWin::play() return 1; } -int VideoWin::stop() +int VideoWin::dsstop() { if (!initted) return 0; @@ -313,7 +319,23 @@ int VideoWin::stop() return 1; } +int VideoWin::stop() +{ + if (!initted) return 0; + + + return 1; +} + int VideoWin::reset() +{ + if (!initted) return 0; + + + return 1; +} + +int VideoWin::dsreset() { if (!initted) return 0; videoposx=0; @@ -323,14 +345,27 @@ int VideoWin::reset() return 1; } -int VideoWin::pause() +int VideoWin::dspause() { if (!initted) return 0; if (dsmediacontrol) dsmediacontrol->Pause(); return 1; } +int VideoWin::pause() +{ + if (!initted) return 0; + + return 1; +} + int VideoWin::unPause() // FIXME get rid - same as play!! +{//No on windows this is not the same, I don't get rid of! + if (!initted) return 0; + return 1; +} + +int VideoWin::dsunPause() // FIXME get rid - same as play!! {//No on windows this is not the same, I don't get rid of! if (!initted) return 0; if (dsmediacontrol) dsmediacontrol->Run(); @@ -728,3 +763,4 @@ int VideoWin::test2() } #endif + diff --git a/videowin.h b/videowin.h index 23f558f..23da5fe 100644 --- a/videowin.h +++ b/videowin.h @@ -58,12 +58,17 @@ class VideoWin : public Video int setPosition(int x, int y); int sync(); int play(); + int dsplay(); int stop(); + int dsstop(); int pause(); + int dspause(); int unPause(); + int dsunPause(); int fastForward(); int unFastForward(); int reset(); + int dsreset(); int blank(); int signalOn(); int signalOff(); @@ -143,3 +148,4 @@ private: #endif + -- 2.39.2