Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,40 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Sample Name: VoiceManagement Sample
|
||||
//
|
||||
// Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Description
|
||||
===========
|
||||
The VoiceManagement sample shows how to implement dynamic voice management
|
||||
when creating DirectSound secondary buffers.
|
||||
|
||||
Path
|
||||
====
|
||||
Source: DXSDK\Samples\Multimedia\DSound\VoiceManagement
|
||||
|
||||
Executable: DXSDK\Samples\Multimedia\DSound\Bin
|
||||
|
||||
User's Guide
|
||||
============
|
||||
Load a wave file by clicking Sound File. Select Voice Allocation Flags,
|
||||
Buffer Priority, and Voice Management Flags options. Note that the effect
|
||||
of the selected options is described under Expected Behavior. Create the
|
||||
buffer and play the sound by clicking Play.
|
||||
|
||||
Programming Notes
|
||||
=================
|
||||
For a simpler example of how to setup a DirectSound buffer without
|
||||
voice management flags, see the PlaySound sample.
|
||||
|
||||
To use voice management flags, the buffer must be created using
|
||||
DSBCAPS_LOCDEFER otherwise DirectSound will not be able to dynamically
|
||||
place the buffer in either hardware or software at runtime.
|
||||
|
||||
When playing the buffer just call IDirectSoundBuffer::Play with a
|
||||
valid combination of voice management flags. Run the sample to observe
|
||||
the expected result of any combination of flags.
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by VoiceManagement.rc
|
||||
//
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_MAIN 130
|
||||
#define IDR_ACCELERATOR1 131
|
||||
#define IDC_PLAY 1000
|
||||
#define IDC_STOP 1001
|
||||
#define IDC_LOOP_CHECK 1009
|
||||
#define IDC_SOUNDFILE 1011
|
||||
#define IDC_SOUNDFILE2 1012
|
||||
#define IDC_FILENAME 1015
|
||||
#define IDC_ALLOC_EITHER 1019
|
||||
#define IDC_ALLOC_HARDWARE 1020
|
||||
#define IDC_ALLOC_SOFTWARE 1021
|
||||
#define IDC_BYPRIORTY 1024
|
||||
#define IDC_BYDISTANCE 1025
|
||||
#define IDC_BYTIME 1026
|
||||
#define IDC_EDIT_PRIORITY 1031
|
||||
#define IDC_SPIN_PRIORITY 1032
|
||||
#define IDC_BEHAVIOR 1033
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 132
|
||||
#define _APS_NEXT_COMMAND_VALUE 32772
|
||||
#define _APS_NEXT_CONTROL_VALUE 1034
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,680 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// File: VoiceManagement.cpp
|
||||
//
|
||||
// Desc: Main application file for the VoiceManagement sample.
|
||||
//
|
||||
// Copyright (c) 1999-2001 Microsoft Corp. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
#include <basetsd.h>
|
||||
#include <commdlg.h>
|
||||
#include <commctrl.h>
|
||||
#include <mmreg.h>
|
||||
#include <dxerr8.h>
|
||||
#include <dsound.h>
|
||||
#include "resource.h"
|
||||
#include "DSUtil.h"
|
||||
#include "DXUtil.h"
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Function-prototypes
|
||||
//-----------------------------------------------------------------------------
|
||||
INT_PTR CALLBACK MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
VOID OnInitDialog( HWND hDlg );
|
||||
VOID OnOpenSoundFile( HWND hDlg );
|
||||
HRESULT OnPlaySound( HWND hDlg );
|
||||
VOID OnTimer( HWND hDlg );
|
||||
VOID EnablePlayUI( HWND hDlg, BOOL bShowPlayControl );
|
||||
VOID EnableManagementFlags( HWND hDlg, BOOL bShowFlags );
|
||||
VOID UpdateBehaviorText( HWND hDlg );
|
||||
VOID SetFileUI( HWND hDlg, TCHAR* strFileName );
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Defines, constants, and global variables
|
||||
//-----------------------------------------------------------------------------
|
||||
CSoundManager* g_pSoundManager = NULL;
|
||||
CSound* g_pSound = NULL;
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: WinMain()
|
||||
// Desc: Entry point for the application. Since we use a simple dialog for
|
||||
// user interaction we don't need to pump messages.
|
||||
//-----------------------------------------------------------------------------
|
||||
INT APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR pCmdLine,
|
||||
INT nCmdShow )
|
||||
{
|
||||
InitCommonControls();
|
||||
|
||||
// Display the main dialog box.
|
||||
DialogBox( hInst, MAKEINTRESOURCE(IDD_MAIN), NULL, MainDlgProc );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: MainDlgProc()
|
||||
// Desc: Handles dialog messages
|
||||
//-----------------------------------------------------------------------------
|
||||
INT_PTR CALLBACK MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
switch( msg )
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
OnInitDialog( hDlg );
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch( LOWORD(wParam) )
|
||||
{
|
||||
case IDC_SOUNDFILE:
|
||||
OnOpenSoundFile( hDlg );
|
||||
break;
|
||||
|
||||
case IDCANCEL:
|
||||
EndDialog( hDlg, IDCANCEL );
|
||||
break;
|
||||
|
||||
case IDC_PLAY:
|
||||
// The 'play' button was pressed
|
||||
if( FAILED( hr = OnPlaySound( hDlg ) ) )
|
||||
{
|
||||
DXTRACE_ERR( TEXT("OnPlaySound"), hr );
|
||||
MessageBox( hDlg, "Error playing DirectSound buffer."
|
||||
"Sample will now exit.", "DirectSound Sample",
|
||||
MB_OK | MB_ICONERROR );
|
||||
EndDialog( hDlg, IDABORT );
|
||||
}
|
||||
break;
|
||||
|
||||
case IDC_STOP:
|
||||
if( g_pSound )
|
||||
{
|
||||
g_pSound->Stop();
|
||||
g_pSound->Reset();
|
||||
}
|
||||
|
||||
EnablePlayUI( hDlg, TRUE );
|
||||
break;
|
||||
|
||||
case IDC_ALLOC_HARDWARE:
|
||||
case IDC_ALLOC_EITHER:
|
||||
EnableManagementFlags( hDlg, TRUE );
|
||||
UpdateBehaviorText( hDlg );
|
||||
break;
|
||||
|
||||
case IDC_ALLOC_SOFTWARE:
|
||||
EnableManagementFlags( hDlg, FALSE );
|
||||
UpdateBehaviorText( hDlg );
|
||||
break;
|
||||
|
||||
case IDC_BYTIME:
|
||||
if( IsDlgButtonChecked( hDlg, IDC_BYTIME ) == BST_CHECKED )
|
||||
CheckDlgButton( hDlg, IDC_BYDISTANCE, BST_UNCHECKED );
|
||||
UpdateBehaviorText( hDlg );
|
||||
break;
|
||||
|
||||
case IDC_BYDISTANCE:
|
||||
if( IsDlgButtonChecked( hDlg, IDC_BYDISTANCE ) == BST_CHECKED )
|
||||
CheckDlgButton( hDlg, IDC_BYTIME, BST_UNCHECKED );
|
||||
UpdateBehaviorText( hDlg );
|
||||
break;
|
||||
|
||||
case IDC_BYPRIORTY:
|
||||
UpdateBehaviorText( hDlg );
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE; // Didn't handle message
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_TIMER:
|
||||
OnTimer( hDlg );
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
// Cleanup everything
|
||||
KillTimer( hDlg, 1 );
|
||||
SAFE_DELETE( g_pSound );
|
||||
SAFE_DELETE( g_pSoundManager );
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE; // Didn't handle message
|
||||
}
|
||||
|
||||
return TRUE; // Handled message
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: OnInitDialog()
|
||||
// Desc: Initializes the dialogs (sets up UI controls, etc.)
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID OnInitDialog( HWND hDlg )
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
// Load the icon
|
||||
#ifdef _WIN64
|
||||
HINSTANCE hInst = (HINSTANCE) GetWindowLongPtr( hDlg, GWLP_HINSTANCE );
|
||||
#else
|
||||
HINSTANCE hInst = (HINSTANCE) GetWindowLong( hDlg, GWL_HINSTANCE );
|
||||
#endif
|
||||
HICON hIcon = LoadIcon( hInst, MAKEINTRESOURCE( IDR_MAINFRAME ) );
|
||||
|
||||
// Create a static IDirectSound in the CSound class.
|
||||
// Set coop level to DSSCL_PRIORITY, and set primary buffer
|
||||
// format to stereo, 22kHz and 16-bit output.
|
||||
g_pSoundManager = new CSoundManager();
|
||||
|
||||
if( FAILED( hr = g_pSoundManager->Initialize( hDlg, DSSCL_PRIORITY, 2, 22050, 16 ) ) )
|
||||
{
|
||||
DXTRACE_ERR( TEXT("Initialize"), hr );
|
||||
MessageBox( hDlg, "Error initializing DirectSound. Sample will now exit.",
|
||||
"DirectSound Sample", MB_OK | MB_ICONERROR );
|
||||
EndDialog( hDlg, IDABORT );
|
||||
return;
|
||||
}
|
||||
|
||||
// Check the 'hardware' voice allocation button by default.
|
||||
CheckRadioButton( hDlg, IDC_ALLOC_EITHER, IDC_ALLOC_SOFTWARE, IDC_ALLOC_EITHER );
|
||||
|
||||
HWND hEditPri = GetDlgItem( hDlg, IDC_EDIT_PRIORITY );
|
||||
HWND hSpinPri = GetDlgItem( hDlg, IDC_SPIN_PRIORITY );
|
||||
SendMessage( hSpinPri, UDM_SETBUDDY, (WPARAM) hEditPri, 0 );
|
||||
SendMessage( hSpinPri, UDM_SETRANGE, 0, MAKELONG (0x7FFF, 0) );
|
||||
SendMessage( hSpinPri, UDM_SETPOS, 0, 0 );
|
||||
SendMessage( hEditPri, EM_LIMITTEXT, 5, 0 );
|
||||
|
||||
// Set the icon for this dialog.
|
||||
PostMessage( hDlg, WM_SETICON, ICON_BIG, (LPARAM) hIcon ); // Set big icon
|
||||
PostMessage( hDlg, WM_SETICON, ICON_SMALL, (LPARAM) hIcon ); // Set small icon
|
||||
|
||||
// Create a timer, so we can check for when the soundbuffer is stopped
|
||||
SetTimer( hDlg, 0, 250, NULL );
|
||||
|
||||
// Set the UI controls
|
||||
UpdateBehaviorText( hDlg );
|
||||
SetDlgItemText( hDlg, IDC_FILENAME, TEXT("No file loaded.") );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: OnOpenSoundFile()
|
||||
// Desc: Called when the user requests to open a sound file
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID OnOpenSoundFile( HWND hDlg )
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
static TCHAR strFileName[MAX_PATH] = TEXT("");
|
||||
static TCHAR strPath[MAX_PATH] = TEXT("");
|
||||
|
||||
// Setup the OPENFILENAME structure
|
||||
OPENFILENAME ofn = { sizeof(OPENFILENAME), hDlg, NULL,
|
||||
TEXT("Wave Files\0*.wav\0All Files\0*.*\0\0"), NULL,
|
||||
0, 1, strFileName, MAX_PATH, NULL, 0, strPath,
|
||||
TEXT("Open Sound File"),
|
||||
OFN_FILEMUSTEXIST|OFN_HIDEREADONLY, 0, 0,
|
||||
TEXT(".wav"), 0, NULL, NULL };
|
||||
|
||||
// Get the default media path (something like C:\WINDOWS\MEDIA)
|
||||
if( '\0' == strPath[0] )
|
||||
{
|
||||
GetWindowsDirectory( strPath, MAX_PATH );
|
||||
if( strcmp( &strPath[strlen(strPath)], TEXT("\\") ) )
|
||||
strcat( strPath, TEXT("\\") );
|
||||
strcat( strPath, TEXT("MEDIA") );
|
||||
}
|
||||
|
||||
if( g_pSound )
|
||||
{
|
||||
g_pSound->Stop();
|
||||
g_pSound->Reset();
|
||||
}
|
||||
|
||||
// Update the UI controls to show the sound as loading a file
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_PLAY ), FALSE);
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_STOP ), FALSE);
|
||||
SetDlgItemText( hDlg, IDC_FILENAME, TEXT("Loading file...") );
|
||||
|
||||
// Display the OpenFileName dialog. Then, try to load the specified file
|
||||
if( TRUE != GetOpenFileName( &ofn ) )
|
||||
{
|
||||
SetDlgItemText( hDlg, IDC_FILENAME, TEXT("Load aborted.") );
|
||||
return;
|
||||
}
|
||||
|
||||
SetDlgItemText( hDlg, IDC_FILENAME, TEXT("") );
|
||||
|
||||
// Free any previous sound, and make a new one
|
||||
SAFE_DELETE( g_pSound );
|
||||
|
||||
// Load the wave file into a DirectSound buffer
|
||||
if( FAILED( hr = g_pSoundManager->Create( &g_pSound, strFileName,
|
||||
DSBCAPS_LOCDEFER, GUID_NULL ) ) )
|
||||
{
|
||||
// Not a critical failure, so just update the status
|
||||
DXTRACE_ERR_NOMSGBOX( TEXT("Create"), hr );
|
||||
SetDlgItemText( hDlg, IDC_FILENAME, TEXT("Could not create sound buffer.") );
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the UI controls to show the sound as the file is loaded
|
||||
SetDlgItemText( hDlg, IDC_FILENAME, strFileName );
|
||||
EnablePlayUI( hDlg, TRUE );
|
||||
|
||||
// Remember the path for next time
|
||||
strcpy( strPath, strFileName );
|
||||
char* strLastSlash = strrchr( strPath, '\\' );
|
||||
strLastSlash[0] = '\0';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: OnPlaySound()
|
||||
// Desc: User hit the "Play" button
|
||||
//-----------------------------------------------------------------------------
|
||||
HRESULT OnPlaySound( HWND hDlg )
|
||||
{
|
||||
HRESULT hr;
|
||||
LONG lPriority;
|
||||
DWORD dwPlayFlags;
|
||||
BOOL bLooped;
|
||||
BOOL bAllocHW;
|
||||
BOOL bAllocSW;
|
||||
BOOL bAllocEither;
|
||||
BOOL bByTime;
|
||||
BOOL bByDistance;
|
||||
BOOL bByPriority;
|
||||
|
||||
bLooped = ( IsDlgButtonChecked( hDlg, IDC_LOOP_CHECK ) == BST_CHECKED );
|
||||
|
||||
// Determine where the buffer would like to be allocated
|
||||
bAllocHW = ( IsDlgButtonChecked( hDlg, IDC_ALLOC_HARDWARE ) == BST_CHECKED );
|
||||
bAllocSW = ( IsDlgButtonChecked( hDlg, IDC_ALLOC_SOFTWARE ) == BST_CHECKED );
|
||||
bAllocEither = ( IsDlgButtonChecked( hDlg, IDC_ALLOC_EITHER ) == BST_CHECKED );
|
||||
|
||||
if( bAllocHW || bAllocEither )
|
||||
{
|
||||
// Determine how the buffer should steal hardware resources (if they are not available)
|
||||
bByTime = ( IsDlgButtonChecked( hDlg, IDC_BYTIME ) == BST_CHECKED );
|
||||
bByDistance = ( IsDlgButtonChecked( hDlg, IDC_BYDISTANCE ) == BST_CHECKED );
|
||||
bByPriority = ( IsDlgButtonChecked( hDlg, IDC_BYPRIORTY ) == BST_CHECKED );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Buffers running in software are not allowed to have
|
||||
// voice management flags since they have no need to
|
||||
// steal hardware resources.
|
||||
bByTime = FALSE;
|
||||
bByDistance = FALSE;
|
||||
bByPriority = FALSE;
|
||||
}
|
||||
|
||||
// Get the buffer priority
|
||||
TCHAR strText[MAX_PATH];
|
||||
GetDlgItemText( hDlg, IDC_EDIT_PRIORITY, strText, MAX_PATH );
|
||||
lPriority = atol( strText );
|
||||
|
||||
if( lPriority < 0 || lPriority > 32767 )
|
||||
{
|
||||
MessageBox( hDlg, "Please enter a buffer priority between 0 and 32767",
|
||||
"DirectSound Sample", MB_OK );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// Figure out the voice allocation flag from the dialog,
|
||||
// and what the user should expect based on the dialog choice
|
||||
if( bAllocSW )
|
||||
dwPlayFlags = DSBPLAY_LOCSOFTWARE;
|
||||
|
||||
if( bAllocHW )
|
||||
dwPlayFlags = DSBPLAY_LOCHARDWARE;
|
||||
|
||||
if( bAllocEither )
|
||||
dwPlayFlags = 0;
|
||||
|
||||
// Figure out what voice management flags should be based on the dlg
|
||||
if( bByTime )
|
||||
{
|
||||
if( bByPriority )
|
||||
{
|
||||
dwPlayFlags |= DSBPLAY_TERMINATEBY_TIME |
|
||||
DSBPLAY_TERMINATEBY_PRIORITY;
|
||||
}
|
||||
else
|
||||
{
|
||||
dwPlayFlags |= DSBPLAY_TERMINATEBY_TIME;
|
||||
}
|
||||
}
|
||||
else if( bByDistance )
|
||||
{
|
||||
if( bByPriority )
|
||||
{
|
||||
dwPlayFlags |= DSBPLAY_TERMINATEBY_DISTANCE |
|
||||
DSBPLAY_TERMINATEBY_PRIORITY;
|
||||
}
|
||||
else
|
||||
{
|
||||
dwPlayFlags |= DSBPLAY_TERMINATEBY_DISTANCE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( bByPriority )
|
||||
{
|
||||
dwPlayFlags |= DSBPLAY_TERMINATEBY_PRIORITY;
|
||||
}
|
||||
else
|
||||
{
|
||||
dwPlayFlags |= 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( bLooped )
|
||||
dwPlayFlags |= DSBPLAY_LOOPING;
|
||||
|
||||
// Play the sound
|
||||
if( FAILED( hr = g_pSound->Play( lPriority, dwPlayFlags ) ) )
|
||||
{
|
||||
if( hr == DSERR_CONTROLUNAVAIL ||
|
||||
hr == DSERR_INVALIDCALL ||
|
||||
hr == E_FAIL ||
|
||||
hr == E_NOTIMPL)
|
||||
{
|
||||
DXTRACE_ERR_NOMSGBOX( TEXT("Play"), hr );
|
||||
if( hr == DSERR_INVALIDCALL )
|
||||
{
|
||||
MessageBox( hDlg, "Unsupported wave file format.",
|
||||
"DirectPlay Sample", MB_OK | MB_ICONERROR );
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox( hDlg, "The buffer could not be played.",
|
||||
"DirectPlay Sample", MB_OK | MB_ICONERROR );
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return DXTRACE_ERR( TEXT("Play"), hr );
|
||||
}
|
||||
|
||||
// Update the UI controls to show the sound as playing
|
||||
EnablePlayUI( hDlg, FALSE );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: OnTimer()
|
||||
// Desc: When we think the sound is playing this periodically checks to see if
|
||||
// the sound has stopped. If it has then updates the dialog.
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID OnTimer( HWND hDlg )
|
||||
{
|
||||
if( IsWindowEnabled( GetDlgItem( hDlg, IDC_STOP ) ) )
|
||||
{
|
||||
// We think the sound is playing, so see if it has stopped yet.
|
||||
if( !g_pSound->IsSoundPlaying() )
|
||||
{
|
||||
// Update the UI controls to show the sound as stopped
|
||||
EnablePlayUI( hDlg, TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: UpdateBehaviorText()
|
||||
// Desc: Figure out what the expected behavoir is based on the dialog,
|
||||
// and display it on the dialog
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID UpdateBehaviorText( HWND hDlg )
|
||||
{
|
||||
TCHAR strExcepted[1024];
|
||||
BOOL bAllocHW;
|
||||
BOOL bAllocSW;
|
||||
BOOL bAllocEither;
|
||||
BOOL bByTime;
|
||||
BOOL bByDistance;
|
||||
BOOL bByPriority;
|
||||
|
||||
// Determine where the buffer would like to be allocated
|
||||
bAllocHW = ( IsDlgButtonChecked( hDlg, IDC_ALLOC_HARDWARE ) == BST_CHECKED );
|
||||
bAllocSW = ( IsDlgButtonChecked( hDlg, IDC_ALLOC_SOFTWARE ) == BST_CHECKED );
|
||||
bAllocEither = ( IsDlgButtonChecked( hDlg, IDC_ALLOC_EITHER ) == BST_CHECKED );
|
||||
|
||||
if( bAllocHW || bAllocEither )
|
||||
{
|
||||
// Determine how the buffer should steal hardware resources (if they are not available)
|
||||
bByTime = ( IsDlgButtonChecked( hDlg, IDC_BYTIME ) == BST_CHECKED );
|
||||
bByDistance = ( IsDlgButtonChecked( hDlg, IDC_BYDISTANCE ) == BST_CHECKED );
|
||||
bByPriority = ( IsDlgButtonChecked( hDlg, IDC_BYPRIORTY ) == BST_CHECKED );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Buffers running in software are not allowed to have
|
||||
// voice management flags since they have no need to
|
||||
// steal hardware resources.
|
||||
bByTime = FALSE;
|
||||
bByDistance = FALSE;
|
||||
bByPriority = FALSE;
|
||||
}
|
||||
|
||||
// Figure what the user should expect based on the dialog choice
|
||||
if( bAllocSW )
|
||||
{
|
||||
strcpy( strExcepted, "The new sound will be played in software" );
|
||||
}
|
||||
|
||||
if( bAllocHW )
|
||||
{
|
||||
strcpy( strExcepted, "The new sound will be played in hardware" );
|
||||
}
|
||||
|
||||
if( bAllocEither )
|
||||
{
|
||||
strcpy( strExcepted, "The new sound will be played in hardware "
|
||||
"if available" );
|
||||
}
|
||||
|
||||
if( bByTime )
|
||||
{
|
||||
if( bByPriority )
|
||||
{
|
||||
if( bAllocEither )
|
||||
{
|
||||
strcpy( strExcepted, "The new sound will be played in hardware, "
|
||||
"if the the hardware has no available "
|
||||
"voices, and new sound has a higher priority "
|
||||
"than sounds currently playing in hardware "
|
||||
"then sound with the lowest priority will be "
|
||||
"terminated and the new sound will play in "
|
||||
"hardware. Otherwise, the new sound will play "
|
||||
"in software. In event of a priority tie, "
|
||||
"then the buffer with the least time left to "
|
||||
"play will be prematurely terminated." );
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat( strExcepted, ", and if the hardware has no available "
|
||||
"voices, the voice management buffer with "
|
||||
"the lowest priority as set by the "
|
||||
"IDirectSoundBuffer::Play priority argument "
|
||||
"will be prematurely terminated. In event "
|
||||
"of a priority tie, then the buffer with "
|
||||
"the least time left to play will be "
|
||||
"prematurely terminated." );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat( strExcepted, ", and if the hardware has no available "
|
||||
"voices, the voice management buffer with "
|
||||
"the least time left to play will be "
|
||||
"prematurely terminated." );
|
||||
}
|
||||
}
|
||||
else if( bByDistance )
|
||||
{
|
||||
if( bByPriority )
|
||||
{
|
||||
if( bAllocEither )
|
||||
{
|
||||
strcpy( strExcepted, "The new sound will be played in hardware, "
|
||||
"if the the hardware has no available "
|
||||
"voices, and new sound has a higher priority "
|
||||
"than sounds currently playing in hardware "
|
||||
"then sound with the lowest priority will be "
|
||||
"terminated and the new sound will play in "
|
||||
"hardware. Otherwise, the new sound will play "
|
||||
"in software. In event of a priority tie, "
|
||||
"then the buffer which is the furthest "
|
||||
"distance from the listener at the time "
|
||||
"of the Play will be prematurely terminated." );
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat( strExcepted, ", and if the hardware has no available "
|
||||
"voices, the voice management buffer with "
|
||||
"the lowest priority as set by the "
|
||||
"IDirectSoundBuffer::Play priority argument "
|
||||
"will be prematurely terminated. In event "
|
||||
"of a priority tie, then the buffer which "
|
||||
"is the furthest distance from the "
|
||||
"listener at the time of the Play will "
|
||||
"be prematurely terminated." );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat( strExcepted, ", and if the hardware has no available "
|
||||
"voices, the voice management buffer which "
|
||||
"is the furthest distance from the "
|
||||
"listener at the time of the Play will "
|
||||
"be prematurely terminated." );
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( bByPriority )
|
||||
{
|
||||
if( bAllocEither )
|
||||
{
|
||||
strcpy( strExcepted, "The new sound will be played in hardware, "
|
||||
"if the the hardware has no available "
|
||||
"voices, and new sound has a higher priority "
|
||||
"than sounds currently playing in hardware "
|
||||
"then sound with the lowest priority will be "
|
||||
"terminated and the new sound will play in "
|
||||
"hardware. Otherwise, the new sound will play "
|
||||
"in software." );
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat( strExcepted, ", and if the hardware has no available "
|
||||
"voices, the voice management buffer with "
|
||||
"the lowest priority as set by the "
|
||||
"IDirectSoundBuffer::Play priority argument "
|
||||
"will be prematurely terminated. " );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat( strExcepted, ", and the buffer will not steal any "
|
||||
"hardware resources." );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Tell the user what to expect
|
||||
SetDlgItemText( hDlg, IDC_BEHAVIOR, strExcepted );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: EnablePlayUI()
|
||||
// Desc: Enables or disables the Play UI controls
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID EnablePlayUI( HWND hDlg, BOOL bShowPlayControl )
|
||||
{
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_LOOP_CHECK ), bShowPlayControl );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_STOP ), !bShowPlayControl );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_PLAY ), bShowPlayControl );
|
||||
|
||||
// Don't allow the voice allocation or voicemanagement flags
|
||||
// to be changed when a sound is playing
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_BYTIME ), bShowPlayControl );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_BYDISTANCE ), bShowPlayControl );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_BYPRIORTY ), bShowPlayControl );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_EDIT_PRIORITY ), bShowPlayControl );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_ALLOC_HARDWARE ), bShowPlayControl );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_ALLOC_SOFTWARE ), bShowPlayControl );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_ALLOC_EITHER ), bShowPlayControl );
|
||||
|
||||
if( bShowPlayControl )
|
||||
{
|
||||
// If the software alloc flag is checked, then don't enable
|
||||
// the voice management flags
|
||||
if( IsDlgButtonChecked( hDlg, IDC_ALLOC_SOFTWARE ) == BST_CHECKED )
|
||||
EnableManagementFlags( hDlg, FALSE );
|
||||
}
|
||||
|
||||
if( bShowPlayControl )
|
||||
SetFocus( GetDlgItem( hDlg, IDC_PLAY ) );
|
||||
else
|
||||
SetFocus( GetDlgItem( hDlg, IDC_STOP ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: EnableManagementFlags()
|
||||
// Desc: Enable or disable the voice management flags
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID EnableManagementFlags( HWND hDlg, BOOL bShowFlags )
|
||||
{
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_BYTIME ), bShowFlags );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_BYDISTANCE ), bShowFlags );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_BYPRIORTY ), bShowFlags );
|
||||
EnableWindow( GetDlgItem( hDlg, IDC_EDIT_PRIORITY ), bShowFlags );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
# Microsoft Developer Studio Project File - Name="VoiceManagement" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=VoiceManagement - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "voicemanagement.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "voicemanagement.mak" CFG="VoiceManagement - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "VoiceManagement - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "VoiceManagement - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "VoiceManagement - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\common\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 comctl32.lib dxerr8.lib winmm.lib dsound.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /stack:0x200000,0x200000
|
||||
|
||||
!ELSEIF "$(CFG)" == "VoiceManagement - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\common\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 comctl32.lib dxerr8.lib winmm.lib dsound.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /stack:0x200000,0x200000
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "VoiceManagement - Win32 Release"
|
||||
# Name "VoiceManagement - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voicemanagement.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\directx.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voicemanagement.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\src\dsutil.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\include\dsutil.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\src\dxutil.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\include\dxutil.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readme.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "VoiceManagement"=.\voicemanagement.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on voicemanagement.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=VoiceManagement - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to VoiceManagement - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "VoiceManagement - Win32 Release" && "$(CFG)" != "VoiceManagement - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "voicemanagement.mak" CFG="VoiceManagement - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "VoiceManagement - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "VoiceManagement - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "VoiceManagement - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\voicemanagement.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\dsutil.obj"
|
||||
-@erase "$(INTDIR)\dxutil.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\voicemanagement.obj"
|
||||
-@erase "$(INTDIR)\voicemanagement.res"
|
||||
-@erase "$(OUTDIR)\voicemanagement.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "..\..\common\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\voicemanagement.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\voicemanagement.res" /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\voicemanagement.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=comctl32.lib dxerr8.lib winmm.lib dsound.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\voicemanagement.pdb" /machine:I386 /out:"$(OUTDIR)\voicemanagement.exe" /stack:0x200000,0x200000
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\voicemanagement.obj" \
|
||||
"$(INTDIR)\dsutil.obj" \
|
||||
"$(INTDIR)\dxutil.obj" \
|
||||
"$(INTDIR)\voicemanagement.res"
|
||||
|
||||
"$(OUTDIR)\voicemanagement.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "VoiceManagement - Win32 Debug"
|
||||
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\voicemanagement.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\dsutil.obj"
|
||||
-@erase "$(INTDIR)\dxutil.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(INTDIR)\voicemanagement.obj"
|
||||
-@erase "$(INTDIR)\voicemanagement.res"
|
||||
-@erase "$(OUTDIR)\voicemanagement.exe"
|
||||
-@erase "$(OUTDIR)\voicemanagement.ilk"
|
||||
-@erase "$(OUTDIR)\voicemanagement.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /I "..\..\common\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\voicemanagement.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\voicemanagement.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\voicemanagement.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=comctl32.lib dxerr8.lib winmm.lib dsound.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\voicemanagement.pdb" /debug /machine:I386 /out:"$(OUTDIR)\voicemanagement.exe" /pdbtype:sept /stack:0x200000,0x200000
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\voicemanagement.obj" \
|
||||
"$(INTDIR)\dsutil.obj" \
|
||||
"$(INTDIR)\dxutil.obj" \
|
||||
"$(INTDIR)\voicemanagement.res"
|
||||
|
||||
"$(OUTDIR)\voicemanagement.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("voicemanagement.dep")
|
||||
!INCLUDE "voicemanagement.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "voicemanagement.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "VoiceManagement - Win32 Release" || "$(CFG)" == "VoiceManagement - Win32 Debug"
|
||||
SOURCE=.\voicemanagement.cpp
|
||||
|
||||
"$(INTDIR)\voicemanagement.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
|
||||
SOURCE=.\voicemanagement.rc
|
||||
|
||||
"$(INTDIR)\voicemanagement.res" : $(SOURCE) "$(INTDIR)"
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=..\..\common\src\dsutil.cpp
|
||||
|
||||
"$(INTDIR)\dsutil.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=..\..\common\src\dxutil.cpp
|
||||
|
||||
"$(INTDIR)\dxutil.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
||||
"#ifdef _WIN32\r\n"
|
||||
"LANGUAGE 9, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#endif\r\n"
|
||||
"#include ""afxres.rc"" // Standard components\r\n"
|
||||
"#endif\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON DISCARDABLE "directx.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_MAIN DIALOGEX 0, 0, 299, 188
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Voice Management Sample"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Sound &file...",IDC_SOUNDFILE,7,7,46,13
|
||||
LTEXT "Static",IDC_FILENAME,57,7,235,13,SS_CENTERIMAGE,
|
||||
WS_EX_CLIENTEDGE
|
||||
GROUPBOX "Voice Allocation Flags",IDC_STATIC,7,24,93,50
|
||||
CONTROL "Hardware",IDC_ALLOC_HARDWARE,"Button",
|
||||
BS_AUTORADIOBUTTON,19,35,48,10
|
||||
CONTROL "Software",IDC_ALLOC_SOFTWARE,"Button",
|
||||
BS_AUTORADIOBUTTON,19,46,48,10
|
||||
CONTROL "Either",IDC_ALLOC_EITHER,"Button",BS_AUTORADIOBUTTON,19,
|
||||
58,48,10
|
||||
GROUPBOX "Buffer Priority",IDC_STATIC,108,24,64,50
|
||||
EDITTEXT IDC_EDIT_PRIORITY,119,44,39,14,ES_AUTOHSCROLL
|
||||
CONTROL "Spin1",IDC_SPIN_PRIORITY,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS |
|
||||
UDS_NOTHOUSANDS,153,41,11,14
|
||||
GROUPBOX "Voice Management Flags",IDC_STATIC,179,24,113,50
|
||||
CONTROL "Terminate By Time",IDC_BYTIME,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,190,35,75,10
|
||||
CONTROL "Terminate By Distance",IDC_BYDISTANCE,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,190,46,87,10
|
||||
CONTROL "Terminate By Priority",IDC_BYPRIORTY,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,190,57,80,10
|
||||
GROUPBOX "Expected Behavior",IDC_STATIC,7,76,285,74
|
||||
LTEXT "Static",IDC_BEHAVIOR,15,86,269,58
|
||||
CONTROL "&Loop sound",IDC_LOOP_CHECK,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,7,154,53,10
|
||||
PUSHBUTTON "&Play",IDC_PLAY,7,167,50,14,WS_DISABLED
|
||||
PUSHBUTTON "&Stop",IDC_STOP,58,167,50,14,WS_DISABLED
|
||||
PUSHBUTTON "E&xit",IDCANCEL,242,167,50,14
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_MAIN, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 292
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 181
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accelerator
|
||||
//
|
||||
|
||||
IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE
|
||||
BEGIN
|
||||
"F", IDC_SOUNDFILE, VIRTKEY, ALT, NOINVERT
|
||||
"L", IDC_LOOP_CHECK, VIRTKEY, ALT, NOINVERT
|
||||
"P", IDC_PLAY, VIRTKEY, ALT, NOINVERT
|
||||
"S", IDC_STOP, VIRTKEY, ALT, NOINVERT
|
||||
"X", IDCANCEL, VIRTKEY, ALT, NOINVERT
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
#endif
|
||||
#include "afxres.rc" // Standard components
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
Reference in New Issue
Block a user