soundobj.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE:  soundobj.h
00004 
00005     DESCRIPTION:  Sound plug-in object base class
00006 
00007     CREATED BY:  Rolf Berteig
00008 
00009     HISTORY: created 2 July 1995
00010 
00011  *> Copyright (c) 1994, All Rights Reserved.
00012  **********************************************************************/
00013 
00014 #pragma once
00015 
00016 #include "maxheap.h"
00017 #include <WTypes.h>
00018 
00019 #pragma warning(push) 
00020 #pragma warning(disable:4201)
00021 #include <vfw.h>
00022 #pragma warning(pop) 
00023 
00024 #include "interval.h"
00025 #include "ref.h"
00026 #include "plugapi.h"
00027 
00028 #define I_WAVEPAINT 94
00029 
00030 // A SoundObject implements this interface to let the TrackBar paint a waveform.
00031 class IWavePaint: public MaxHeapOperators {
00032 public:
00033     virtual void PaintWave(HDC hdc, RECT* rect, Interval i) = 0;
00034     };
00035 
00052 class SoundObj : public ReferenceTarget {
00053     public:
00054         virtual SClass_ID SuperClassID() {return SClass_ID(SOUNDOBJ_CLASS_ID);}     
00055 
00070         virtual BOOL Play(TimeValue tStart,TimeValue t0,TimeValue t1,TimeValue frameStep)=0;
00079         virtual void Scrub(TimeValue t0,TimeValue t1)=0;
00082         virtual TimeValue Stop()=0;
00085         virtual TimeValue GetTime()=0;
00087         virtual BOOL Playing()=0;
00096         virtual void SaveSound(PAVIFILE pfile,TimeValue t0,TimeValue t1)=0;
00103         virtual void SetMute(BOOL mute)=0;
00105         virtual BOOL IsMute()=0;
00106     };
00107 
00108 
00112 CoreExport SoundObj *NewDefaultSoundObj();
00113