added OpenAL device enumeration & selection
This commit is contained in:
parent
4d85dab10b
commit
30b1edf84d
384
VBA.vcproj
384
VBA.vcproj
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="VisualBoyAdvance"
|
||||
ProjectGUID="{6D4C5EC8-933F-4C05-A1BF-498E658576DF}"
|
||||
RootNamespace="VBA"
|
||||
|
@ -129,6 +129,115 @@
|
|||
ExcludedFromBuild="true"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)_temp"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2"
|
||||
BuildLogFile="$(IntDir)\$(ProjectName)_BuildLog.htm"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="MASM"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\dependencies\zlib;..\dependencies\libpng;"..\dependencies\File_Extractor-0.4.2\fex";..\dependencies\cximage;..\dependencies\msvc"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;DEV_VERSION;BKPT_SUPPORT;CRT_SECURE_NO_WARNINGS;HAS_FILE_EXTRACTOR;C_CORE"
|
||||
StringPooling="false"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
SmallerTypeCheck="false"
|
||||
RuntimeLibrary="1"
|
||||
StructMemberAlignment="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="false"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
TreatWChar_tAsBuiltInType="false"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="nafxcwd.lib LIBCMTD.lib Vfw32.Lib OpenGL32.Lib dinput8.lib dxguid.lib ddraw.lib winmm.lib Dsound.lib"
|
||||
OutputFile="$(OutDir)\VisualBoyAdvance.exe"
|
||||
Version=""
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""
|
||||
GenerateManifest="true"
|
||||
AdditionalManifestDependencies="type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'"
|
||||
IgnoreDefaultLibraryNames="nafxcwd.lib;LIBCMTD.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="1"
|
||||
EnableCOMDATFolding="1"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
|
||||
|
@ -251,115 +360,6 @@
|
|||
ExcludedFromBuild="true"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)_temp"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2"
|
||||
BuildLogFile="$(IntDir)\$(ProjectName)_BuildLog.htm"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="MASM"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\dependencies\zlib;..\dependencies\libpng;"..\dependencies\File_Extractor-0.4.2\fex";..\dependencies\cximage;..\dependencies\msvc"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;DEV_VERSION;BKPT_SUPPORT;CRT_SECURE_NO_WARNINGS;HAS_FILE_EXTRACTOR;C_CORE"
|
||||
StringPooling="false"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
SmallerTypeCheck="false"
|
||||
RuntimeLibrary="1"
|
||||
StructMemberAlignment="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="false"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
TreatWChar_tAsBuiltInType="false"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="nafxcwd.lib LIBCMTD.lib Vfw32.Lib OpenGL32.Lib dinput8.lib dxguid.lib ddraw.lib winmm.lib Dsound.lib"
|
||||
OutputFile="$(OutDir)\VisualBoyAdvance.exe"
|
||||
Version=""
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""
|
||||
GenerateManifest="true"
|
||||
AdditionalManifestDependencies="type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'"
|
||||
IgnoreDefaultLibraryNames="nafxcwd.lib;LIBCMTD.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="1"
|
||||
EnableCOMDATFolding="1"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
|
||||
|
@ -528,16 +528,6 @@
|
|||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Assembling $(InputFileName)..."
|
||||
CommandLine="nasm -D__DJGPP__ -f win32 -o "$(IntDir)\$(InputName).obj" "$(InputPath)"
"
|
||||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
|
@ -548,6 +538,16 @@
|
|||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Assembling $(InputFileName)..."
|
||||
CommandLine="nasm -D__DJGPP__ -f win32 -o "$(IntDir)\$(InputName).obj" "$(InputPath)"
"
|
||||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
|
@ -623,16 +623,6 @@
|
|||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Assembling $(InputFileName)..."
|
||||
CommandLine="nasm -D__DJGPP__ -O1 -Isrc/ -f win32 -o "$(IntDir)\$(InputName).obj" "$(InputPath)"
"
|
||||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
|
@ -643,6 +633,16 @@
|
|||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Assembling $(InputFileName)..."
|
||||
CommandLine="nasm -D__DJGPP__ -O1 -Isrc/ -f win32 -o "$(IntDir)\$(InputName).obj" "$(InputPath)"
"
|
||||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
|
@ -667,16 +667,6 @@
|
|||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Assembling $(InputFileName)..."
|
||||
CommandLine="nasm -D__DJGPP__ -O1 -Isrc/ -f win32 -o "$(IntDir)\$(InputName).obj" "$(InputPath)"
"
|
||||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
|
@ -687,6 +677,16 @@
|
|||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Assembling $(InputFileName)..."
|
||||
CommandLine="nasm -D__DJGPP__ -O1 -Isrc/ -f win32 -o "$(IntDir)\$(InputName).obj" "$(InputPath)"
"
|
||||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
|
@ -711,16 +711,6 @@
|
|||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Assembling $(InputFileName)..."
|
||||
CommandLine="nasm -D__DJGPP__ -O1 -Isrc/ -f win32 -o "$(IntDir)\$(InputName).obj" "$(InputPath)"
"
|
||||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
|
@ -731,6 +721,16 @@
|
|||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Assembling $(InputFileName)..."
|
||||
CommandLine="nasm -D__DJGPP__ -O1 -Isrc/ -f win32 -o "$(IntDir)\$(InputName).obj" "$(InputPath)"
"
|
||||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
|
@ -755,16 +755,6 @@
|
|||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Assembling $(InputFileName)..."
|
||||
CommandLine="nasm -D__DJGPP__ -O1 -Isrc/ -f win32 -o "$(IntDir)\$(InputName).obj" "$(InputPath)"
"
|
||||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
|
@ -775,6 +765,16 @@
|
|||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Assembling $(InputFileName)..."
|
||||
CommandLine="nasm -D__DJGPP__ -O1 -Isrc/ -f win32 -o "$(IntDir)\$(InputName).obj" "$(InputPath)"
"
|
||||
Outputs=""$(IntDir)\$(InputName).obj""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
|
@ -1175,30 +1175,6 @@
|
|||
RelativePath=".\src\win32\Logging.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWnd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWndCheats.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWndFile.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWndHelp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWndOptions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWndTools.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MapView.cpp"
|
||||
>
|
||||
|
@ -1223,6 +1199,10 @@
|
|||
RelativePath=".\src\win32\ModeConfirm.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\OALConfig.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\OamView.cpp"
|
||||
>
|
||||
|
@ -1331,6 +1311,34 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="MainWnd"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWnd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWndCheats.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWndFile.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWndHelp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWndOptions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\MainWndTools.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Main"
|
||||
|
@ -1379,7 +1387,7 @@
|
|||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
|
@ -1387,7 +1395,7 @@
|
|||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
|
@ -1737,6 +1745,10 @@
|
|||
RelativePath=".\src\win32\ModeConfirm.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\OALConfig.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\win32\OamView.h"
|
||||
>
|
||||
|
|
|
@ -456,6 +456,7 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
|
|||
ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_DIRECTSOUND, &MainWnd::OnUpdateOutputapiDirectsound)
|
||||
ON_COMMAND(ID_OUTPUTAPI_OPENAL, &MainWnd::OnOutputapiOpenal)
|
||||
ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_OPENAL, &MainWnd::OnUpdateOutputapiOpenal)
|
||||
ON_COMMAND(ID_OUTPUTAPI_OALCONFIGURATION, &MainWnd::OnOutputapiOalconfiguration)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
|
|
|
@ -456,6 +456,7 @@ public:
|
|||
afx_msg void OnUpdateOutputapiDirectsound(CCmdUI *pCmdUI);
|
||||
afx_msg void OnOutputapiOpenal();
|
||||
afx_msg void OnUpdateOutputapiOpenal(CCmdUI *pCmdUI);
|
||||
afx_msg void OnOutputapiOalconfiguration();
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "Throttle.h"
|
||||
#include "WinResUtil.h"
|
||||
#include "SelectPlugin.h"
|
||||
#include "OALConfig.h"
|
||||
|
||||
#include "../System.h"
|
||||
#include "../agbprint.h"
|
||||
|
@ -1990,3 +1991,24 @@ void MainWnd::OnUpdateOutputapiOpenal(CCmdUI *pCmdUI)
|
|||
#endif
|
||||
}
|
||||
|
||||
void MainWnd::OnOutputapiOalconfiguration()
|
||||
{
|
||||
#ifndef NO_OAL
|
||||
OALConfig dlg;
|
||||
|
||||
dlg.selectedDevice = theApp.oalDevice;
|
||||
|
||||
if( dlg.DoModal() == IDOK ) {
|
||||
if( theApp.oalDevice ) {
|
||||
free( theApp.oalDevice );
|
||||
theApp.oalDevice = NULL;
|
||||
}
|
||||
|
||||
theApp.oalDevice = (TCHAR*)malloc( (dlg.selectedDevice.GetLength() + 1) * sizeof( TCHAR ) );
|
||||
_tcscpy( theApp.oalDevice, dlg.selectedDevice.GetBuffer() );
|
||||
|
||||
systemSoundShutdown();
|
||||
systemSoundInit();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
// src/win32/OALConfig.cpp : implementation file
|
||||
//
|
||||
|
||||
#ifndef NO_OAL
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "OALConfig.h"
|
||||
|
||||
// OpenAL
|
||||
#include <al.h>
|
||||
#include <alc.h>
|
||||
#pragma comment( lib, "OpenAL32.lib" )
|
||||
|
||||
|
||||
// OALConfig dialog
|
||||
|
||||
IMPLEMENT_DYNAMIC(OALConfig, CDialog)
|
||||
|
||||
OALConfig::OALConfig(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(OALConfig::IDD, pParent)
|
||||
, selectedDevice(_T(""))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
OALConfig::~OALConfig()
|
||||
{
|
||||
}
|
||||
|
||||
void OALConfig::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_DEVICE, cbDevice);
|
||||
|
||||
if( !pDX->m_bSaveAndValidate ) {
|
||||
// enumerate devices
|
||||
const ALchar *devices = NULL;
|
||||
devices = alcGetString( NULL, ALC_DEVICE_SPECIFIER );
|
||||
if( strlen( devices ) ) {
|
||||
while( *devices ) {
|
||||
cbDevice.AddString( devices );
|
||||
devices += strlen( devices ) + 1;
|
||||
}
|
||||
} else {
|
||||
systemMessage( IDS_OAL_NODEVICE, "There are no sound devices present on this system." );
|
||||
}
|
||||
}
|
||||
DDX_CBString(pDX, IDC_DEVICE, selectedDevice);
|
||||
|
||||
}
|
||||
|
||||
|
||||
BOOL OALConfig::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(OALConfig, CDialog)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// OALConfig message handlers
|
||||
|
||||
#endif
|
|
@ -0,0 +1,31 @@
|
|||
#ifndef NO_OAL
|
||||
|
||||
#pragma once
|
||||
#include "afxwin.h"
|
||||
|
||||
|
||||
// OALConfig dialog
|
||||
|
||||
class OALConfig : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(OALConfig)
|
||||
|
||||
public:
|
||||
OALConfig(CWnd* pParent = NULL); // standard constructor
|
||||
virtual ~OALConfig();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_OAL_CONFIG };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnInitDialog();
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
private:
|
||||
CComboBox cbDevice;
|
||||
public:
|
||||
CString selectedDevice;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -62,7 +62,6 @@ public:
|
|||
private:
|
||||
bool initialized;
|
||||
bool buffersLoaded;
|
||||
bool playing;
|
||||
ALCdevice *device;
|
||||
ALCcontext *context;
|
||||
ALuint buffer[NBUFFERS];
|
||||
|
@ -80,7 +79,6 @@ OpenAL::OpenAL()
|
|||
{
|
||||
initialized = false;
|
||||
buffersLoaded = false;
|
||||
playing = false;
|
||||
device = NULL;
|
||||
context = NULL;
|
||||
memset( buffer, 0, NBUFFERS * sizeof( ALuint ) );
|
||||
|
@ -121,7 +119,7 @@ void OpenAL::debugState()
|
|||
alGetSourcei( source, AL_SOURCE_STATE, &value );
|
||||
assert( AL_NO_ERROR == alGetError() );
|
||||
|
||||
winlog( " playing = %i\n", playing );
|
||||
winlog( " soundPaused = %i\n", soundPaused );
|
||||
winlog( " Source:\n" );
|
||||
winlog( " State: " );
|
||||
switch( value )
|
||||
|
@ -160,7 +158,11 @@ bool OpenAL::init()
|
|||
winlog( "OpenAL::init\n" );
|
||||
assert( initialized == false );
|
||||
|
||||
device = alcOpenDevice( theApp.OpenALAudiomixing ? "Generic Software" : NULL );
|
||||
if( theApp.oalDevice ) {
|
||||
device = alcOpenDevice( theApp.oalDevice );
|
||||
} else {
|
||||
device = alcOpenDevice( NULL );
|
||||
}
|
||||
assert( device != NULL );
|
||||
|
||||
context = alcCreateContext( device, NULL );
|
||||
|
@ -175,20 +177,7 @@ bool OpenAL::init()
|
|||
alGenSources( 1, &source );
|
||||
assert( AL_NO_ERROR == alGetError() );
|
||||
|
||||
switch( soundQuality )
|
||||
{
|
||||
case 4:
|
||||
freq = 11025;
|
||||
break;
|
||||
case 2:
|
||||
freq = 22050;
|
||||
break;
|
||||
default:
|
||||
soundQuality = 1;
|
||||
case 1:
|
||||
freq = 44100;
|
||||
break;
|
||||
}
|
||||
freq = 44100 / soundQuality;
|
||||
|
||||
soundBufferLen = freq * 2 * 2 / 60;
|
||||
// 16bit stereo, buffer can store the sound for 1 frame in 60Hz
|
||||
|
@ -204,7 +193,6 @@ void OpenAL::resume()
|
|||
{
|
||||
winlog( "OpenAL::resume\n" );
|
||||
assert( initialized );
|
||||
playing = true;
|
||||
if( !buffersLoaded ) return;
|
||||
debugState();
|
||||
|
||||
|
@ -224,7 +212,6 @@ void OpenAL::pause()
|
|||
{
|
||||
winlog( "OpenAL::pause\n" );
|
||||
assert( initialized );
|
||||
playing = false;
|
||||
if( !buffersLoaded ) return;
|
||||
debugState();
|
||||
|
||||
|
@ -244,7 +231,6 @@ void OpenAL::reset()
|
|||
{
|
||||
winlog( "OpenAL::reset\n" );
|
||||
assert( initialized );
|
||||
playing = false;
|
||||
if( !buffersLoaded ) return;
|
||||
debugState();
|
||||
|
||||
|
@ -319,7 +305,7 @@ void OpenAL::write()
|
|||
// start playing the source if necessary
|
||||
alGetSourcei( source, AL_SOURCE_STATE, &sourceState );
|
||||
assert( AL_NO_ERROR == alGetError() );
|
||||
if( playing && ( sourceState != AL_PLAYING ) ) {
|
||||
if( !soundPaused && ( sourceState != AL_PLAYING ) ) {
|
||||
alSourcePlay( source );
|
||||
assert( AL_NO_ERROR == alGetError() );
|
||||
}
|
||||
|
|
|
@ -278,6 +278,9 @@ VBA::VBA()
|
|||
pVideoDriverGUID = NULL;
|
||||
renderMethod = DIRECT_DRAW;
|
||||
audioAPI = DIRECTSOUND;
|
||||
#ifndef NO_OAL
|
||||
oalDevice = NULL;
|
||||
#endif
|
||||
iconic = false;
|
||||
ddrawEmulationOnly = false;
|
||||
ddrawUsingEmulationOnly = false;
|
||||
|
@ -304,7 +307,6 @@ VBA::VBA()
|
|||
input = NULL;
|
||||
joypadDefault = 0;
|
||||
autoFire = 0;
|
||||
OpenALAudiomixing = false;
|
||||
autoFireToggle = false;
|
||||
winPauseNextFrame = false;
|
||||
soundRecording = false;
|
||||
|
@ -418,6 +420,12 @@ VBA::~VBA()
|
|||
|
||||
if(rewindMemory)
|
||||
free(rewindMemory);
|
||||
|
||||
#ifndef NO_OAL
|
||||
if( oalDevice ) {
|
||||
free( oalDevice );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1421,7 +1429,6 @@ void VBA::loadSettings()
|
|||
audioAPI = DIRECTSOUND;
|
||||
}
|
||||
|
||||
OpenALAudiomixing = regQueryDwordValue( "OpenALAudiomixing", 0 );
|
||||
windowPositionX = regQueryDwordValue("windowX", 0);
|
||||
if(windowPositionX < 0)
|
||||
windowPositionX = 0;
|
||||
|
@ -1649,6 +1656,15 @@ void VBA::loadSettings()
|
|||
}
|
||||
|
||||
Sm60FPS::bSaveMoreCPU = regQueryDwordValue("saveMoreCPU", 0);
|
||||
|
||||
#ifndef NO_OAL
|
||||
buffer = regQueryStringValue( "oalDevice", "" );
|
||||
if( oalDevice ) {
|
||||
free( oalDevice );
|
||||
}
|
||||
oalDevice = (TCHAR*)malloc( ( buffer.GetLength() + 1 ) * sizeof( TCHAR ) );
|
||||
_tcscpy( oalDevice, buffer.GetBuffer() );
|
||||
#endif
|
||||
}
|
||||
|
||||
void VBA::updateFrameSkip()
|
||||
|
@ -2484,8 +2500,6 @@ void VBA::saveSettings()
|
|||
|
||||
regSetDwordValue("autoFrameSkip", autoFrameSkip);
|
||||
|
||||
regSetDwordValue( "OpenALAudiomixing", OpenALAudiomixing);
|
||||
|
||||
regSetDwordValue("vsync", vsync);
|
||||
regSetDwordValue("synchronize", synchronize);
|
||||
regSetDwordValue("stretch", fullScreenStretch);
|
||||
|
@ -2620,6 +2634,10 @@ void VBA::saveSettings()
|
|||
regSetDwordValue("Linklog", linklog);
|
||||
regSetDwordValue("RFU", adapter);
|
||||
regSetDwordValue("linkEnabled", linkenable);
|
||||
|
||||
#ifndef NO_OAL
|
||||
regSetStringValue( "oalDevice", oalDevice );
|
||||
#endif
|
||||
}
|
||||
|
||||
void winSignal(int, int)
|
||||
|
|
|
@ -148,12 +148,14 @@ class VBA : public CWinApp
|
|||
u32 autoFrameSkipLastTime;
|
||||
bool autoFrameSkip;
|
||||
bool vsync;
|
||||
bool OpenALAudiomixing;
|
||||
bool changingVideoSize;
|
||||
GUID videoDriverGUID;
|
||||
GUID *pVideoDriverGUID;
|
||||
DISPLAY_TYPE renderMethod;
|
||||
AUDIO_API audioAPI;
|
||||
#ifndef NO_OAL
|
||||
TCHAR *oalDevice;
|
||||
#endif
|
||||
bool iconic;
|
||||
bool ddrawEmulationOnly;
|
||||
bool ddrawUsingEmulationOnly;
|
||||
|
|
|
@ -12,6 +12,54 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// German (Germany) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_OAL_CONFIG DIALOGEX 0, 0, 167, 53
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "OpenAL configuration"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,66,36,48,12
|
||||
PUSHBUTTON "Cancel",IDCANCEL,114,36,48,12
|
||||
COMBOBOX IDC_DEVICE,6,18,156,36,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Select device:",IDC_STATIC,6,6,156,12
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_OAL_CONFIG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 160
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 46
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // German (Germany) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
|
@ -1660,6 +1708,7 @@ BEGIN
|
|||
MENUITEM " Use &old synchronization", ID_OPTIONS_SOUND_USEOLDSYNCHRONIZATION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "OpenAL", ID_OUTPUTAPI_OPENAL
|
||||
MENUITEM " Configuration...", ID_OUTPUTAPI_OALCONFIGURATION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Sync game to audio", ID_OPTIONS_EMULATOR_SYNCHRONIZE
|
||||
END
|
||||
|
@ -2151,6 +2200,7 @@ BEGIN
|
|||
"Invalid rewind interval value. Please enter a number between 0 and 600 seconds."
|
||||
IDS_REGISTRY "VisualBoyAdvance no longer uses the registry to store its settings. Your previous settings have been exported into the file: %s"
|
||||
IDS_MOVIE_PLAY "Playing a movie will load a save state which may erase your previous battery saves. Please be sure to have a saved state if you don't want to loose any previous data."
|
||||
IDS_OAL_NODEVICE "There are no sound devices present on this system."
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
#define IDD_GAME_OVERRIDES 156
|
||||
#define IDD_SELECT 159
|
||||
#define IDD_SELECT_PLUGIN 159
|
||||
#define IDD_OAL_CONFIG 160
|
||||
#define IDC_R0 1000
|
||||
#define IDC_EDIT_UP 1000
|
||||
#define IDC_R1 1001
|
||||
|
@ -379,6 +380,7 @@
|
|||
#define IDC_SAVE_OBJ 1138
|
||||
#define IDC_MAP_VIEW_ZOOM 1138
|
||||
#define IDS_MOVIE_PLAY 1138
|
||||
#define IDS_OAL_NODEVICE 1139
|
||||
#define IDC_VIEWER 1140
|
||||
#define IDC_ADDRESSES 1141
|
||||
#define IDC_GO 1143
|
||||
|
@ -508,6 +510,7 @@
|
|||
#define IDC_MIRRORING 1266
|
||||
#define IDC_LY 1267
|
||||
#define IDC_APPENDMODE 1268
|
||||
#define IDC_DEVICE 1269
|
||||
#define ID_HELP_ABOUT 40001
|
||||
#define ID_FILE_EXIT 40002
|
||||
#define ID_OPTIONS_VIDEO_FRAMESKIP_0 40003
|
||||
|
@ -807,14 +810,16 @@
|
|||
#define ID_OUTPUTAPI_DIRECTSOUND 40346
|
||||
#define ID_OUTPUTAPI_OPENAL 40347
|
||||
#define ID_OUTPUTAPI_SOFTWAREMIXING 40348
|
||||
#define ID_OUTPUTAPI_CONFIGURATION 40349
|
||||
#define ID_OUTPUTAPI_OALCONFIGURATION 40350
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 159
|
||||
#define _APS_NEXT_COMMAND_VALUE 40349
|
||||
#define _APS_NEXT_CONTROL_VALUE 1269
|
||||
#define _APS_NEXT_RESOURCE_VALUE 161
|
||||
#define _APS_NEXT_COMMAND_VALUE 40351
|
||||
#define _APS_NEXT_CONTROL_VALUE 1270
|
||||
#define _APS_NEXT_SYMED_VALUE 103
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue