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

  1. /*
  2.     Company:            Sensaura Ltd
  3.     Copyright:          (C) 2000
  4.  
  5.     File Name:            buffrdlg.h
  6.     File Description:    Header file for declaration of BufferDlg class which creates a 
  7.                         DirectSound3D buffer with ZoomFX support controlled by a dialog box 
  8.                         interface
  9.     Author:                Adam Philp
  10.     Last Update:        04-JAN-00
  11.  
  12.     Target Compiler:    Microsoft Visual C++ Version 5.0
  13. */
  14.  
  15. #ifndef __buffrdlg_h                    // Sentry, use file only if it's not already included
  16. #define __buffrdlg_h
  17.  
  18. /////////////////////// Included files ////////////////////////////////////////////////////////////
  19.  
  20. #include "applicat.h"
  21. #include "buffer.h"
  22.  
  23. ///////////////////////    Class definition //////////////////////////////////////////////////////////
  24.  
  25. /*
  26.     Class:                BufferDlg
  27.     Description:        Dialog class for a DirectSound3D buffer
  28. */
  29.  
  30. class BufferDlg : public Buffer
  31. {
  32.     friend BOOL CALLBACK BufferDlgProc(HWND, UINT, WPARAM, LPARAM);
  33.  
  34. public:                                    // Public constructor and destructor
  35.     BufferDlg();
  36.     ~BufferDlg();
  37.  
  38. public:                                    // Public data members
  39.     HWND m_hWnd;
  40.  
  41. public:                                    // Public member functions
  42.     bool Create(Application*, const char*, LPDIRECTSOUND);
  43.     virtual void Destroy();
  44.     bool Update();
  45.  
  46. protected:                                // Protected member functions
  47.     BOOL OnInitDialog(HWND, WPARAM, LPARAM);
  48.     BOOL OnCommand(WPARAM, LPARAM);
  49.     BOOL OnHScroll(WORD, LONG, HWND);
  50.     void OnDestroy();
  51.  
  52.     BOOL InitControlRanges(LPDIRECTSOUND);
  53.     bool InitControls();
  54.     void EnableZoomFXControls();
  55.  
  56.     bool UpdateFrequency();
  57.     bool UpdateVolume();
  58.     bool RestoreDefaults();
  59.     bool EnableZoomFX(bool);
  60.     bool UpdateMode(WORD);
  61.     bool UpdateMinDistance();
  62.     bool UpdateMaxDistance();
  63.     bool UpdatePosition();
  64.     bool UpdateVelocity();
  65.     bool UpdateInnerConeAngle();
  66.     bool UpdateOuterConeAngle();
  67.     bool UpdateOuterVolume();
  68.     bool UpdateZoomFXExtent();
  69.     bool UpdateZoomFXExtentSymmetrical(bool);
  70.     void UpdateZoomFXOrientation();
  71.     bool CommitZoomFXOrientation();
  72.  
  73.     void UpdateDistanceStatics(D3DVALUE, D3DVALUE);
  74.     void UpdatePositionStatics(LPD3DVECTOR);
  75.     void UpdateVelocityStatics(LPD3DVECTOR);
  76.     void UpdateConeAngleStatics(DWORD, DWORD);
  77.  
  78. protected:                                // Protected data members
  79.     MainWnd*            m_pParent;
  80.     bool                m_bZoomFXEnabled;
  81.     bool                m_bZoomFXSymmetrical;
  82.     ZOOMFX_BOX        m_Extent;
  83.     ZOOMFX_ORIENTATION    m_Orientation;
  84.  
  85.     HWND    m_hPlayBtn, m_hLoopedBtn;
  86.     HWND    m_hDefaultBtn, m_hEnableZoomFXBtn;
  87.     HWND    m_hFormatStatic, m_hPlayCursorStatic, m_hWriteCursorStatic; 
  88.     HWND    m_hFrequencySlider, m_hVolumeSlider;
  89.     HWND    m_hFrequencyStatic, m_hVolumeStatic;
  90.     HWND    m_hNormalBtn, m_hHeadRelativeBtn, m_hDisabledBtn;
  91.     HWND    m_hMinDistanceSlider, m_hMaxDistanceSlider;
  92.     HWND    m_hMinDistanceStatic, m_hMaxDistanceStatic;
  93.     HWND    m_hPositionXSlider, m_hPositionYSlider, m_hPositionZSlider;
  94.     HWND    m_hPositionXStatic, m_hPositionYStatic, m_hPositionZStatic;
  95.     HWND    m_hVelocityXSlider, m_hVelocityYSlider, m_hVelocityZSlider;
  96.     HWND    m_hVelocityXStatic, m_hVelocityYStatic, m_hVelocityZStatic;
  97.     HWND    m_hInnerConeAngleSlider, m_hOuterConeAngleSlider;
  98.     HWND    m_hInnerConeAngleStatic, m_hOuterConeAngleStatic;
  99.     HWND    m_hOuterVolumeSlider, m_hOuterVolumeStatic;
  100.     HWND    m_hZoomFXMaxXSlider, m_hZoomFXMaxYSlider, m_hZoomFXMaxZSlider;
  101.     HWND    m_hZoomFXMaxXStatic, m_hZoomFXMaxYStatic, m_hZoomFXMaxZStatic;
  102.     HWND    m_hZoomFXMinXSlider, m_hZoomFXMinYSlider, m_hZoomFXMinZSlider;
  103.     HWND    m_hZoomFXMinXStatic, m_hZoomFXMinYStatic, m_hZoomFXMinZStatic;
  104.     HWND    m_hZoomFXSymmetricalBtn;
  105.     HWND    m_hZoomFXFrontXSlider, m_hZoomFXFrontYSlider, m_hZoomFXFrontZSlider;
  106.     HWND    m_hZoomFXFrontXStatic, m_hZoomFXFrontYStatic, m_hZoomFXFrontZStatic;
  107.     HWND    m_hZoomFXTopXSlider, m_hZoomFXTopYSlider, m_hZoomFXTopZSlider;
  108.     HWND    m_hZoomFXTopXStatic, m_hZoomFXTopYStatic, m_hZoomFXTopZStatic;
  109.     HWND    m_hZoomFXCommitOrientationBtn;
  110. };
  111.  
  112. #endif                                    // End of sentry __buffrdlg_h