home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************\
- Copyright (C) James Boer, 2002.
- All rights reserved worldwide.
-
- This software is provided "as is" without express or implied
- warranties. You may freely copy and compile this source into
- applications you distribute provided that the copyright text
- below is included in the resulting source code, for example:
- "Portions Copyright (C) James Boer, 2002"
- \***********************************************************/
-
- #include "stdafx.h"
- #include "AudioTest.h"
- #include "AudioTestDlg.h"
-
- #include "System.h"
- #include "Sound2D.h"
- #include "Sound3D.h"
- #include "Listener.h"
- #include "SoundScript.h"
- #include "Segment.h"
- #include "MusicScript.h"
- #include "CDAudio.h"
-
- #include "Audio.h"
-
- using namespace Audio;
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CAudioTestApp
-
- BEGIN_MESSAGE_MAP(CAudioTestApp, CWinApp)
- //{{AFX_MSG_MAP(CAudioTestApp)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG
- ON_COMMAND(ID_HELP, CWinApp::OnHelp)
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CAudioTestApp construction
-
- CAudioTestApp::CAudioTestApp()
- {
- // TODO: add construction code here,
- // Place all significant initialization in InitInstance
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // The one and only CAudioTestApp object
-
- CAudioTestApp theApp;
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CAudioTestApp initialization
-
- BOOL CAudioTestApp::InitInstance()
- {
- // Standard initialization
- // If you are not using these features and wish to reduce the size
- // of your final executable, you should remove from the following
- // the specific initialization routines you do not need.
-
- #ifdef _AFXDLL
- Enable3dControls(); // Call this when using MFC in a shared DLL
- #else
- Enable3dControlsStatic(); // Call this when linking to MFC statically
- #endif
-
- SetDebugLevel(4);
-
- CAudioTestDlg dlg;
-
- CSystem SystemDlg;
- CSound2D Sound2dDlg;
- CSound3D Sound3dDlg;
- CListener ListenerDlg;
- CSoundScript SoundScriptDlg;
- CSegment SegmentDlg;
- CMusicScript MusicScriptDlg;
- CCDAudio CDAudioDlg;
-
- dlg.m_pSystem = &SystemDlg;
- dlg.m_pSound2D = &Sound2dDlg;
- dlg.m_pSound3D = &Sound3dDlg;
- dlg.m_pListener = &ListenerDlg;
- dlg.m_pSoundScript = &SoundScriptDlg;
- dlg.m_pSegment = &SegmentDlg;
- dlg.m_pMusicScript = &MusicScriptDlg;
- dlg.m_pCDAudio = &CDAudioDlg;
-
- SystemDlg.m_pTestDlg = &dlg;
- Sound2dDlg.m_pTestDlg = &dlg;
- Sound3dDlg.m_pTestDlg = &dlg;
- ListenerDlg.m_pTestDlg = &dlg;
- SoundScriptDlg.m_pTestDlg = &dlg;
- SegmentDlg.m_pTestDlg = &dlg;
- MusicScriptDlg.m_pTestDlg = &dlg;
- CDAudioDlg.m_pTestDlg = &dlg;
-
- m_pMainWnd = &dlg;
-
- dlg.AddPage(&SystemDlg);
- dlg.AddPage(&Sound2dDlg);
- dlg.AddPage(&Sound3dDlg);
- dlg.AddPage(&ListenerDlg);
- dlg.AddPage(&SoundScriptDlg);
- dlg.AddPage(&SegmentDlg);
- dlg.AddPage(&MusicScriptDlg);
- dlg.AddPage(&CDAudioDlg);
-
- //CoInitialize(NULL);
-
-
- dlg.DoModal();
-
- AudioMgr()->Term();
-
- //CoUninitialize();
-
- // Since the dialog has been closed, return FALSE so that we exit the
- // application, rather than start the application's message pump.
- return FALSE;
- }
-