home *** CD-ROM | disk | FTP | other *** search
/ Game Audio Programming / GameAudioProgramming.iso / Extras / Sensaura / SDK1.0 / data1.cab / Example_Files / ZFXCons / buffer.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-13  |  2.3 KB  |  81 lines

  1. /*
  2.     Company:            Sensaura Ltd
  3.     Copyright:          (C) 2000
  4.  
  5.     File Name:            buffer.h
  6.     File Description:    Header file for declaration of Buffer class for a DirectSound buffer with
  7.                         ZoomFX support
  8.     Author:                Adam Philp
  9.     Last Update:        04-JAN-00
  10.  
  11.     Target Compiler:    Microsoft Visual C++ Version 5.0
  12. */
  13.  
  14. #ifndef __buffer_h                        // Sentry, use file only if it's not already included
  15. #define __buffer_h
  16.  
  17. /////////////////////// Included files ////////////////////////////////////////////////////////////
  18.  
  19. #include <dsound.h>
  20. #include "wavefile.h"                    // WAVE file support object declaration
  21. #include "zoomfx.h"                        // ZoomFX API declaration
  22.  
  23. class Buffer
  24. {
  25. public:                                    // Public constructor & destructor
  26.     Buffer();
  27.     ~Buffer();
  28.  
  29. public:                                    // Public member functions
  30.     bool Create(const char*, LPDIRECTSOUND);
  31.     virtual void Destroy();
  32.  
  33.     bool IsPlaying();
  34.     bool Play(bool bLooping = false);
  35.     bool Stop();
  36.     bool Rewind();
  37.                                         // IDirectSoundBuffer/IDirectSound3DBuffer wrappers
  38.     bool GetCaps(LPDSBCAPS);        
  39.     bool GetCurrentPosition(DWORD* pdwPlayCursor = NULL, DWORD* pdwWriteCursor = NULL);
  40.     bool GetFormat(LPWAVEFORMATEX);
  41.     bool GetFrequency(DWORD*);
  42.     bool GetVolume(long*);
  43.  
  44.     bool GetAllParameters(LPDS3DBUFFER);
  45.  
  46.     bool SetFrequency(DWORD);
  47.     bool SetVolume(long);
  48.  
  49.     bool SetAllParameters(LPCDS3DBUFFER, DWORD);
  50.     bool SetConeAngles(DWORD, DWORD, DWORD);
  51.     bool SetConeOutsideVolume(LONG, DWORD);
  52.     bool SetMinDistance(D3DVALUE, DWORD);
  53.     bool SetMaxDistance(D3DVALUE, DWORD);
  54.     bool SetMode(DWORD, DWORD);
  55.     bool SetPosition(D3DVALUE, D3DVALUE, D3DVALUE, DWORD);
  56.     bool SetVelocity(D3DVALUE, D3DVALUE, D3DVALUE, DWORD);
  57.  
  58.     bool CanDoZoomFX();
  59.  
  60.     bool GetAllZoomFX(ZOOMFX_BUFFERPROPERTIES*);
  61.     bool GetZoomFXExtent(ZOOMFX_BOX*);
  62.     bool GetZoomFXOrientation(ZOOMFX_ORIENTATION*);
  63.  
  64.     bool SetAllZoomFX(const ZOOMFX_BUFFERPROPERTIES*);
  65.     bool SetZoomFXExtent(const ZOOMFX_BOX*);
  66.     bool SetZoomFXOrientation(const ZOOMFX_ORIENTATION*);
  67.  
  68. protected:                                // Protected member functions
  69.     bool GetZoomFXProperty(ULONG, PVOID, ULONG);
  70.     bool SetZoomFXProperty(ULONG, PVOID, ULONG);
  71.  
  72. protected:                                // Protected data members
  73.     LPDIRECTSOUNDBUFFER        m_pBuffer;
  74.     LPDIRECTSOUND3DBUFFER    m_p3dBuffer;
  75.     LPKSPROPERTYSET            m_pKsPropertySet;
  76.  
  77.     WaveFile                m_File;
  78. };
  79.  
  80. #endif                                    // End of sentry __buffer_h
  81.