home *** CD-ROM | disk | FTP | other *** search
/ Game Audio Programming / GameAudioProgramming.iso / Game_Audio / AudioTest / AudioTest.cpp next >
Encoding:
C/C++ Source or Header  |  2002-07-10  |  3.5 KB  |  132 lines

  1. /***********************************************************\
  2. Copyright (C) James Boer, 2002. 
  3. All rights reserved worldwide.
  4.  
  5. This software is provided "as is" without express or implied
  6. warranties. You may freely copy and compile this source into
  7. applications you distribute provided that the copyright text
  8. below is included in the resulting source code, for example:
  9. "Portions Copyright (C) James Boer, 2002"
  10. \***********************************************************/
  11.  
  12. #include "stdafx.h"
  13. #include "AudioTest.h"
  14. #include "AudioTestDlg.h"
  15.  
  16. #include "System.h"
  17. #include "Sound2D.h"
  18. #include "Sound3D.h"
  19. #include "Listener.h"
  20. #include "SoundScript.h"
  21. #include "Segment.h"
  22. #include "MusicScript.h"
  23. #include "CDAudio.h"
  24.  
  25. #include "Audio.h"
  26.  
  27. using namespace Audio;
  28.  
  29. #ifdef _DEBUG
  30. #define new DEBUG_NEW
  31. #undef THIS_FILE
  32. static char THIS_FILE[] = __FILE__;
  33. #endif
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CAudioTestApp
  37.  
  38. BEGIN_MESSAGE_MAP(CAudioTestApp, CWinApp)
  39.     //{{AFX_MSG_MAP(CAudioTestApp)
  40.         // NOTE - the ClassWizard will add and remove mapping macros here.
  41.         //    DO NOT EDIT what you see in these blocks of generated code!
  42.     //}}AFX_MSG
  43.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  44. END_MESSAGE_MAP()
  45.  
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CAudioTestApp construction
  48.  
  49. CAudioTestApp::CAudioTestApp()
  50. {
  51.     // TODO: add construction code here,
  52.     // Place all significant initialization in InitInstance
  53. }
  54.  
  55. /////////////////////////////////////////////////////////////////////////////
  56. // The one and only CAudioTestApp object
  57.  
  58. CAudioTestApp theApp;
  59.  
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CAudioTestApp initialization
  63.  
  64. BOOL CAudioTestApp::InitInstance()
  65. {
  66.     // Standard initialization
  67.     // If you are not using these features and wish to reduce the size
  68.     //  of your final executable, you should remove from the following
  69.     //  the specific initialization routines you do not need.
  70.  
  71. #ifdef _AFXDLL
  72.     Enable3dControls();            // Call this when using MFC in a shared DLL
  73. #else
  74.     Enable3dControlsStatic();    // Call this when linking to MFC statically
  75. #endif
  76.  
  77.     SetDebugLevel(4);
  78.  
  79.     CAudioTestDlg dlg;
  80.  
  81.     CSystem SystemDlg;
  82.     CSound2D Sound2dDlg;
  83.     CSound3D Sound3dDlg;
  84.     CListener ListenerDlg;
  85.     CSoundScript SoundScriptDlg;
  86.     CSegment SegmentDlg;
  87.     CMusicScript MusicScriptDlg;
  88.     CCDAudio CDAudioDlg;
  89.  
  90.     dlg.m_pSystem = &SystemDlg;
  91.     dlg.m_pSound2D = &Sound2dDlg;
  92.     dlg.m_pSound3D = &Sound3dDlg;
  93.     dlg.m_pListener = &ListenerDlg;
  94.     dlg.m_pSoundScript = &SoundScriptDlg;
  95.     dlg.m_pSegment = &SegmentDlg;
  96.     dlg.m_pMusicScript = &MusicScriptDlg;
  97.     dlg.m_pCDAudio = &CDAudioDlg;
  98.  
  99.     SystemDlg.m_pTestDlg = &dlg;
  100.     Sound2dDlg.m_pTestDlg = &dlg;
  101.     Sound3dDlg.m_pTestDlg = &dlg;
  102.     ListenerDlg.m_pTestDlg = &dlg;
  103.     SoundScriptDlg.m_pTestDlg = &dlg;
  104.     SegmentDlg.m_pTestDlg = &dlg;
  105.     MusicScriptDlg.m_pTestDlg = &dlg;
  106.     CDAudioDlg.m_pTestDlg = &dlg;
  107.  
  108.     m_pMainWnd = &dlg;
  109.  
  110.     dlg.AddPage(&SystemDlg);
  111.     dlg.AddPage(&Sound2dDlg);
  112.     dlg.AddPage(&Sound3dDlg);
  113.     dlg.AddPage(&ListenerDlg);
  114.     dlg.AddPage(&SoundScriptDlg);
  115.     dlg.AddPage(&SegmentDlg);
  116.     dlg.AddPage(&MusicScriptDlg);
  117.     dlg.AddPage(&CDAudioDlg);
  118.  
  119.     //CoInitialize(NULL);
  120.  
  121.  
  122.     dlg.DoModal();
  123.  
  124.     AudioMgr()->Term();
  125.  
  126.     //CoUninitialize();
  127.  
  128.     // Since the dialog has been closed, return FALSE so that we exit the
  129.     //  application, rather than start the application's message pump.
  130.     return FALSE;
  131. }
  132.