Clearing The cAudio trunk for the new cmake
This commit is contained in:
parent
0c9ae2fc36
commit
6dde5fd37e
|
@ -1,8 +0,0 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../bin/linux-x86 -lcAudio
|
||||
|
||||
OBJECT=main.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial1_2DSound $(LDFLAGS)
|
|
@ -1,73 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="Tutorial1:2DSound" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial1_2DSound_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Debug\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="cAudio_d" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial1_2DSound" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Release\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
<Add library="cAudio" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial1_2DSound_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Compiler>
|
||||
<Add option="/Zi /D_DEBUG" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="/DEBUG" />
|
||||
<Add library="cAudio_d.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial1_2DSound" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Linker>
|
||||
<Add library="cAudio.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add directory="..\..\bin\win32-gcc" />
|
||||
</Linker>
|
||||
<Unit filename="main.cpp" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<debugger />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
|
@ -1,189 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="Tutorial1_2DSound"
|
||||
ProjectGUID="{D7A934F9-003B-47F7-AAD6-F360A4D41B9B}"
|
||||
RootNamespace="Tutorial1_2DSound"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio_d.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_d.exe"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
EnableIntrinsicFunctions="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio.lib"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="false"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,226 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial1_2DSound_d */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tutorial1_2DSound_d; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8DD76F660486A84900D96B5E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* Tutorial1_2DSound */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7BB8FF0A1146FF150002B220 /* Frameworks */,
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6859E8C029090F304C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
);
|
||||
name = Tutorial1_2DSound;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial1_2DSound_d */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7BB8FF0A1146FF150002B220 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6859E8C029090F304C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8DD76F620486A84900D96B5E /* Tutorial1_2DSound */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial1_2DSound" */;
|
||||
buildPhases = (
|
||||
8DD76F640486A84900D96B5E /* Sources */,
|
||||
8DD76F660486A84900D96B5E /* Frameworks */,
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Tutorial1_2DSound;
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = Tutorial1_2DSound;
|
||||
productReference = 8DD76F6C0486A84900D96B5E /* Tutorial1_2DSound_d */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial1_2DSound" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* Tutorial1_2DSound */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8DD76F620486A84900D96B5E /* Tutorial1_2DSound */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8DD76F640486A84900D96B5E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB923208733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"_GLIBCXX_DEBUG=1",
|
||||
"_GLIBCXX_DEBUG_PEDANTIC=1",
|
||||
);
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
PRODUCT_NAME = Tutorial1_2DSound_d;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923308733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/../../bin/Osx\"",
|
||||
);
|
||||
PRODUCT_NAME = Tutorial1_2DSound;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB923608733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio_d.dylib\"";
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923708733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio.dylib\"";
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial1_2DSound" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923208733DC60010E9CD /* Debug */,
|
||||
1DEB923308733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial1_2DSound" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923608733DC60010E9CD /* Debug */,
|
||||
1DEB923708733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.1.0 Tutorial 1
|
||||
//Basic 2d Audio
|
||||
//****************************************************************
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
//Include cAudio.h so we can work wtih cAudio
|
||||
#include "../../include/cAudio.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.1.0 Tutorial 1: Basic 2D Audio. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
||||
if(manager)
|
||||
{
|
||||
//Allow the user to choose a playback device
|
||||
cout << "\nAvailable Playback Devices: \n";
|
||||
unsigned int deviceCount = manager->getAvailableDeviceCount();
|
||||
std::string defaultDeviceName = manager->getDefaultDeviceName();
|
||||
for(unsigned int i=0; i<deviceCount; ++i)
|
||||
{
|
||||
std::string deviceName = manager->getAvailableDeviceName(i);
|
||||
if(deviceName.compare(defaultDeviceName) == 0)
|
||||
cout << i << "): " << deviceName << " [DEFAULT] \n";
|
||||
else
|
||||
cout << i << "): " << deviceName << " \n";
|
||||
}
|
||||
cout << std::endl;
|
||||
cout << "Choose a device by number: ";
|
||||
unsigned int deviceSelection = 0;
|
||||
cin >> deviceSelection;
|
||||
cout << std::endl;
|
||||
|
||||
//Initialize the manager with the user settings
|
||||
manager->initialize(manager->getAvailableDeviceName(deviceSelection));
|
||||
|
||||
//Create a IAudio object and load a sound from a file
|
||||
cAudio::IAudioSource* mysound = manager->create("bling","../../media/cAudioTheme1.ogg",true);
|
||||
|
||||
if(mysound)
|
||||
{
|
||||
mysound->setVolume(0.5);
|
||||
//Set the IAudio Sound to play2d and loop
|
||||
mysound->play2d(false);
|
||||
|
||||
//Wait for the sound to finish playing
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
|
||||
}
|
||||
|
||||
//Delete all IAudio sounds
|
||||
manager->releaseAllSources();
|
||||
//Shutdown cAudio
|
||||
manager->shutDown();
|
||||
|
||||
cAudio::destroyAudioManager(manager);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Failed to create audio playback manager. \n";
|
||||
}
|
||||
|
||||
std::cout << "Press any key to quit \n";
|
||||
std::cin.get();
|
||||
std::cin.get();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../bin/linux-x86 -lcAudio
|
||||
|
||||
OBJECT=main.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial2_3DSound $(LDFLAGS)
|
|
@ -1,73 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="Tutorial2:3DSound" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial2_3DSound_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Debug\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="cAudio_d" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial2_3DSound" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Release\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
<Add library="cAudio" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial2_3DSound_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Compiler>
|
||||
<Add option="/Zi /D_DEBUG" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="/DEBUG" />
|
||||
<Add library="cAudio_d.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial2_3DSound" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Linker>
|
||||
<Add library="cAudio.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add directory="..\..\bin\win32-gcc" />
|
||||
</Linker>
|
||||
<Unit filename="main.cpp" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<debugger />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
|
@ -1,189 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="Tutorial2_3DSound"
|
||||
ProjectGUID="{96052488-DB19-492E-88F6-D14AFD61E4F9}"
|
||||
RootNamespace="Tutorial2_3DSound"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio_d.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_d.exe"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
EnableIntrinsicFunctions="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio.lib"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="false"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,215 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial2_3DSound_d */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tutorial2_3DSound_d; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8DD76F660486A84900D96B5E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* Tutorial2_3DSound */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6859E8C029090F304C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
);
|
||||
name = Tutorial2_3DSound;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial2_3DSound_d */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6859E8C029090F304C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8DD76F620486A84900D96B5E /* Tutorial2_3DSound */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial2_3DSound" */;
|
||||
buildPhases = (
|
||||
8DD76F640486A84900D96B5E /* Sources */,
|
||||
8DD76F660486A84900D96B5E /* Frameworks */,
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Tutorial2_3DSound;
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = Tutorial2_3DSound;
|
||||
productReference = 8DD76F6C0486A84900D96B5E /* Tutorial2_3DSound_d */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial2_3DSound" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* Tutorial2_3DSound */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8DD76F620486A84900D96B5E /* Tutorial2_3DSound */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8DD76F640486A84900D96B5E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB923208733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"_GLIBCXX_DEBUG=1",
|
||||
"_GLIBCXX_DEBUG_PEDANTIC=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio_d.dylib\"";
|
||||
PRODUCT_NAME = Tutorial2_3DSound_d;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923308733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../bin/Osx\"";
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio.dylib\"";
|
||||
PRODUCT_NAME = Tutorial2_3DSound;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB923608733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923708733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial2_3DSound" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923208733DC60010E9CD /* Debug */,
|
||||
1DEB923308733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial2_3DSound" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923608733DC60010E9CD /* Debug */,
|
||||
1DEB923708733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
|
@ -1,112 +0,0 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.1.0 Tutorial 2
|
||||
//Basic 3d Audio. Moving Audio source. Must be mono sound source
|
||||
//****************************************************************
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <math.h>
|
||||
|
||||
//Include cAudio.h so we can work wtih cAudio
|
||||
#include "../../include/cAudio.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.1.0 Tutorial 2: Basic 3D Audio. \n \n";
|
||||
//Hold audio source x position
|
||||
float rot = 0;
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
||||
if(manager)
|
||||
{
|
||||
//Allow the user to choose a playback device
|
||||
cout << "\nAvailable Playback Devices: \n";
|
||||
unsigned int deviceCount = manager->getAvailableDeviceCount();
|
||||
std::string defaultDeviceName = manager->getDefaultDeviceName();
|
||||
for(unsigned int i=0; i<deviceCount; ++i)
|
||||
{
|
||||
std::string deviceName = manager->getAvailableDeviceName(i);
|
||||
if(deviceName.compare(defaultDeviceName) == 0)
|
||||
cout << i << "): " << deviceName << " [DEFAULT] \n";
|
||||
else
|
||||
cout << i << "): " << deviceName << " \n";
|
||||
}
|
||||
cout << std::endl;
|
||||
cout << "Choose a device by number: ";
|
||||
unsigned int deviceSelection = 0;
|
||||
cin >> deviceSelection;
|
||||
cout << std::endl;
|
||||
|
||||
//Initialize the manager with the user settings
|
||||
manager->initialize(manager->getAvailableDeviceName(deviceSelection));
|
||||
|
||||
//Grab the listener object, which allows us to manipulate where "we" are in the world
|
||||
//It's useful to bind this to a camera if you are using a 3d graphics engine
|
||||
cAudio::IListener* listener = manager->getListener();
|
||||
|
||||
//Create a IAudio object and load a sound from a file
|
||||
cAudio::IAudioSource* mysound = manager->create("bling", "../../media/bling.ogg", false);
|
||||
|
||||
//Set the IAudio Sound to play3d and loop
|
||||
//play3d takes 4 arguments play3d(toloop,x,y,z,strength)
|
||||
if(mysound && listener)
|
||||
{
|
||||
listener->setPosition(cAudio::cVector3(0,0,0));
|
||||
mysound->play3d(cAudio::cVector3(0,0,0),2.0f,true);
|
||||
mysound->setVolume(1.0f);
|
||||
mysound->setMinDistance(1.0f);
|
||||
mysound->setMaxDistance(100.0f);
|
||||
|
||||
//Play for 10 seconds
|
||||
const int ticksToPlay = 10000;
|
||||
int currentTick = 0;
|
||||
int currentSecTick = 0;
|
||||
|
||||
while(mysound->isPlaying() && currentTick < ticksToPlay)
|
||||
{
|
||||
//Figure out the location of our rotated sound
|
||||
rot+=0.1f * 0.017453293f; //0.1 degrees a frame
|
||||
|
||||
//Sound "starts" at x=5, y=0, z=0
|
||||
float x = 5.0f * cosf(rot) - 0.0f * sinf(rot);
|
||||
float z = 0.0f * cosf(rot) + 5.0f * sinf(rot);
|
||||
mysound->move(cAudio::cVector3(x,0.0,z));
|
||||
|
||||
++currentTick;
|
||||
|
||||
if(currentTick/1000 > currentSecTick)
|
||||
{
|
||||
++currentSecTick;
|
||||
std::cout << ".";
|
||||
}
|
||||
|
||||
//Sleep for 1 ms to free some CPU
|
||||
cAudio::cAudioSleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << std::endl;
|
||||
|
||||
//Delete all IAudio sounds
|
||||
manager->releaseAllSources();
|
||||
//Shutdown cAudio
|
||||
manager->shutDown();
|
||||
|
||||
cAudio::destroyAudioManager(manager);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Failed to create audio playback manager. \n";
|
||||
}
|
||||
|
||||
std::cout << "Press any key to quit \n";
|
||||
std::cin.get();
|
||||
std::cin.get();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../bin/linux-x86 -lcAudio
|
||||
|
||||
OBJECT=main.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial3_MemoryPlayback $(LDFLAGS)
|
|
@ -1,73 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="Tutorial3:MemoryPlayback" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial3_MemoryPlayback_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Debug\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="cAudio_d" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial3_MemoryPlayback" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Release\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
<Add library="cAudio" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial3_MemoryPlayback_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Compiler>
|
||||
<Add option="/Zi /D_DEBUG" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="/DEBUG" />
|
||||
<Add library="cAudio_d.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial3_MemoryPlayback" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Linker>
|
||||
<Add library="cAudio.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add directory="..\..\bin\win32-gcc" />
|
||||
</Linker>
|
||||
<Unit filename="main.cpp" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<debugger />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
|
@ -1,193 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="Tutorial3_MemoryPlayback"
|
||||
ProjectGUID="{FEA3B340-BBB2-4AFB-AF31-3962A0F3F2C6}"
|
||||
RootNamespace="Tutorial3_MemoryPlayback"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio_d.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_d.exe"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
EnableIntrinsicFunctions="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio.lib"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="false"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\bling.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,214 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial3_MemoryPlayback */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tutorial3_MemoryPlayback; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8DD76F660486A84900D96B5E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* Tutorial3_MemoryPlayback */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6859E8C029090F304C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
);
|
||||
name = Tutorial3_MemoryPlayback;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial3_MemoryPlayback */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6859E8C029090F304C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8DD76F620486A84900D96B5E /* Tutorial3_MemoryPlayback */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial3_MemoryPlayback" */;
|
||||
buildPhases = (
|
||||
8DD76F640486A84900D96B5E /* Sources */,
|
||||
8DD76F660486A84900D96B5E /* Frameworks */,
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Tutorial3_MemoryPlayback;
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = Tutorial3_MemoryPlayback;
|
||||
productReference = 8DD76F6C0486A84900D96B5E /* Tutorial3_MemoryPlayback */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial3_MemoryPlayback" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* Tutorial3_MemoryPlayback */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8DD76F620486A84900D96B5E /* Tutorial3_MemoryPlayback */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8DD76F640486A84900D96B5E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB923208733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"_GLIBCXX_DEBUG=1",
|
||||
"_GLIBCXX_DEBUG_PEDANTIC=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio_d.dylib\"";
|
||||
PRODUCT_NAME = Tutorial3_MemoryPlayback_d;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923308733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio.dylib\"";
|
||||
PRODUCT_NAME = Tutorial3_MemoryPlayback;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB923608733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923708733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial3_MemoryPlayback" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923208733DC60010E9CD /* Debug */,
|
||||
1DEB923308733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial3_MemoryPlayback" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923608733DC60010E9CD /* Debug */,
|
||||
1DEB923708733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,78 +0,0 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.1.0 Tutorial 3
|
||||
//Basic Memory Playback *Virtual file systems*
|
||||
//bling.h created with bin2h http://deadnode.org/sw/bin2h/
|
||||
//****************************************************************
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
//Include cAudio.h so we can work wtih cAudio
|
||||
#include "../../include/cAudio.h"
|
||||
|
||||
//Our Bling sound
|
||||
#include "bling.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.1.0 Tutorial 3: Memory Playback. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
||||
if(manager)
|
||||
{
|
||||
//Allow the user to choose a playback device
|
||||
cout << "\nAvailable Playback Devices: \n";
|
||||
unsigned int deviceCount = manager->getAvailableDeviceCount();
|
||||
std::string defaultDeviceName = manager->getDefaultDeviceName();
|
||||
for(unsigned int i=0; i<deviceCount; ++i)
|
||||
{
|
||||
std::string deviceName = manager->getAvailableDeviceName(i);
|
||||
if(deviceName.compare(defaultDeviceName) == 0)
|
||||
cout << i << "): " << deviceName << " [DEFAULT] \n";
|
||||
else
|
||||
cout << i << "): " << deviceName << " \n";
|
||||
}
|
||||
cout << std::endl;
|
||||
cout << "Choose a device by number: ";
|
||||
unsigned int deviceSelection = 0;
|
||||
cin >> deviceSelection;
|
||||
cout << std::endl;
|
||||
|
||||
//Initialize the manager with the user settings
|
||||
manager->initialize(manager->getAvailableDeviceName(deviceSelection));
|
||||
|
||||
//Create a IAudio object and load a sound from memory. using the bling array and bling size generated by bin2h.
|
||||
cAudio::IAudioSource* mysound = manager->createFromMemory("bling",(const char*)bling,bling_size,"wav");
|
||||
|
||||
if(mysound)
|
||||
{
|
||||
//Set the IAudio Sound to play2d and loop
|
||||
mysound->play2d(true);
|
||||
|
||||
//Sleep for 10,000 ms to free some CPU, also makes the example only last 10 seconds
|
||||
cAudio::cAudioSleep(10000);
|
||||
}
|
||||
|
||||
//Delete all IAudio sounds
|
||||
manager->releaseAllSources();
|
||||
//Shutdown cAudio
|
||||
manager->shutDown();
|
||||
|
||||
cAudio::destroyAudioManager(manager);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Failed to create audio playback manager. \n";
|
||||
}
|
||||
|
||||
std::cout << "Press any key to quit \n";
|
||||
std::cin.get();
|
||||
std::cin.get();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../bin/linux-x86 -lcAudio
|
||||
|
||||
OBJECT=main.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial4_AudioCapture $(LDFLAGS)
|
|
@ -1,73 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="Tutorial4:AudioCapture" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial4_AudioCapture_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Debug\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="cAudio_d" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial4_AudioCapture" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Release\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
<Add library="cAudio" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial4_AudioCapture_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Compiler>
|
||||
<Add option="/Zi /D_DEBUG" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="/DEBUG" />
|
||||
<Add library="cAudio_d.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial4_AudioCapture" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Linker>
|
||||
<Add library="cAudio.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add directory="..\..\bin\win32-gcc" />
|
||||
</Linker>
|
||||
<Unit filename="main.cpp" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<debugger />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
|
@ -1,189 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="Tutorial4_AudioCapture"
|
||||
ProjectGUID="{F04BE31E-E8CC-40C8-9C63-EEAE1BF84EB7}"
|
||||
RootNamespace="Tutorial4_AudioCapture"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio_d.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_d.exe"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
EnableIntrinsicFunctions="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio.lib"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="false"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,212 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial4_AudioCapture */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tutorial4_AudioCapture; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8DD76F660486A84900D96B5E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* Tutorial4_AudioCapture */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6859E8C029090F304C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
);
|
||||
name = Tutorial4_AudioCapture;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial4_AudioCapture */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6859E8C029090F304C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8DD76F620486A84900D96B5E /* Tutorial4_AudioCapture */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial4_AudioCapture" */;
|
||||
buildPhases = (
|
||||
8DD76F640486A84900D96B5E /* Sources */,
|
||||
8DD76F660486A84900D96B5E /* Frameworks */,
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Tutorial4_AudioCapture;
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = Tutorial4_AudioCapture;
|
||||
productReference = 8DD76F6C0486A84900D96B5E /* Tutorial4_AudioCapture */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial4_AudioCapture" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* Tutorial4_AudioCapture */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8DD76F620486A84900D96B5E /* Tutorial4_AudioCapture */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8DD76F640486A84900D96B5E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB923208733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"_GLIBCXX_DEBUG=1",
|
||||
"_GLIBCXX_DEBUG_PEDANTIC=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio_d.dylib\"";
|
||||
PRODUCT_NAME = Tutorial4_AudioCapture_d;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923308733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio.dylib\"";
|
||||
PRODUCT_NAME = Tutorial4_AudioCapture;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB923608733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923708733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial4_AudioCapture" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923208733DC60010E9CD /* Debug */,
|
||||
1DEB923308733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial4_AudioCapture" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923608733DC60010E9CD /* Debug */,
|
||||
1DEB923708733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
|
@ -1,143 +0,0 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.1.0 Tutorial 4
|
||||
//Audio Capture and playback
|
||||
//****************************************************************
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
//Include cAudio.h so we can work wtih cAudio
|
||||
#include "../../include/cAudio.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
const unsigned int CAPTURE_FREQUENCY = 22050;
|
||||
const unsigned int CAPTURE_DURATION = 10;
|
||||
const cAudio::AudioFormats CAPTURE_FORMAT = cAudio::EAF_16BIT_MONO;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "\ncAudio 2.1.0 Tutorial 4: Capturing Audio. \n \n";
|
||||
|
||||
std::string formatName;
|
||||
|
||||
if(CAPTURE_FORMAT == cAudio::EAF_8BIT_MONO)
|
||||
formatName = "8 Bit Mono";
|
||||
else if(CAPTURE_FORMAT == cAudio::EAF_8BIT_STEREO)
|
||||
formatName = "8 Bit Stereo";
|
||||
else if(CAPTURE_FORMAT == cAudio::EAF_16BIT_MONO)
|
||||
formatName = "16 Bit Mono";
|
||||
else
|
||||
formatName = "16 Bit Stereo";
|
||||
|
||||
//Create an Audio Manager with default settings
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager();
|
||||
|
||||
if(manager)
|
||||
{
|
||||
//! The capture interface can be gotten at any time, and can even be used completely seperate from the manager
|
||||
// Also it is possible to have more than one capture interface at the same time, useful for recording from multiple sources
|
||||
cAudio::IAudioCapture* capture = cAudio::createAudioCapture(false);
|
||||
if(capture)
|
||||
{
|
||||
bool captureReady = false;
|
||||
cout << "Capturing Supported: " << std::boolalpha << capture->isSupported() << "\n \n";
|
||||
if(capture->isSupported())
|
||||
{
|
||||
cout << "Available Capture Devices: \n";
|
||||
unsigned int deviceCount = capture->getAvailableDeviceCount();
|
||||
std::string defaultDeviceName = capture->getDefaultDeviceName();
|
||||
for(unsigned int i=0; i<deviceCount; ++i)
|
||||
{
|
||||
std::string deviceName = capture->getAvailableDeviceName(i);
|
||||
if(deviceName.compare(defaultDeviceName) == 0)
|
||||
cout << i << "): " << deviceName << " [DEFAULT] \n";
|
||||
else
|
||||
cout << i << "): " << deviceName << " \n";
|
||||
}
|
||||
cout << std::endl;
|
||||
cout << "Choose a device by number: ";
|
||||
unsigned int deviceSelection = 0;
|
||||
cin >> deviceSelection;
|
||||
cout << std::endl;
|
||||
|
||||
captureReady = capture->initialize(capture->getAvailableDeviceName(deviceSelection), CAPTURE_FREQUENCY, CAPTURE_FORMAT);
|
||||
cout << "Ready to capture audio: " << std::boolalpha << captureReady << "\n \n";
|
||||
|
||||
//Quick math to figure out how large our data should be for the duration of the record time
|
||||
const unsigned int targetRecordSize = CAPTURE_FREQUENCY * CAPTURE_DURATION * capture->getSampleSize();
|
||||
|
||||
//Print various information
|
||||
cout << "Capture Device: " << capture->getDeviceName() << ". \n";
|
||||
cout << "Capture Frequency: " << CAPTURE_FREQUENCY << " hertz. \n";
|
||||
cout << "Capture Duration: " << CAPTURE_DURATION << " seconds. \n";
|
||||
cout << "Capture Format: " << formatName << ". \n";
|
||||
cout << "Sample Size: " << capture->getSampleSize() << " bytes. \n";
|
||||
cout << "Target size of audio: " << targetRecordSize << " bytes. \n";
|
||||
cout << std::endl;
|
||||
|
||||
unsigned int currentsize = 0;
|
||||
cout << "Starting capture... \n";
|
||||
if(capture->beginCapture())
|
||||
{
|
||||
while(currentsize < targetRecordSize)
|
||||
{
|
||||
currentsize = capture->getCurrentCapturedAudioSize();
|
||||
|
||||
//Sleep for 1 ms to free some CPU
|
||||
cAudio::cAudioSleep(1);
|
||||
}
|
||||
}
|
||||
capture->stopCapture();
|
||||
cout << "Capture stopped... \n \n";
|
||||
|
||||
//Grab the total size again, ensures we get ALL the audio data
|
||||
//Not completely necessary, as starting a capture again will clear the old audio data
|
||||
currentsize = capture->getCurrentCapturedAudioSize();
|
||||
|
||||
char* buffer = new char[currentsize];
|
||||
cout << "Captured " << capture->getCapturedAudio(buffer, currentsize) << " bytes of audio data. \n \n";
|
||||
|
||||
//Create a IAudio object and load a sound from a file
|
||||
cAudio::IAudioSource* mysound = manager->createFromRaw("sound1", buffer, currentsize, CAPTURE_FREQUENCY, CAPTURE_FORMAT);
|
||||
|
||||
delete buffer;
|
||||
|
||||
if(mysound)
|
||||
{
|
||||
cout << "Playing back captured audio... \n \n";
|
||||
mysound->setVolume(1.0);
|
||||
//Set the IAudio Sound to play2d and loop
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
{
|
||||
//Sleep for 10 ms to free some CPU
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Always remember to destroy the interface once you are done with it
|
||||
cAudio::destroyAudioCapture(capture);
|
||||
capture = 0x0;
|
||||
}
|
||||
|
||||
//Delete all IAudio sounds
|
||||
manager->releaseAllSources();
|
||||
//Shutdown cAudio
|
||||
manager->shutDown();
|
||||
|
||||
cAudio::destroyAudioManager(manager);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Failed to create audio playback manager. \n";
|
||||
}
|
||||
|
||||
std::cout << "Press any key to quit \n";
|
||||
std::cin.get();
|
||||
std::cin.get();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../bin/linux-x86 -lcAudio
|
||||
|
||||
OBJECT=main.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial5_AudioEffects $(LDFLAGS)
|
|
@ -1,73 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="Tutorial5:AudioEffects" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial5_AudioEffects_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Debug\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="cAudio_d" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial5_AudioEffects" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Release\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
<Add library="cAudio" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial5_AudioEffects_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Compiler>
|
||||
<Add option="/Zi /D_DEBUG" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="/DEBUG" />
|
||||
<Add library="cAudio_d.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial5_AudioEffects" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Linker>
|
||||
<Add library="cAudio.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add directory="..\..\bin\win32-gcc" />
|
||||
</Linker>
|
||||
<Unit filename="main.cpp" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<debugger />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
|
@ -1,189 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="Tutorial5_AudioEffects"
|
||||
ProjectGUID="{EA03D1BB-6D71-4960-958A-670480A8259A}"
|
||||
RootNamespace="Tutorial5_AudioEffects"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio_d.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_d.exe"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio.lib"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,212 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial5_AudioEffects */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tutorial5_AudioEffects; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8DD76F660486A84900D96B5E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* Tutorial5_AudioEffects */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6859E8C029090F304C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
);
|
||||
name = Tutorial5_AudioEffects;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial5_AudioEffects */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6859E8C029090F304C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8DD76F620486A84900D96B5E /* Tutorial5_AudioEffects */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial5_AudioEffects" */;
|
||||
buildPhases = (
|
||||
8DD76F640486A84900D96B5E /* Sources */,
|
||||
8DD76F660486A84900D96B5E /* Frameworks */,
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Tutorial5_AudioEffects;
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = Tutorial5_AudioEffects;
|
||||
productReference = 8DD76F6C0486A84900D96B5E /* Tutorial5_AudioEffects */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial5_AudioEffects" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* Tutorial5_AudioEffects */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8DD76F620486A84900D96B5E /* Tutorial5_AudioEffects */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8DD76F640486A84900D96B5E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB923208733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"_GLIBCXX_DEBUG=1",
|
||||
"_GLIBCXX_DEBUG_PEDANTIC=1",
|
||||
);
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio_d.dylib\"";
|
||||
PRODUCT_NAME = Tutorial5_AudioEffects_d;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923308733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio.dylib\"";
|
||||
PRODUCT_NAME = Tutorial5_AudioEffects;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB923608733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923708733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial5_AudioEffects" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923208733DC60010E9CD /* Debug */,
|
||||
1DEB923308733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial5_AudioEffects" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923608733DC60010E9CD /* Debug */,
|
||||
1DEB923708733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
|
@ -1,364 +0,0 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.1.0 Tutorial 5
|
||||
//Audio effects
|
||||
//****************************************************************
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
///Include cAudio.h so we can work wtih cAudio
|
||||
#include "../../include/cAudio.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.1.0 Tutorial 5: Basic Audio Effects. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
||||
if(manager)
|
||||
{
|
||||
//Allow the user to choose a playback device
|
||||
cout << "\nAvailable Playback Devices: \n";
|
||||
unsigned int deviceCount = manager->getAvailableDeviceCount();
|
||||
std::string defaultDeviceName = manager->getDefaultDeviceName();
|
||||
for(unsigned int i=0; i<deviceCount; ++i)
|
||||
{
|
||||
std::string deviceName = manager->getAvailableDeviceName(i);
|
||||
if(deviceName.compare(defaultDeviceName) == 0)
|
||||
cout << i << "): " << deviceName << " [DEFAULT] \n";
|
||||
else
|
||||
cout << i << "): " << deviceName << " \n";
|
||||
}
|
||||
cout << std::endl;
|
||||
cout << "Choose a device by number: ";
|
||||
unsigned int deviceSelection = 0;
|
||||
cin >> deviceSelection;
|
||||
cout << std::endl;
|
||||
|
||||
//Initialize the manager with the user settings
|
||||
manager->initialize(manager->getAvailableDeviceName(deviceSelection));
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
cAudio::IAudioEffects* effects = manager->getEffects();
|
||||
if(effects)
|
||||
{
|
||||
cAudio::IEffect* effect = effects->createEffect();
|
||||
cAudio::IFilter* filter = effects->createFilter();
|
||||
|
||||
if(effect && effect->isValid() && filter && filter->isValid())
|
||||
{
|
||||
filter->setHighFrequencyVolume(0.1f);
|
||||
filter->setLowFrequencyVolume(0.1f);
|
||||
|
||||
//Create a IAudio object and load a sound from a file
|
||||
cAudio::IAudioSource* mysound = manager->create("bling","../../media/Footsteps.wav",false);
|
||||
|
||||
if(mysound)
|
||||
{
|
||||
mysound->setVolume(1.0f);
|
||||
mysound->attachFilter(filter);
|
||||
mysound->attachEffect(0, effect);
|
||||
|
||||
std::cout << std::endl;
|
||||
std::cout << "Simultaneous Effects Supported: " << effects->getMaxEffectsSupported() << ". \n";
|
||||
std::cout << std::endl;
|
||||
|
||||
{
|
||||
std::cout << "Playing sound with no effect or filter. \n";
|
||||
filter->setType(cAudio::EFT_NULL);
|
||||
effect->setType(cAudio::EET_NULL);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
|
||||
if(effects->isFilterSupported(cAudio::EFT_LOWPASS))
|
||||
{
|
||||
std::cout << "Playing sound with lowpass filter. \n";
|
||||
filter->setType(cAudio::EFT_LOWPASS);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Lowpass filter not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isFilterSupported(cAudio::EFT_HIGHPASS))
|
||||
{
|
||||
std::cout << "Playing sound with highpass filter. \n";
|
||||
filter->setType(cAudio::EFT_HIGHPASS);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Highpass filter not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isFilterSupported(cAudio::EFT_BANDPASS))
|
||||
{
|
||||
std::cout << "Playing sound with bandpass filter. \n";
|
||||
filter->setType(cAudio::EFT_BANDPASS);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Bandpass filter not supported by this OpenAL device. \n";
|
||||
}
|
||||
|
||||
filter->setType(cAudio::EFT_NULL);
|
||||
|
||||
if(effects->isEffectSupported(cAudio::EET_EAX_REVERB))
|
||||
{
|
||||
std::cout << "Playing sound with EAX Reverb effect. \n";
|
||||
|
||||
//Set the effect to a setting that distinctly shows off the effect (EAX_BATHROOM)
|
||||
effect->setType(cAudio::EET_EAX_REVERB);
|
||||
cAudio::sEAXReverbParameters param;
|
||||
param.Gain = 0.316f;
|
||||
param.GainHF = 0.251f;
|
||||
param.GainLF = 1.0f;
|
||||
param.Density = 0.17f;
|
||||
param.DecayHFRatio = 0.54f;
|
||||
param.ReflectionsGain = 0.653f;
|
||||
param.ReflectionsDelay = 0.01f;
|
||||
param.LateReverbDelay = 0.01f;
|
||||
param.LateReverbGain = 3.273f;
|
||||
|
||||
effect->setEAXReverbParameters(param);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "EAX Reverb effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_REVERB))
|
||||
{
|
||||
std::cout << "Playing sound with Reverb effect. \n";
|
||||
|
||||
//Set the effect to a setting that distinctly shows off the effect (EAX_BATHROOM)
|
||||
effect->setType(cAudio::EET_REVERB);
|
||||
cAudio::sReverbParameters param;
|
||||
param.Gain = 0.316f;
|
||||
param.GainHF = 0.251f;
|
||||
param.Density = 0.17f;
|
||||
param.DecayHFRatio = 0.54f;
|
||||
param.ReflectionsGain = 0.653f;
|
||||
param.ReflectionsDelay = 0.01f;
|
||||
param.LateReverbDelay = 0.01f;
|
||||
param.LateReverbGain = 3.273f;
|
||||
|
||||
effect->setReverbParameters(param);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Reverb effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_CHORUS))
|
||||
{
|
||||
std::cout << "Playing sound with Chorus effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_CHORUS);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Chorus effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_DISTORTION))
|
||||
{
|
||||
std::cout << "Playing sound with Distortion effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_DISTORTION);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Distortion effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_ECHO))
|
||||
{
|
||||
std::cout << "Playing sound with Echo effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_ECHO);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Echo effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_FLANGER))
|
||||
{
|
||||
std::cout << "Playing sound with Flanger effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_FLANGER);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Flanger effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_FREQUENCY_SHIFTER))
|
||||
{
|
||||
std::cout << "Playing sound with Frequency Shifter effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_FREQUENCY_SHIFTER);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Frequency Shifter effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_VOCAL_MORPHER))
|
||||
{
|
||||
std::cout << "Playing sound with Vocal Morpher effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_VOCAL_MORPHER);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Vocal Morpher effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_PITCH_SHIFTER))
|
||||
{
|
||||
std::cout << "Playing sound with Pitch Shifter effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_PITCH_SHIFTER);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Pitch Shifter effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_RING_MODULATOR))
|
||||
{
|
||||
std::cout << "Playing sound with Ring Modulator effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_RING_MODULATOR);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Ring Modulator effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_AUTOWAH))
|
||||
{
|
||||
std::cout << "Playing sound with Autowah effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_AUTOWAH);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Autowah effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_COMPRESSOR))
|
||||
{
|
||||
std::cout << "Playing sound with Compressor effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_COMPRESSOR);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Compressor effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
if(effects->isEffectSupported(cAudio::EET_EQUALIZER))
|
||||
{
|
||||
std::cout << "Playing sound with Equalizer effect. \n";
|
||||
|
||||
//Default settings
|
||||
effect->setType(cAudio::EET_EQUALIZER);
|
||||
mysound->play2d(false);
|
||||
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Equalizer effect not supported by this OpenAL device. \n";
|
||||
}
|
||||
}
|
||||
filter->drop();
|
||||
effect->drop();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//Delete all IAudio sounds
|
||||
manager->releaseAllSources();
|
||||
//Shutdown cAudio
|
||||
manager->shutDown();
|
||||
|
||||
cAudio::destroyAudioManager(manager);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Failed to create audio playback manager. \n";
|
||||
}
|
||||
|
||||
std::cout << "Press any key to quit \n";
|
||||
std::cin.get();
|
||||
std::cin.get();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../bin/linux-x86 -lcAudio
|
||||
|
||||
OBJECT=main.o cTestHandler.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial6_CustomEventHandler $(LDFLAGS)
|
|
@ -1,75 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="Tutorial6:CustomEventHandler" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial6_CustomEventHandler_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Debug\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="cAudio_d" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial6_CustomEventHandler" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Release\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
<Add library="cAudio" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial6_CustomEventHandler_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Compiler>
|
||||
<Add option="/Zi /D_DEBUG" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="/DEBUG" />
|
||||
<Add library="cAudio_d.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial6_CustomEventHandler" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Linker>
|
||||
<Add library="cAudio.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add directory="..\..\bin\win32-gcc" />
|
||||
</Linker>
|
||||
<Unit filename="cTestHandler.cpp" />
|
||||
<Unit filename="cTestHandler.h" />
|
||||
<Unit filename="main.cpp" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<debugger />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
|
@ -1,197 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="Tutorial6_CustomEventHandler"
|
||||
ProjectGUID="{21C636EF-FC36-4FC5-AFB4-0711F5C44B5D}"
|
||||
RootNamespace="Tutorial5_AudioEffects"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio_d.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_d.exe"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio.lib"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\cTestHandler.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\cTestHandler.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,219 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
7BC2FB0511509C6E003E7EE3 /* cTestHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7BC2FB0411509C6E003E7EE3 /* cTestHandler.cpp */; };
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
|
||||
7BC2FB0311509C69003E7EE3 /* cTestHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cTestHandler.h; sourceTree = "<group>"; };
|
||||
7BC2FB0411509C6E003E7EE3 /* cTestHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cTestHandler.cpp; sourceTree = "<group>"; };
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial6_CustomEventHandler */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tutorial6_CustomEventHandler; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8DD76F660486A84900D96B5E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* Tutorial6_CustomEventHandler */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6859E8C029090F304C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
);
|
||||
name = Tutorial6_CustomEventHandler;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7BC2FB0411509C6E003E7EE3 /* cTestHandler.cpp */,
|
||||
7BC2FB0311509C69003E7EE3 /* cTestHandler.h */,
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial6_CustomEventHandler */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6859E8C029090F304C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8DD76F620486A84900D96B5E /* Tutorial6_CustomEventHandler */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial6_CustomEventHandler" */;
|
||||
buildPhases = (
|
||||
8DD76F640486A84900D96B5E /* Sources */,
|
||||
8DD76F660486A84900D96B5E /* Frameworks */,
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Tutorial6_CustomEventHandler;
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = Tutorial6_CustomEventHandler;
|
||||
productReference = 8DD76F6C0486A84900D96B5E /* Tutorial6_CustomEventHandler */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial6_CustomEventHandler" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* Tutorial6_CustomEventHandler */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8DD76F620486A84900D96B5E /* Tutorial6_CustomEventHandler */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8DD76F640486A84900D96B5E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */,
|
||||
7BC2FB0511509C6E003E7EE3 /* cTestHandler.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB923208733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"_GLIBCXX_DEBUG=1",
|
||||
"_GLIBCXX_DEBUG_PEDANTIC=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio_d.dylib\"";
|
||||
PRODUCT_NAME = Tutorial6_CustomEventHandler_d;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923308733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio.dylib\"";
|
||||
PRODUCT_NAME = Tutorial6_CustomEventHandler;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB923608733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923708733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial6_CustomEventHandler" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923208733DC60010E9CD /* Debug */,
|
||||
1DEB923308733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial6_CustomEventHandler" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923608733DC60010E9CD /* Debug */,
|
||||
1DEB923708733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.0.0 Tutorial 6
|
||||
//Custom event handler
|
||||
//****************************************************************
|
||||
|
||||
#include "cTestHandler.h"
|
||||
#include <iostream>
|
||||
|
||||
void cTestHandler::onUpdate()
|
||||
{
|
||||
//We comment this out because this will be constantly
|
||||
//called as the sound is playing
|
||||
//std::cout<<"Custom Event Handler: Sound source is updating\n";
|
||||
}
|
||||
|
||||
void cTestHandler::onRelease()
|
||||
{
|
||||
std::cout<<"Custom Event Handler: Sound source was released\n";
|
||||
}
|
||||
|
||||
void cTestHandler::onPlay()
|
||||
{
|
||||
std::cout<<"Custom Event Handler: Sound source started playing\n";
|
||||
}
|
||||
|
||||
void cTestHandler::onStop()
|
||||
{
|
||||
std::cout<<"Custom Event Handler: Sound source stoped playing\n";
|
||||
}
|
||||
|
||||
void cTestHandler::onPause()
|
||||
{
|
||||
std::cout<<"Custom Event Handler: Sound source was paused\n";
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.0.0 Tutorial 6
|
||||
//Custom event handler
|
||||
//****************************************************************
|
||||
|
||||
|
||||
///Include the ISourceHandler.h so we can inherit the interface
|
||||
#include "../../include/ISourceEventHandler.h"
|
||||
|
||||
class cTestHandler : public cAudio::ISourceEventHandler
|
||||
{
|
||||
//In order for this handler to work it must have each of the following functions
|
||||
public:
|
||||
|
||||
// This function calls on source update
|
||||
void onUpdate();
|
||||
// This function calls on source release
|
||||
void onRelease();
|
||||
// This function calls on source play
|
||||
void onPlay();
|
||||
// This function calls on source stop
|
||||
void onStop();
|
||||
// This function calls on source pause
|
||||
void onPause();
|
||||
|
||||
};
|
|
@ -1,84 +0,0 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.1.0 Tutorial 6
|
||||
//Custom Event Handler
|
||||
//****************************************************************
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
//Include cAudio.h so we can work wtih cAudio
|
||||
#include "../../include/cAudio.h"
|
||||
|
||||
//Include the custom handler
|
||||
#include "cTestHandler.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.1.0 Tutorial 6: Custom event handler. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
||||
//Make a pointer to our handler
|
||||
cTestHandler *handle = new cTestHandler;
|
||||
|
||||
if(manager)
|
||||
{
|
||||
//Allow the user to choose a playback device
|
||||
cout << "\nAvailable Playback Devices: \n";
|
||||
unsigned int deviceCount = manager->getAvailableDeviceCount();
|
||||
std::string defaultDeviceName = manager->getDefaultDeviceName();
|
||||
for(unsigned int i=0; i<deviceCount; ++i)
|
||||
{
|
||||
std::string deviceName = manager->getAvailableDeviceName(i);
|
||||
if(deviceName.compare(defaultDeviceName) == 0)
|
||||
cout << i << "): " << deviceName << " [DEFAULT] \n";
|
||||
else
|
||||
cout << i << "): " << deviceName << " \n";
|
||||
}
|
||||
cout << std::endl;
|
||||
cout << "Choose a device by number: ";
|
||||
unsigned int deviceSelection = 0;
|
||||
cin >> deviceSelection;
|
||||
cout << std::endl;
|
||||
|
||||
//Initialize the manager with the user settings
|
||||
manager->initialize(manager->getAvailableDeviceName(deviceSelection));
|
||||
|
||||
//Create a IAudio object and load a sound from a file
|
||||
cAudio::IAudioSource* mysound = manager->create("bling","../../media/cAudioTheme1.ogg",true);
|
||||
mysound->registerEventHandler(handle);
|
||||
|
||||
if(mysound)
|
||||
{
|
||||
mysound->setVolume(0.5);
|
||||
//Set the IAudio Sound to play2d and loop
|
||||
mysound->play2d(false);
|
||||
|
||||
//Wait for the sound to finish playing
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
|
||||
}
|
||||
|
||||
//Delete all IAudio sounds
|
||||
manager->releaseAllSources();
|
||||
//Shutdown cAudio
|
||||
manager->shutDown();
|
||||
|
||||
cAudio::destroyAudioManager(manager);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Failed to create audio playback manager. \n";
|
||||
}
|
||||
|
||||
std::cout << "Press any key to quit \n";
|
||||
std::cin.get();
|
||||
std::cin.get();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
CC=g++
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-L../../bin/linux-x86 -lcAudio
|
||||
|
||||
OBJECT=main.o cTestLogReceiver.o
|
||||
|
||||
all: $(OBJECT)
|
||||
$(CC) $(OBJECT) -o ../../bin/linux-x86/Tutorial7_CustomLogReceiver $(LDFLAGS)
|
|
@ -1,75 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="Tutorial7:CustomLogReceiver" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial7_CustomLogReceiver_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Debug\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="cAudio_d" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="..\..\bin\win32-gcc\Tutorial7_CustomLogReceiver" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\Release\" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
<Add library="cAudio" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial7_CustomLogReceiver_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Compiler>
|
||||
<Add option="/Zi /D_DEBUG" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="/DEBUG" />
|
||||
<Add library="cAudio_d.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release Visual">
|
||||
<Option output="..\..\bin\win32-visual\Tutorial7_CustomLogReceiver" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\visual" />
|
||||
<Option type="1" />
|
||||
<Option compiler="msvc8" />
|
||||
<Option use_console_runner="0" />
|
||||
<Linker>
|
||||
<Add library="cAudio.lib" />
|
||||
<Add directory="..\..\bin\win32-visual" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add directory="..\..\bin\win32-gcc" />
|
||||
</Linker>
|
||||
<Unit filename="cTestLogReceiver.cpp" />
|
||||
<Unit filename="cTestLogReceiver.h" />
|
||||
<Unit filename="main.cpp" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<debugger />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
|
@ -1,195 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="Tutorial7_CustomLogReceiver"
|
||||
ProjectGUID="{23921DF8-FF19-4090-9240-EEE8C2A6B23F}"
|
||||
RootNamespace="Tutorial5_AudioEffects"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio_d.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_d.exe"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../bin/win32-visual"
|
||||
IntermediateDirectory="obj/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cAudio.lib"
|
||||
AdditionalLibraryDirectories=""..\..\lib\win32-visual""
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\cTestLogReceiver.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Headers"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\cTestLogReceiver.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,219 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
7BC2FB4011509E34003E7EE3 /* cTestLogReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7BC2FB3F11509E34003E7EE3 /* cTestLogReceiver.cpp */; };
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
|
||||
7BC2FB3E11509E34003E7EE3 /* cTestLogReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cTestLogReceiver.h; sourceTree = "<group>"; };
|
||||
7BC2FB3F11509E34003E7EE3 /* cTestLogReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cTestLogReceiver.cpp; sourceTree = "<group>"; };
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial7_CustomLogReceiver_d */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tutorial7_CustomLogReceiver_d; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8DD76F660486A84900D96B5E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* Tutorial7_CustomLogReceiver */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6859E8C029090F304C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
);
|
||||
name = Tutorial7_CustomLogReceiver;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7BC2FB3E11509E34003E7EE3 /* cTestLogReceiver.h */,
|
||||
7BC2FB3F11509E34003E7EE3 /* cTestLogReceiver.cpp */,
|
||||
08FB7796FE84155DC02AAC07 /* main.cpp */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DD76F6C0486A84900D96B5E /* Tutorial7_CustomLogReceiver_d */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6859E8C029090F304C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8DD76F620486A84900D96B5E /* Tutorial7_CustomLogReceiver */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial7_CustomLogReceiver" */;
|
||||
buildPhases = (
|
||||
8DD76F640486A84900D96B5E /* Sources */,
|
||||
8DD76F660486A84900D96B5E /* Frameworks */,
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Tutorial7_CustomLogReceiver;
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = Tutorial7_CustomLogReceiver;
|
||||
productReference = 8DD76F6C0486A84900D96B5E /* Tutorial7_CustomLogReceiver_d */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial7_CustomLogReceiver" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* Tutorial7_CustomLogReceiver */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8DD76F620486A84900D96B5E /* Tutorial7_CustomLogReceiver */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8DD76F640486A84900D96B5E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8DD76F650486A84900D96B5E /* main.cpp in Sources */,
|
||||
7BC2FB4011509E34003E7EE3 /* cTestLogReceiver.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB923208733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"_GLIBCXX_DEBUG=1",
|
||||
"_GLIBCXX_DEBUG_PEDANTIC=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio_d.dylib\"";
|
||||
PRODUCT_NAME = Tutorial7_CustomLogReceiver_d;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923308733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
HEADER_SEARCH_PATHS = "\"../../include\"";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
OTHER_LDFLAGS = "\"../../bin/Osx/libcAudio.dylib\"";
|
||||
PRODUCT_NAME = Tutorial7_CustomLogReceiver;
|
||||
SYMROOT = ../../bin/Osx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB923608733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923708733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Tutorial7_CustomLogReceiver" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923208733DC60010E9CD /* Debug */,
|
||||
1DEB923308733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Tutorial7_CustomLogReceiver" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923608733DC60010E9CD /* Debug */,
|
||||
1DEB923708733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
#include "cTestLogReceiver.h"
|
||||
#include <iostream>
|
||||
|
||||
cTestLogReceiver::cTestLogReceiver()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
cTestLogReceiver::~cTestLogReceiver()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool cTestLogReceiver::OnLogMessage(const char* sender, const char* message, cAudio::LogLevel level, float time)
|
||||
{
|
||||
//Every time we get a message it will have the following information
|
||||
//What/who sent the message
|
||||
//The message it contains
|
||||
//What log level it is
|
||||
//The time the message was logged
|
||||
//For now we will just display the word MESSAGE everytime we get a new message
|
||||
|
||||
std::cout<<"Message!\n";
|
||||
|
||||
return true;
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.0.0 Tutorial 7
|
||||
//Custom log receiver
|
||||
//****************************************************************
|
||||
|
||||
//We include the interface of the log receiver
|
||||
#include "../../include/ILogReceiver.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
//Now we make our new class and inherit the ILogReceiver interface
|
||||
class cTestLogReceiver : public cAudio::ILogReceiver
|
||||
{
|
||||
public:
|
||||
//Must have the constructor and desconstructor
|
||||
cTestLogReceiver();
|
||||
~cTestLogReceiver();
|
||||
|
||||
//Only function that must be included in order for the receiver to work
|
||||
bool OnLogMessage(const char* sender, const char* message, cAudio::LogLevel level, float time);
|
||||
|
||||
};
|
|
@ -1,90 +0,0 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.1.0 Tutorial 7
|
||||
//Custom log receiver
|
||||
//****************************************************************
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
//Include cAudio.h so we can work wtih cAudio
|
||||
#include "../../include/cAudio.h"
|
||||
|
||||
//Include the new log receiver
|
||||
#include "cTestLogReceiver.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.1.0 Tutorial 7: Custom log recevier. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
||||
//Now we make a new pointer to our receiver
|
||||
cTestLogReceiver *loggin = new cTestLogReceiver;
|
||||
|
||||
//Once the manager is created we grab instance of the cAudio logger
|
||||
cAudio::ILogger *log = cAudio::getLogger();
|
||||
|
||||
|
||||
//Then we pass our new receiver to it with a unique name
|
||||
log->registerLogReceiver(loggin,"Loggin");
|
||||
|
||||
if(manager)
|
||||
{
|
||||
//Allow the user to choose a playback device
|
||||
cout << "\nAvailable Playback Devices: \n";
|
||||
unsigned int deviceCount = manager->getAvailableDeviceCount();
|
||||
std::string defaultDeviceName = manager->getDefaultDeviceName();
|
||||
for(unsigned int i=0; i<deviceCount; ++i)
|
||||
{
|
||||
std::string deviceName = manager->getAvailableDeviceName(i);
|
||||
if(deviceName.compare(defaultDeviceName) == 0)
|
||||
cout << i << "): " << deviceName << " [DEFAULT] \n";
|
||||
else
|
||||
cout << i << "): " << deviceName << " \n";
|
||||
}
|
||||
cout << std::endl;
|
||||
cout << "Choose a device by number: ";
|
||||
unsigned int deviceSelection = 0;
|
||||
cin >> deviceSelection;
|
||||
cout << std::endl;
|
||||
|
||||
//Initialize the manager with the user settings
|
||||
manager->initialize(manager->getAvailableDeviceName(deviceSelection));
|
||||
|
||||
//Create a IAudio object and load a sound from a file
|
||||
cAudio::IAudioSource* mysound = manager->create("bling","../../media/cAudioTheme1.ogg",true);
|
||||
|
||||
if(mysound)
|
||||
{
|
||||
mysound->setVolume(0.5);
|
||||
//Set the IAudio Sound to play2d and loop
|
||||
mysound->play2d(false);
|
||||
|
||||
//Wait for the sound to finish playing
|
||||
while(mysound->isPlaying())
|
||||
cAudio::cAudioSleep(10);
|
||||
|
||||
}
|
||||
|
||||
//Delete all IAudio sounds
|
||||
manager->releaseAllSources();
|
||||
//Shutdown cAudio
|
||||
manager->shutDown();
|
||||
|
||||
cAudio::destroyAudioManager(manager);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Failed to create audio playback manager. \n";
|
||||
}
|
||||
|
||||
std::cout << "Press any key to quit \n";
|
||||
std::cin.get();
|
||||
std::cin.get();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
cd Tutorial1_2DSound
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial2_3DSound;
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial3_MemoryPlayback;
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial4_AudioCapture;
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial5_AudioEffects;
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial6_CustomEventHandler;
|
||||
make
|
||||
cd ../
|
||||
cd Tutorial7_CustomLogReceiver
|
||||
make
|
||||
cd ../
|
|
@ -1,97 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CAUDIOCAPTURE_H
|
||||
#define CAUDIOCAPTURE_H
|
||||
|
||||
#include "../include/IAudioCapture.h"
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#include "../Headers/cMutex.h"
|
||||
#include "../Headers/cMemoryOverride.h"
|
||||
#include "../Headers/cSTLAllocator.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cAudioCapture : public IAudioCapture, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
|
||||
enum Events{
|
||||
ON_INIT,
|
||||
ON_UPDATE,
|
||||
ON_RELEASE,
|
||||
ON_BEGINCAPTURE,
|
||||
ON_ENDCAPTURE,
|
||||
ON_USERREQUESTEDBUFFER,
|
||||
};
|
||||
|
||||
cAudioCapture();
|
||||
~cAudioCapture();
|
||||
|
||||
//! Checks to see if capturing audio is supported by OpenAL
|
||||
bool checkCaptureExtension();
|
||||
|
||||
virtual bool initialize(const char* deviceName = 0x0, unsigned int frequency = 22050, AudioFormats format = EAF_16BIT_MONO, unsigned int internalBufferSize = 8192);
|
||||
virtual bool isSupported() { return Supported; }
|
||||
virtual bool isReady() { return Ready; }
|
||||
virtual void updateCaptureBuffer(bool force = false);
|
||||
virtual void shutdown();
|
||||
|
||||
virtual const char* getAvailableDeviceName(unsigned int index);
|
||||
virtual unsigned int getAvailableDeviceCount();
|
||||
virtual const char* getDefaultDeviceName();
|
||||
|
||||
virtual const char* getDeviceName() { return DeviceName.c_str(); }
|
||||
virtual unsigned int getFrequency() { return Frequency; }
|
||||
virtual AudioFormats getFormat() { return Format; }
|
||||
virtual unsigned int getInternalBufferSize() { return InternalBufferSize; }
|
||||
virtual unsigned int getSampleSize() { return SampleSize; }
|
||||
|
||||
virtual bool setDevice(const char* deviceName);
|
||||
virtual bool setFrequency(unsigned int frequency);
|
||||
virtual bool setFormat(AudioFormats format);
|
||||
virtual bool setInternalBufferSize(unsigned int internalBufferSize);
|
||||
|
||||
virtual bool beginCapture();
|
||||
virtual void stopCapture();
|
||||
virtual unsigned int getCapturedAudio(void* outputBuffer, unsigned int outputBufferSize);
|
||||
|
||||
virtual unsigned int getCurrentCapturedAudioSize();
|
||||
void getAvailableDevices();
|
||||
|
||||
virtual void registerEventHandler(ICaptureEventHandler* handler);
|
||||
virtual void unRegisterEventHandler(ICaptureEventHandler* handler);
|
||||
virtual void unRegisterAllEventHandlers();
|
||||
|
||||
protected:
|
||||
cAudioMutex Mutex;
|
||||
|
||||
bool initOpenALDevice();
|
||||
void shutdownOpenALDevice();
|
||||
|
||||
unsigned int Frequency;
|
||||
AudioFormats Format;
|
||||
unsigned int InternalBufferSize;
|
||||
int SampleSize;
|
||||
|
||||
cAudioVector<char>::Type CaptureBuffer;
|
||||
cAudioVector<cAudioString>::Type AvailableDevices;
|
||||
cAudioString DefaultDevice;
|
||||
cAudioList<ICaptureEventHandler*>::Type eventHandlerList;
|
||||
|
||||
bool Supported;
|
||||
bool Ready;
|
||||
bool Capturing;
|
||||
|
||||
cAudioString DeviceName;
|
||||
ALCdevice* CaptureDevice;
|
||||
|
||||
bool checkError();
|
||||
ALenum convertAudioFormatEnum(AudioFormats format);
|
||||
void signalEvent(Events sevent);
|
||||
};
|
||||
};
|
||||
|
||||
#endif //! CAUDIOCAPTURE_H
|
|
@ -1,90 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CAUDIOEFFECTS_H
|
||||
#define CAUDIOEFFECTS_H
|
||||
|
||||
#include "../include/IAudioEffects.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
#include "../Headers/cEFXFunctions.h"
|
||||
#include "../Headers/cSTLAllocator.h"
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cAudioEffects : public IAudioEffects
|
||||
{
|
||||
public:
|
||||
cAudioEffects();
|
||||
virtual ~cAudioEffects();
|
||||
|
||||
virtual IEffect* createEffect();
|
||||
virtual IFilter* createFilter();
|
||||
|
||||
virtual unsigned int getMaxEffectsSupported() const;
|
||||
virtual bool isEffectSupported(const EffectTypes& type) const;
|
||||
virtual bool isFilterSupported(const FilterTypes& type) const;
|
||||
|
||||
virtual bool addEAXReverbEffectPreset(const char* name, const sEAXReverbParameters& setting);
|
||||
virtual bool addReverbEffectPreset(const char* name, const sReverbParameters& setting);
|
||||
virtual bool addChorusEffectPreset(const char* name, const sChorusParameters& setting);
|
||||
virtual bool addDistortionEffectPreset(const char* name, const sDistortionParameters& setting);
|
||||
virtual bool addEchoEffectPreset(const char* name, const sEchoParameters& setting);
|
||||
virtual bool addFlangerEffectPreset(const char* name, const sFlangerParameters& setting);
|
||||
virtual bool addFrequencyShiftEffectPreset(const char* name, const sFrequencyShiftParameters& setting);
|
||||
virtual bool addVocalMorpherEffectPreset(const char* name, const sVocalMorpherParameters& setting);
|
||||
virtual bool addPitchShifterEffectPreset(const char* name, const sPitchShifterParameters& setting);
|
||||
virtual bool addRingModulatorEffectPreset(const char* name, const sRingModulatorParameters& setting);
|
||||
virtual bool addAutowahEffectPreset(const char* name, const sAutowahParameters& setting);
|
||||
virtual bool addCompressorEffectPreset(const char* name, const sCompressorParameters& setting);
|
||||
virtual bool addEqualizerEffectPreset(const char* name, const sEqualizerParameters& setting);
|
||||
|
||||
virtual sEAXReverbParameters getEAXReverbEffectPreset(const char* name);
|
||||
virtual sReverbParameters getReverbEffectPreset(const char* name);
|
||||
virtual sChorusParameters getChorusEffectPreset(const char* name);
|
||||
virtual sDistortionParameters getDistortionEffectPreset(const char* name);
|
||||
virtual sEchoParameters getEchoEffectPreset(const char* name);
|
||||
virtual sFlangerParameters getFlangerEffectPreset(const char* name);
|
||||
virtual sFrequencyShiftParameters getFrequencyShiftEffectPreset(const char* name);
|
||||
virtual sVocalMorpherParameters getVocalMorpherEffectPreset(const char* name);
|
||||
virtual sPitchShifterParameters getPitchShifterEffectPreset(const char* name);
|
||||
virtual sRingModulatorParameters getRingModulatorEffectPreset(const char* name);
|
||||
virtual sAutowahParameters getAutowahEffectPreset(const char* name);
|
||||
virtual sCompressorParameters getCompressorEffectPreset(const char* name);
|
||||
virtual sEqualizerParameters getEqualizerEffectPreset(const char* name);
|
||||
|
||||
virtual void removeEffectPreset(const EffectTypes& type, const char* name);
|
||||
virtual bool isEffectPresetRegistered(const EffectTypes& type, const char* name);
|
||||
virtual void removeAllEffectPresets(const EffectTypes& type);
|
||||
|
||||
cEFXFunctions* getEFXInterface();
|
||||
void checkEFXSupportDetails();
|
||||
|
||||
private:
|
||||
cAudioMutex Mutex;
|
||||
cEFXFunctions EFXInterface;
|
||||
unsigned int MaxEffectsSupported;
|
||||
bool SupportedEffects[EET_COUNT];
|
||||
bool SupportedFilters[EFT_COUNT];
|
||||
|
||||
cAudioMap<cAudioString, sEAXReverbParameters>::Type EAXReverbPresets;
|
||||
cAudioMap<cAudioString, sReverbParameters>::Type ReverbPresets;
|
||||
cAudioMap<cAudioString, sChorusParameters>::Type ChorusPresets;
|
||||
cAudioMap<cAudioString, sDistortionParameters>::Type DistortionPresets;
|
||||
cAudioMap<cAudioString, sEchoParameters>::Type EchoPresets;
|
||||
cAudioMap<cAudioString, sFlangerParameters>::Type FlangerPresets;
|
||||
cAudioMap<cAudioString, sFrequencyShiftParameters>::Type FrequencyShiftPresets;
|
||||
cAudioMap<cAudioString, sVocalMorpherParameters>::Type VocalMorpherPresets;
|
||||
cAudioMap<cAudioString, sPitchShifterParameters>::Type PitchShifterPresets;
|
||||
cAudioMap<cAudioString, sRingModulatorParameters>::Type RingModulatorPresets;
|
||||
cAudioMap<cAudioString, sAutowahParameters>::Type AutowahPresets;
|
||||
cAudioMap<cAudioString, sCompressorParameters>::Type CompressorPresets;
|
||||
cAudioMap<cAudioString, sEqualizerParameters>::Type EqualizerPresets;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CAUDIOEFFECTS_H
|
|
@ -1,131 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CAUDIOMANAGER_H_INCLUDED
|
||||
#define CAUDIOMANAGER_H_INCLUDED
|
||||
|
||||
#include "cAudioSource.h"
|
||||
#include "../include/IAudioDecoderFactory.h"
|
||||
#include "cListener.h"
|
||||
#include "../include/IAudioManager.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
#include "../Headers/cAudioEffects.h"
|
||||
#include "../Headers/cMemoryOverride.h"
|
||||
#include "../Headers/cSTLAllocator.h"
|
||||
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_LINUX
|
||||
#include <AL/alext.h>
|
||||
#endif
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class IAudioSource;
|
||||
|
||||
class cAudioManager : public IAudioManager, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
enum Events{
|
||||
ON_INIT,
|
||||
ON_UPDATE,
|
||||
ON_RELEASE,
|
||||
ON_SOURCECREATE,
|
||||
ON_DECODERREGISTER,
|
||||
ON_DATASOURCEREGISTER,
|
||||
};
|
||||
|
||||
cAudioManager() : Device(NULL), Context(NULL), EFXSupported(false), Initialized(false) { }
|
||||
virtual ~cAudioManager() { }
|
||||
|
||||
virtual bool initialize(const char* deviceName = 0x0, int outputFrequency = -1, int eaxEffectSlots = 4);
|
||||
virtual void shutDown();
|
||||
virtual void update();
|
||||
virtual IAudioSource* getSoundByName(const char* name);
|
||||
virtual void releaseAllSources();
|
||||
virtual void release(IAudioSource* source);
|
||||
|
||||
virtual const char* getAvailableDeviceName(unsigned int index);
|
||||
virtual unsigned int getAvailableDeviceCount();
|
||||
virtual const char* getDefaultDeviceName();
|
||||
|
||||
virtual IAudioSource* create(const char* name, const char* filename, bool stream = false);
|
||||
virtual IAudioSource* createFromMemory(const char* name, const char* data, size_t length, const char* extension);
|
||||
virtual IAudioSource* createFromRaw(const char* name, const char* data, size_t length, unsigned int frequency, AudioFormats format);
|
||||
|
||||
virtual bool registerAudioDecoder(IAudioDecoderFactory* factory, const char* extension);
|
||||
virtual void unRegisterAudioDecoder(const char* extension);
|
||||
virtual bool isAudioDecoderRegistered(const char* extension);
|
||||
virtual IAudioDecoderFactory* getAudioDecoderFactory(const char* extension);
|
||||
virtual void unRegisterAllAudioDecoders();
|
||||
|
||||
virtual bool registerDataSource(IDataSourceFactory* factory, const char* name, int priority);
|
||||
virtual void unRegisterDataSource(const char* name);
|
||||
virtual bool isDataSourceRegistered(const char* name);
|
||||
virtual IDataSourceFactory* getDataSourceFactory(const char* name);
|
||||
virtual void unRegisterAllDataSources();
|
||||
|
||||
virtual void registerEventHandler(IManagerEventHandler* handler);
|
||||
virtual void unRegisterEventHandler(IManagerEventHandler* handler) ;
|
||||
virtual void unRegisterAllEventHandlers();
|
||||
|
||||
//! Grabs a list of available devices, as well as the default system one
|
||||
void getAvailableDevices();
|
||||
|
||||
virtual IListener* getListener() { return &initlistener; }
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
virtual IAudioEffects* getEffects() { return &initEffects; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
//! Mutex for thread syncronization
|
||||
cAudioMutex Mutex;
|
||||
|
||||
//! An OpenAL context pointer
|
||||
ALCcontext* Context;
|
||||
//! An OpenAL device pointer
|
||||
ALCdevice* Device;
|
||||
|
||||
//! Holds whether EFX is supported
|
||||
bool EFXSupported;
|
||||
|
||||
//! Whether the manager is currently initialized and ready to go.
|
||||
bool Initialized;
|
||||
|
||||
//! Holds an index for fast searching of audio sources by name
|
||||
cAudioMap<cAudioString, IAudioSource*>::Type audioIndex;
|
||||
typedef cAudioMap<cAudioString, IAudioSource*>::Type::iterator audioIndexIterator;
|
||||
//! Holds all managed audio sources
|
||||
cAudioVector<IAudioSource*>::Type audioSources;
|
||||
//! Decoder map that holds all decoders by file extension
|
||||
cAudioMap<cAudioString, IAudioDecoderFactory*>::Type decodermap;
|
||||
typedef cAudioMap<cAudioString, IAudioDecoderFactory*>::Type::iterator decodermapIterator;
|
||||
//! Archive map that holds all datasource types
|
||||
cAudioMap<cAudioString, IDataSourceFactory*>::Type datasourcemap;
|
||||
typedef cAudioMap<cAudioString, IDataSourceFactory*>::Type::iterator datasourcemapIterator;
|
||||
cAudioVector< std::pair<int, cAudioString> >::Type dataSourcePriorityList;
|
||||
|
||||
//! The listener object
|
||||
cListener initlistener;
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
//! Interface for audio effects
|
||||
cAudioEffects initEffects;
|
||||
#endif
|
||||
//! Check for OpenAL errors
|
||||
bool checkError();
|
||||
|
||||
cAudioVector<cAudioString>::Type AvailableDevices;
|
||||
cAudioString DefaultDevice;
|
||||
|
||||
//! Signals a event to all event handlers
|
||||
void signalEvent(Events sevent);
|
||||
|
||||
//! List of all attached event handlers
|
||||
cAudioList<IManagerEventHandler*>::Type eventHandlerList;
|
||||
};
|
||||
}
|
||||
|
||||
#endif //! CAUDIOMANAGER_H_INCLUDED
|
|
@ -1,184 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CAUDIOSOURCE_H_INCLUDED
|
||||
#define CAUDIOSOURCE_H_INCLUDED
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
|
||||
#include "../include/IAudioSource.h"
|
||||
#include "../include/cVector3.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
#include "../include/ILogger.h"
|
||||
#include "../Headers/cEFXFunctions.h"
|
||||
#include "../Headers/cMemoryOverride.h"
|
||||
#include "../Headers/cSTLAllocator.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
class cAudioSource : public IAudioSource, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
|
||||
enum Events{
|
||||
ON_UPDATE,
|
||||
ON_RELEASE,
|
||||
ON_PLAY,
|
||||
ON_PAUSE,
|
||||
ON_STOP,
|
||||
};
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
cAudioSource(IAudioDecoder* decoder, ALCcontext* context, cEFXFunctions* oALFunctions);
|
||||
#else
|
||||
cAudioSource(IAudioDecoder* decoder, ALCcontext* context);
|
||||
#endif
|
||||
~cAudioSource();
|
||||
|
||||
virtual bool play();
|
||||
virtual bool play2d(const bool& toLoop = false);
|
||||
virtual bool play3d(const cVector3& position, const float& soundstr = 1.0 , const bool& toLoop = false);
|
||||
|
||||
virtual void pause();
|
||||
virtual void stop();
|
||||
virtual void loop(const bool& toLoop);
|
||||
virtual bool seek(const float& seconds, bool relative = false);
|
||||
|
||||
virtual float getTotalAudioTime();
|
||||
virtual int getTotalAudioSize();
|
||||
virtual int getCompressedAudioSize();
|
||||
|
||||
virtual float getCurrentAudioTime();
|
||||
virtual int getCurrentAudioPosition();
|
||||
virtual int getCurrentCompressedAudioPosition();
|
||||
|
||||
virtual bool update();
|
||||
virtual void release();
|
||||
|
||||
virtual const bool isValid() const;
|
||||
virtual const bool isPlaying() const;
|
||||
virtual const bool isPaused() const;
|
||||
virtual const bool isStopped() const;
|
||||
virtual const bool isLooping() const;
|
||||
|
||||
virtual void setPosition(const cVector3& position);
|
||||
virtual void setVelocity(const cVector3& velocity);
|
||||
virtual void setDirection(const cVector3& direction);
|
||||
|
||||
virtual void setRolloffFactor(const float& rolloff);
|
||||
virtual void setStrength(const float& soundstrength);
|
||||
virtual void setMinDistance(const float& minDistance);
|
||||
virtual void setMaxDistance(const float& maxDistance);
|
||||
|
||||
virtual void setPitch(const float& pitch);
|
||||
virtual void setVolume(const float& volume);
|
||||
virtual void setMinVolume(const float& minVolume);
|
||||
virtual void setMaxVolume(const float& maxVolume);
|
||||
|
||||
virtual void setInnerConeAngle(const float& innerAngle);
|
||||
virtual void setOuterConeAngle(const float& outerAngle);
|
||||
virtual void setOuterConeVolume(const float& outerVolume);
|
||||
|
||||
virtual void setDopplerStrength(const float& dstrength);
|
||||
virtual void setDopplerVelocity(const cVector3& dvelocity);
|
||||
|
||||
virtual void move(const cVector3& position);
|
||||
|
||||
virtual const cVector3 getPosition() const;
|
||||
virtual const cVector3 getVelocity() const;
|
||||
virtual const cVector3 getDirection() const;
|
||||
|
||||
virtual const float getRolloffFactor() const;
|
||||
virtual const float getStrength() const;
|
||||
virtual const float getMinDistance() const;
|
||||
virtual const float getMaxDistance() const;
|
||||
|
||||
virtual const float getPitch() const;
|
||||
virtual const float getVolume() const;
|
||||
virtual const float getMinVolume() const;
|
||||
virtual const float getMaxVolume() const;
|
||||
|
||||
virtual const float getInnerConeAngle() const;
|
||||
virtual const float getOuterConeAngle() const;
|
||||
virtual const float getOuterConeVolume() const;
|
||||
|
||||
virtual const float getDopplerStrength() const;
|
||||
virtual const cVector3 getDopplerVelocity() const;
|
||||
|
||||
virtual void registerEventHandler(ISourceEventHandler* handler);
|
||||
virtual void unRegisterEventHandler(ISourceEventHandler* handler);
|
||||
virtual void unRegisterAllEventHandlers();
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
virtual unsigned int getNumEffectSlotsAvailable() const;
|
||||
virtual bool attachEffect(unsigned int slot, IEffect* effect);
|
||||
virtual void removeEffect(unsigned int slot);
|
||||
|
||||
virtual bool attachFilter(IFilter* filter);
|
||||
virtual void removeFilter();
|
||||
#endif
|
||||
|
||||
protected:
|
||||
private:
|
||||
//! Mutex for thread syncronization
|
||||
cAudioMutex Mutex;
|
||||
//! Empties the current working buffer queue
|
||||
void empty();
|
||||
//! Checks for OpenAL errors and reports them
|
||||
bool checkError();
|
||||
//! Streams audio data from the decoder into a buffer
|
||||
bool stream(ALuint buffer);
|
||||
//! Signals a event to all event handlers
|
||||
void signalEvent(Events sevent);
|
||||
//! Converts our audio format enum to OpenAL's
|
||||
ALenum convertAudioFormatEnum(AudioFormats format);
|
||||
|
||||
//! The context that owns this source
|
||||
ALCcontext* Context;
|
||||
|
||||
//! Internal audio buffers
|
||||
ALuint Buffers[CAUDIO_SOURCE_NUM_BUFFERS];
|
||||
//! OpenAL source
|
||||
ALuint Source;
|
||||
|
||||
ALenum oldState;
|
||||
//! cAudio decoder being used to stream data
|
||||
IAudioDecoder* Decoder;
|
||||
|
||||
//! Stores whether the source is to loop the audio stream
|
||||
bool Loop;
|
||||
//! Stores whether the source is ready to be used
|
||||
bool Valid;
|
||||
|
||||
//! List of registered event handlers
|
||||
cAudioList<ISourceEventHandler*>::Type eventHandlerList;
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
//! Holds pointers to all the EFX related functions
|
||||
cEFXFunctions* EFX;
|
||||
//! Updates the attached filter
|
||||
void updateFilter(bool remove = false);
|
||||
//! Updates the effect attached to a specific slot
|
||||
void updateEffect(unsigned int slot, bool remove = false);
|
||||
|
||||
//! Stores the effects attached to this source
|
||||
IEffect* Effects[CAUDIO_SOURCE_MAX_EFFECT_SLOTS];
|
||||
//! Stores the last updated time stamps for the attached effects
|
||||
unsigned int LastEffectTimeStamp[CAUDIO_SOURCE_MAX_EFFECT_SLOTS];
|
||||
|
||||
//! Stores the attached direct feed filter
|
||||
IFilter* Filter;
|
||||
//! Stores the last updated time stamp for the attached filter
|
||||
unsigned int LastFilterTimeStamp;
|
||||
|
||||
//! Number of effects supported by the OpenAL Context
|
||||
unsigned int EffectSlotsAvailable;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
#endif //! CAUDIOSOURCE_H_INCLUDED
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CCONSOLELOGRECEIVER_H_INCLUDED
|
||||
#define CCONSOLELOGRECEIVER_H_INCLUDED
|
||||
|
||||
#include "../include/ILogReceiver.h"
|
||||
#include "../include/cAudioDefines.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
class cConsoleLogReceiver : public ILogReceiver
|
||||
{
|
||||
public:
|
||||
virtual bool OnLogMessage(const char* sender, const char* message, LogLevel level, float time);
|
||||
};
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif //! CCONSOLELOGRECEIVER_H_INCLUDED
|
||||
|
|
@ -1,193 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CEFXFUNCTIONS_H
|
||||
#define CEFXFUNCTIONS_H
|
||||
|
||||
#include "../include/cAudioDefines.h"
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#include <AL/efx.h>
|
||||
#include <AL/efx-creative.h>
|
||||
|
||||
#include "../Headers/cMutex.h"
|
||||
|
||||
//To use EFX in linux.
|
||||
#ifndef ALC_EXT_EFX
|
||||
#define AL_FILTER_TYPE 0x8001
|
||||
#define AL_EFFECT_TYPE 0x8001
|
||||
#define AL_FILTER_NULL 0x0000
|
||||
#define AL_FILTER_LOWPASS 0x0001
|
||||
#define AL_FILTER_HIGHPASS 0x0002
|
||||
#define AL_FILTER_BANDPASS 0x0003
|
||||
#define AL_EFFECT_NULL 0x0000
|
||||
#define AL_EFFECT_EAXREVERB 0x8000
|
||||
#define AL_EFFECT_REVERB 0x0001
|
||||
#define AL_EFFECT_CHORUS 0x0002
|
||||
#define AL_EFFECT_DISTORTION 0x0003
|
||||
#define AL_EFFECT_ECHO 0x0004
|
||||
#define AL_EFFECT_FLANGER 0x0005
|
||||
#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006
|
||||
#define AL_EFFECT_VOCAL_MORPHER 0x0007
|
||||
#define AL_EFFECT_PITCH_SHIFTER 0x0008
|
||||
#define AL_EFFECT_RING_MODULATOR 0x0009
|
||||
#define AL_EFFECT_AUTOWAH 0x000A
|
||||
#define AL_EFFECT_COMPRESSOR 0x000B
|
||||
#define AL_EFFECT_EQUALIZER 0x000C
|
||||
#define ALC_EFX_MAJOR_VERSION 0x20001
|
||||
#define ALC_EFX_MINOR_VERSION 0x20002
|
||||
#define ALC_MAX_AUXILIARY_SENDS 0x20003
|
||||
#endif
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
//! EFX Extension function pointers and setup
|
||||
struct cEFXFunctions
|
||||
{
|
||||
cEFXFunctions::cEFXFunctions()
|
||||
{
|
||||
alGenEffects = NULL;
|
||||
alDeleteEffects = NULL;
|
||||
alIsEffect = NULL;
|
||||
alEffecti = NULL;
|
||||
alEffectiv = NULL;
|
||||
alEffectf = NULL;
|
||||
alEffectfv = NULL;
|
||||
alGetEffecti = NULL;
|
||||
alGetEffectiv = NULL;
|
||||
alGetEffectf = NULL;
|
||||
alGetEffectfv = NULL;
|
||||
|
||||
alGenFilters = NULL;
|
||||
alDeleteFilters = NULL;
|
||||
alIsFilter = NULL;
|
||||
alFilteri = NULL;
|
||||
alFilteriv = NULL;
|
||||
alFilterf = NULL;
|
||||
alFilterfv = NULL;
|
||||
alGetFilteri = NULL;
|
||||
alGetFilteriv = NULL;
|
||||
alGetFilterf = NULL;
|
||||
alGetFilterfv = NULL;
|
||||
|
||||
alGenAuxiliaryEffectSlots = NULL;
|
||||
alDeleteAuxiliaryEffectSlots = NULL;
|
||||
alIsAuxiliaryEffectSlot = NULL;
|
||||
alAuxiliaryEffectSloti = NULL;
|
||||
alAuxiliaryEffectSlotiv = NULL;
|
||||
alAuxiliaryEffectSlotf = NULL;
|
||||
alAuxiliaryEffectSlotfv = NULL;
|
||||
alGetAuxiliaryEffectSloti = NULL;
|
||||
alGetAuxiliaryEffectSlotiv = NULL;
|
||||
alGetAuxiliaryEffectSlotf = NULL;
|
||||
alGetAuxiliaryEffectSlotfv = NULL;
|
||||
|
||||
Supported = false;
|
||||
}
|
||||
|
||||
// Effect objects
|
||||
LPALGENEFFECTS alGenEffects;
|
||||
LPALDELETEEFFECTS alDeleteEffects;
|
||||
LPALISEFFECT alIsEffect;
|
||||
LPALEFFECTI alEffecti;
|
||||
LPALEFFECTIV alEffectiv;
|
||||
LPALEFFECTF alEffectf;
|
||||
LPALEFFECTFV alEffectfv;
|
||||
LPALGETEFFECTI alGetEffecti;
|
||||
LPALGETEFFECTIV alGetEffectiv;
|
||||
LPALGETEFFECTF alGetEffectf;
|
||||
LPALGETEFFECTFV alGetEffectfv;
|
||||
|
||||
// Filter objects
|
||||
LPALGENFILTERS alGenFilters;
|
||||
LPALDELETEFILTERS alDeleteFilters;
|
||||
LPALISFILTER alIsFilter;
|
||||
LPALFILTERI alFilteri;
|
||||
LPALFILTERIV alFilteriv;
|
||||
LPALFILTERF alFilterf;
|
||||
LPALFILTERFV alFilterfv;
|
||||
LPALGETFILTERI alGetFilteri;
|
||||
LPALGETFILTERIV alGetFilteriv;
|
||||
LPALGETFILTERF alGetFilterf;
|
||||
LPALGETFILTERFV alGetFilterfv;
|
||||
|
||||
// Auxiliary slot object
|
||||
LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots;
|
||||
LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots;
|
||||
LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot;
|
||||
LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti;
|
||||
LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv;
|
||||
LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf;
|
||||
LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv;
|
||||
LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti;
|
||||
LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv;
|
||||
LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf;
|
||||
LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv;
|
||||
|
||||
cAudioMutex Mutex;
|
||||
|
||||
bool Supported;
|
||||
|
||||
bool CheckEFXSupport(ALCdevice* device)
|
||||
{
|
||||
Supported = false;
|
||||
if (alcIsExtensionPresent(device, "ALC_EXT_EFX"))
|
||||
{
|
||||
// Get function pointers
|
||||
alGenEffects = (LPALGENEFFECTS)alGetProcAddress("alGenEffects");
|
||||
alDeleteEffects = (LPALDELETEEFFECTS )alGetProcAddress("alDeleteEffects");
|
||||
alIsEffect = (LPALISEFFECT )alGetProcAddress("alIsEffect");
|
||||
alEffecti = (LPALEFFECTI)alGetProcAddress("alEffecti");
|
||||
alEffectiv = (LPALEFFECTIV)alGetProcAddress("alEffectiv");
|
||||
alEffectf = (LPALEFFECTF)alGetProcAddress("alEffectf");
|
||||
alEffectfv = (LPALEFFECTFV)alGetProcAddress("alEffectfv");
|
||||
alGetEffecti = (LPALGETEFFECTI)alGetProcAddress("alGetEffecti");
|
||||
alGetEffectiv = (LPALGETEFFECTIV)alGetProcAddress("alGetEffectiv");
|
||||
alGetEffectf = (LPALGETEFFECTF)alGetProcAddress("alGetEffectf");
|
||||
alGetEffectfv = (LPALGETEFFECTFV)alGetProcAddress("alGetEffectfv");
|
||||
alGenFilters = (LPALGENFILTERS)alGetProcAddress("alGenFilters");
|
||||
alDeleteFilters = (LPALDELETEFILTERS)alGetProcAddress("alDeleteFilters");
|
||||
alIsFilter = (LPALISFILTER)alGetProcAddress("alIsFilter");
|
||||
alFilteri = (LPALFILTERI)alGetProcAddress("alFilteri");
|
||||
alFilteriv = (LPALFILTERIV)alGetProcAddress("alFilteriv");
|
||||
alFilterf = (LPALFILTERF)alGetProcAddress("alFilterf");
|
||||
alFilterfv = (LPALFILTERFV)alGetProcAddress("alFilterfv");
|
||||
alGetFilteri = (LPALGETFILTERI )alGetProcAddress("alGetFilteri");
|
||||
alGetFilteriv= (LPALGETFILTERIV )alGetProcAddress("alGetFilteriv");
|
||||
alGetFilterf = (LPALGETFILTERF )alGetProcAddress("alGetFilterf");
|
||||
alGetFilterfv= (LPALGETFILTERFV )alGetProcAddress("alGetFilterfv");
|
||||
alGenAuxiliaryEffectSlots = (LPALGENAUXILIARYEFFECTSLOTS)alGetProcAddress("alGenAuxiliaryEffectSlots");
|
||||
alDeleteAuxiliaryEffectSlots = (LPALDELETEAUXILIARYEFFECTSLOTS)alGetProcAddress("alDeleteAuxiliaryEffectSlots");
|
||||
alIsAuxiliaryEffectSlot = (LPALISAUXILIARYEFFECTSLOT)alGetProcAddress("alIsAuxiliaryEffectSlot");
|
||||
alAuxiliaryEffectSloti = (LPALAUXILIARYEFFECTSLOTI)alGetProcAddress("alAuxiliaryEffectSloti");
|
||||
alAuxiliaryEffectSlotiv = (LPALAUXILIARYEFFECTSLOTIV)alGetProcAddress("alAuxiliaryEffectSlotiv");
|
||||
alAuxiliaryEffectSlotf = (LPALAUXILIARYEFFECTSLOTF)alGetProcAddress("alAuxiliaryEffectSlotf");
|
||||
alAuxiliaryEffectSlotfv = (LPALAUXILIARYEFFECTSLOTFV)alGetProcAddress("alAuxiliaryEffectSlotfv");
|
||||
alGetAuxiliaryEffectSloti = (LPALGETAUXILIARYEFFECTSLOTI)alGetProcAddress("alGetAuxiliaryEffectSloti");
|
||||
alGetAuxiliaryEffectSlotiv = (LPALGETAUXILIARYEFFECTSLOTIV)alGetProcAddress("alGetAuxiliaryEffectSlotiv");
|
||||
alGetAuxiliaryEffectSlotf = (LPALGETAUXILIARYEFFECTSLOTF)alGetProcAddress("alGetAuxiliaryEffectSlotf");
|
||||
alGetAuxiliaryEffectSlotfv = (LPALGETAUXILIARYEFFECTSLOTFV)alGetProcAddress("alGetAuxiliaryEffectSlotfv");
|
||||
|
||||
if (alGenEffects && alDeleteEffects && alIsEffect && alEffecti && alEffectiv && alEffectf &&
|
||||
alEffectfv && alGetEffecti && alGetEffectiv && alGetEffectf && alGetEffectfv && alGenFilters &&
|
||||
alDeleteFilters && alIsFilter && alFilteri && alFilteriv && alFilterf && alFilterfv &&
|
||||
alGetFilteri && alGetFilteriv && alGetFilterf && alGetFilterfv && alGenAuxiliaryEffectSlots &&
|
||||
alDeleteAuxiliaryEffectSlots && alIsAuxiliaryEffectSlot && alAuxiliaryEffectSloti &&
|
||||
alAuxiliaryEffectSlotiv && alAuxiliaryEffectSlotf && alAuxiliaryEffectSlotfv &&
|
||||
alGetAuxiliaryEffectSloti && alGetAuxiliaryEffectSlotiv && alGetAuxiliaryEffectSlotf &&
|
||||
alGetAuxiliaryEffectSlotfv)
|
||||
Supported = true;
|
||||
}
|
||||
|
||||
return Supported;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CEFXFUNCTIONS_H
|
|
@ -1,127 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CEFFECT_H
|
||||
#define CEFFECT_H
|
||||
|
||||
#include "../include/IEffect.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
#include "../Headers/cEFXFunctions.h"
|
||||
#include "../Headers/cMemoryOverride.h"
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cEffect : public IEffect, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
cEffect(cEFXFunctions* oALFunctions);
|
||||
virtual ~cEffect();
|
||||
|
||||
virtual const EffectTypes& getType() const;
|
||||
virtual void setType(const EffectTypes& type);
|
||||
|
||||
virtual const sEAXReverbParameters& getEAXReverbParameters() const;
|
||||
virtual void setEAXReverbParameters(const sEAXReverbParameters& param);
|
||||
|
||||
virtual const sReverbParameters& getReverbParameters() const;
|
||||
virtual void setReverbParameters(const sReverbParameters& param);
|
||||
|
||||
virtual const sChorusParameters& getChorusParameters() const;
|
||||
virtual void setChorusParameters(const sChorusParameters& param);
|
||||
|
||||
virtual const sDistortionParameters& getDistortionParameters() const;
|
||||
virtual void setDistortionParameters(const sDistortionParameters& param);
|
||||
|
||||
virtual const sEchoParameters& getEchoParameters() const;
|
||||
virtual void setEchoParameters(const sEchoParameters& param);
|
||||
|
||||
virtual const sFlangerParameters& getFlangerParameters() const;
|
||||
virtual void setFlangerParameters(const sFlangerParameters& param);
|
||||
|
||||
virtual const sFrequencyShiftParameters& getFrequencyShiftParameters() const;
|
||||
virtual void setFrequencyShiftParameters(const sFrequencyShiftParameters& param);
|
||||
|
||||
virtual const sVocalMorpherParameters& getVocalMorpherParameters() const;
|
||||
virtual void setVocalMorpherParameters(const sVocalMorpherParameters& param);
|
||||
|
||||
virtual const sPitchShifterParameters& getPitchShifterParameters() const;
|
||||
virtual void setPitchShifterParameters(const sPitchShifterParameters& param);
|
||||
|
||||
virtual const sRingModulatorParameters& getRingModulatorParameters() const;
|
||||
virtual void setRingModulatorParameters(const sRingModulatorParameters& param);
|
||||
|
||||
virtual const sAutowahParameters& getAutowahParameters() const;
|
||||
virtual void setAutowahParameters(const sAutowahParameters& param);
|
||||
|
||||
virtual const sCompressorParameters& getCompressorParameters() const;
|
||||
virtual void setCompressorParameters(const sCompressorParameters& param);
|
||||
|
||||
virtual const sEqualizerParameters& getEqualizerParameters() const;
|
||||
virtual void setEqualizerParameters(const sEqualizerParameters& param);
|
||||
|
||||
virtual float getMasterVolume() const;
|
||||
virtual void setMasterVolume(const float& volume);
|
||||
|
||||
virtual bool isIgnoringAttenuation() const;
|
||||
virtual void ignoreAttenuation(const bool& ignore);
|
||||
|
||||
virtual IFilter* getFilter() const;
|
||||
virtual void attachFilter(IFilter* filter);
|
||||
virtual void removeFilter();
|
||||
|
||||
virtual unsigned int getLastUpdated() const;
|
||||
virtual bool isValid() const;
|
||||
|
||||
ALuint getOpenALEffect() const;
|
||||
ALuint getOpenALEffectSlot() const;
|
||||
|
||||
private:
|
||||
cEFXFunctions* EFX;
|
||||
//Mutex for thread syncronization
|
||||
cAudioMutex Mutex;
|
||||
|
||||
EffectTypes Type;
|
||||
float Volume;
|
||||
bool IgnoreAttenuation;
|
||||
unsigned int LastUpdated;
|
||||
|
||||
bool Valid;
|
||||
|
||||
IFilter* Filter;
|
||||
|
||||
ALuint Effect;
|
||||
ALuint EffectSlot;
|
||||
|
||||
bool UpdateEffect();
|
||||
bool CheckError();
|
||||
ALenum ConvertEffectEnum(EffectTypes type);
|
||||
ALenum ConvertFrequencyShiftEnum(sFrequencyShiftParameters::ShiftDirection shift);
|
||||
ALenum ConvertVocalMorphPhonemeEnum(sVocalMorpherParameters::MorpherPhoneme phoneme);
|
||||
|
||||
//Storage for all the possible settings for effects
|
||||
sEAXReverbParameters EAXReverbParam;
|
||||
sReverbParameters ReverbParam;
|
||||
sChorusParameters ChorusParam;
|
||||
sDistortionParameters DistortionParam;
|
||||
sEchoParameters EchoParam;
|
||||
sFlangerParameters FlangerParam;
|
||||
sFrequencyShiftParameters FrequencyShiftParam;
|
||||
sVocalMorpherParameters VocalMorpherParam;
|
||||
sPitchShifterParameters PitchShifterParam;
|
||||
sRingModulatorParameters RingModulatorParam;
|
||||
sAutowahParameters AutowahParam;
|
||||
sCompressorParameters CompressorParam;
|
||||
sEqualizerParameters EqualizerParam;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CEFFECT_H
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CFILELOGRECEIVER_H_INCLUDED
|
||||
#define CFILELOGERCEIVER_H_INCLUDED
|
||||
|
||||
#include "../include/ILogReceiver.h"
|
||||
#include "../include/cAudioDefines.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
class cFileLogReceiver : public ILogReceiver
|
||||
{
|
||||
public:
|
||||
cFileLogReceiver();
|
||||
~cFileLogReceiver();
|
||||
|
||||
bool OnLogMessage(const char* sender, const char* message, LogLevel level, float time);
|
||||
|
||||
private:
|
||||
|
||||
bool firsttime;
|
||||
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif //!CFILELOGRECEIVER_H_INCLUDED
|
|
@ -1,45 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CFILESOURCE_H
|
||||
#define CFILESOURCE_H
|
||||
|
||||
#include "../include/IDataSource.h"
|
||||
#include "../include/cAudioDefines.h"
|
||||
#include "../Headers/cMemoryOverride.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
|
||||
#include <fstream>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
class cFileSource : public IDataSource, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
cFileSource(const char* filename);
|
||||
~cFileSource();
|
||||
|
||||
virtual bool isValid();
|
||||
virtual int getCurrentPos();
|
||||
virtual int getSize();
|
||||
virtual int read(void* output, int size);
|
||||
virtual bool seek(int amount, bool relative);
|
||||
|
||||
protected:
|
||||
//! Holds if valid
|
||||
bool Valid;
|
||||
//! Holds file size
|
||||
int Filesize;
|
||||
//! File stream
|
||||
FILE* pFile;
|
||||
private:
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CFILESOURCE_H
|
|
@ -1,60 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CFILESOURCEFACTORY_H
|
||||
#define CFILESOURCEFACTORY_H
|
||||
|
||||
#include "../include/IDataSourceFactory.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
|
||||
#include "../Headers/cFileSource.h"
|
||||
#include "../Headers/cMemorySource.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cFileSourceFactory : public IDataSourceFactory
|
||||
{
|
||||
public:
|
||||
cFileSourceFactory() { }
|
||||
virtual ~cFileSourceFactory() { }
|
||||
|
||||
virtual IDataSource* CreateDataSource(const char* filename, bool streamingRequested)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
IDataSource* source = CAUDIO_NEW cFileSource(filename);
|
||||
|
||||
if(!streamingRequested && source && source->isValid())
|
||||
{
|
||||
//A bit hackish, but if the user doesn't want streaming, make this a memory source
|
||||
int length = source->getSize();
|
||||
char* tempbuf = (char*)CAUDIO_MALLOC(length);
|
||||
if(tempbuf)
|
||||
{
|
||||
source->read(tempbuf, length);
|
||||
IDataSource* memSource = CAUDIO_NEW cMemorySource(tempbuf, length, true);
|
||||
CAUDIO_FREE(tempbuf);
|
||||
|
||||
if(memSource && memSource->isValid())
|
||||
{
|
||||
source->drop();
|
||||
return memSource;
|
||||
}
|
||||
|
||||
if(memSource)
|
||||
memSource->drop();
|
||||
}
|
||||
}
|
||||
return source;
|
||||
}
|
||||
protected:
|
||||
cAudioMutex Mutex;
|
||||
private:
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CFILESOURCEFACTORY_H
|
|
@ -1,67 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CFILTER_H
|
||||
#define CFILTER_H
|
||||
|
||||
#include "../include/IFilter.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
#include "../Headers/cEFXFunctions.h"
|
||||
#include "../Headers/cMemoryOverride.h"
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cFilter : public IFilter, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
cFilter(cEFXFunctions* oALFunctions);
|
||||
~cFilter();
|
||||
|
||||
virtual const FilterTypes& getType() const;
|
||||
virtual void setType(const FilterTypes& type);
|
||||
|
||||
virtual float getVolume() const;
|
||||
virtual void setVolume(const float& volume);
|
||||
|
||||
virtual float getLowFrequencyVolume() const;
|
||||
virtual void setLowFrequencyVolume(const float& volumeLF);
|
||||
|
||||
virtual float getHighFrequencyVolume() const;
|
||||
virtual void setHighFrequencyVolume(const float& volumeHF);
|
||||
|
||||
virtual unsigned int getLastUpdated() const;
|
||||
virtual bool isValid() const;
|
||||
|
||||
ALuint getOpenALFilter() const;
|
||||
|
||||
protected:
|
||||
cEFXFunctions* EFX;
|
||||
|
||||
//Mutex for thread syncronization
|
||||
cAudioMutex Mutex;
|
||||
|
||||
FilterTypes Type;
|
||||
float Volume;
|
||||
float LowFreqVolume;
|
||||
float HighFreqVolume;
|
||||
unsigned int LastUpdated;
|
||||
|
||||
bool Valid;
|
||||
|
||||
ALuint Filter;
|
||||
|
||||
bool UpdateFilter();
|
||||
bool CheckError();
|
||||
ALenum ConvertFilterEnum(FilterTypes type);
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CFILTER_H
|
|
@ -1,50 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CLISTENER_H_INCLUDED
|
||||
#define CLISTENER_H_INCLUDED
|
||||
|
||||
#include "../include/IListener.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cListener : public IListener
|
||||
{
|
||||
public:
|
||||
cListener() : Direction(cVector3(0.f, 0.f, -1.f)),
|
||||
UpVector(cVector3(0.f, 1.f, 0.f)),
|
||||
MasterGain(1.f) {}
|
||||
virtual ~cListener() {}
|
||||
|
||||
virtual void setPosition(const cVector3& pos);
|
||||
virtual void setDirection(const cVector3& dir);
|
||||
virtual void setUpVector(const cVector3& up);
|
||||
virtual void setVelocity(const cVector3& vel);
|
||||
virtual void setMasterVolume(const float& volume);
|
||||
virtual void move(const cVector3& pos);
|
||||
|
||||
virtual cVector3 getPosition(void) const { return Position; }
|
||||
virtual cVector3 getDirection(void) const { return Direction; }
|
||||
virtual cVector3 getUpVector(void) const { return UpVector; }
|
||||
virtual cVector3 getVelocity(void) const { return Velocity; }
|
||||
virtual float getMasterVolume(void) const { return MasterGain; }
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
virtual void setMetersPerUnit(const float& meters);
|
||||
virtual float getMetersPerUnit(void) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
cAudioMutex Mutex;
|
||||
|
||||
cVector3 Position;
|
||||
cVector3 Direction;
|
||||
cVector3 UpVector;
|
||||
cVector3 Velocity;
|
||||
float MasterGain;
|
||||
private:
|
||||
};
|
||||
}
|
||||
#endif //! CLISTENER_H_INCLUDED
|
|
@ -1,48 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CLOGGER_H_INCLUDED
|
||||
#define CLOGGER_H_INCLUDED
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "../include/ILogger.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
#include "../Headers/cSTLAllocator.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cLogger : public ILogger
|
||||
{
|
||||
public:
|
||||
cLogger();
|
||||
virtual ~cLogger() { }
|
||||
|
||||
virtual void logCritical( const char* sender, const char *msg, ... );
|
||||
virtual void logError( const char* sender, const char *msg, ... );
|
||||
virtual void logWarning( const char* sender, const char *msg, ... );
|
||||
virtual void logInfo( const char* sender, const char *msg, ... );
|
||||
virtual void logDebug( const char* sender, const char *msg, ... );
|
||||
|
||||
virtual const LogLevel& getLogLevel() const { return MinLogLevel; }
|
||||
virtual void setLogLevel( const LogLevel& logLevel );
|
||||
|
||||
virtual bool registerLogReceiver(ILogReceiver* receiver, const char* name);
|
||||
virtual void unRegisterLogReceiver(const char* name);
|
||||
virtual bool isLogReceiverRegistered(const char* name);
|
||||
virtual ILogReceiver* getLogReceiver(const char* name);
|
||||
|
||||
protected:
|
||||
void broadcastMessage( LogLevel level, const char* sender, const char* msg, va_list args );
|
||||
|
||||
cAudioMutex Mutex;
|
||||
unsigned long StartTime;
|
||||
char TempTextBuf[2048];
|
||||
LogLevel MinLogLevel;
|
||||
cAudioMap<cAudioString, ILogReceiver*>::Type Receivers;
|
||||
typedef cAudioMap<cAudioString, ILogReceiver*>::Type::iterator ReceiversIterator;
|
||||
private:
|
||||
};
|
||||
};
|
||||
#endif //! CLOGGER_H_INCLUDED
|
|
@ -1,66 +0,0 @@
|
|||
#ifndef CMEMORYOVERRIDE_H_INCLUDED
|
||||
#define CMEMORYOVERRIDE_H_INCLUDED
|
||||
|
||||
#include <new>
|
||||
#include "../include/cAudioMemory.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
//! Overrides the memory allocations for classes derived from it and makes them use the cAudio memory system
|
||||
class cMemoryOverride
|
||||
{
|
||||
public:
|
||||
void* operator new(size_t size, const char* file, int line, const char* function)
|
||||
{
|
||||
return cAudio::getMemoryProvider()->Allocate(size, file, line, function);
|
||||
}
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return cAudio::getMemoryProvider()->Allocate(size, NULL, -1, NULL);
|
||||
}
|
||||
|
||||
void* operator new(size_t size, void* pointer)
|
||||
{
|
||||
(void) size;
|
||||
return pointer;
|
||||
}
|
||||
|
||||
void* operator new[] ( size_t size, const char* file, int line, const char* function )
|
||||
{
|
||||
return cAudio::getMemoryProvider()->Allocate(size, file, line, function);
|
||||
}
|
||||
|
||||
void* operator new[] ( size_t size )
|
||||
{
|
||||
return cAudio::getMemoryProvider()->Allocate(size, NULL, -1, NULL);
|
||||
}
|
||||
|
||||
void operator delete( void* pointer )
|
||||
{
|
||||
cAudio::getMemoryProvider()->Free(pointer);
|
||||
}
|
||||
|
||||
void operator delete( void* pointer, void* )
|
||||
{
|
||||
cAudio::getMemoryProvider()->Free(pointer);
|
||||
}
|
||||
|
||||
void operator delete( void* pointer, const char* , int , const char* )
|
||||
{
|
||||
cAudio::getMemoryProvider()->Free(pointer);
|
||||
}
|
||||
|
||||
void operator delete[] ( void* pointer )
|
||||
{
|
||||
cAudio::getMemoryProvider()->Free(pointer);
|
||||
}
|
||||
|
||||
void operator delete[] ( void* pointer, const char* , int , const char* )
|
||||
{
|
||||
cAudio::getMemoryProvider()->Free(pointer);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
#endif //! CMEMORYOVERRIDE_H_INCLUDED
|
|
@ -1,41 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CMEMORYSOURCE_H
|
||||
#define CMEMORYSOURCE_H
|
||||
|
||||
#include "../include/IDataSource.h"
|
||||
#include "../Headers/cMemoryOverride.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
//!Class used to read from a memory buffer.
|
||||
class cMemorySource : public IDataSource, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
/** Default Constructor
|
||||
\param data: Pointer to a data buffer to use.
|
||||
\param size: Size of the target buffer.
|
||||
\param copy: Whether to copy the buffer or use the provided pointer. On destruct, that pointer will be deleted unless copy is true.
|
||||
*/
|
||||
cMemorySource(const void* data, int size, bool copy);
|
||||
~cMemorySource();
|
||||
|
||||
virtual bool isValid();
|
||||
virtual int getCurrentPos();
|
||||
virtual int getSize();
|
||||
virtual int read(void* output, int size);
|
||||
virtual bool seek(int amount, bool relative);
|
||||
protected:
|
||||
char* Data;
|
||||
int Size;
|
||||
bool Valid;
|
||||
int Pos;
|
||||
private:
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif //! CMEMORYSOURCE_H
|
|
@ -1,74 +0,0 @@
|
|||
#ifndef CMEMORYTRACKER_H_INCLUDED
|
||||
#define CMEMORYTRACKER_H_INCLUDED
|
||||
|
||||
#include "../include/cAudioDefines.h"
|
||||
|
||||
#ifdef CAUDIO_USE_MEMORYTRACKER
|
||||
|
||||
#include <map>
|
||||
#include "../Headers/cMutex.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
//! Tracks all allocations that go through cAudio's memory system and keeps statistics on it
|
||||
class cMemoryTracker
|
||||
{
|
||||
public:
|
||||
cMemoryTracker();
|
||||
~cMemoryTracker();
|
||||
|
||||
static cMemoryTracker* Instance()
|
||||
{
|
||||
static cMemoryTracker Singleton;
|
||||
return &Singleton;
|
||||
}
|
||||
|
||||
//! Adds an allocation to be tracked
|
||||
void AddAllocation(void* pointer, size_t size, const char* filename, int line, const char* function);
|
||||
|
||||
//! Removes a previously tracked allocation (for when it has been deallocated)
|
||||
void RemoveAllocation(void* pointer);
|
||||
|
||||
private:
|
||||
cAudioMutex Mutex;
|
||||
|
||||
struct cTrackedMemoryBlock
|
||||
{
|
||||
size_t size;
|
||||
const char* filename;
|
||||
int line;
|
||||
const char* function;
|
||||
};
|
||||
|
||||
std::map<void*, cTrackedMemoryBlock> TrackedBlocks;
|
||||
|
||||
#ifdef CAUDIO_MEMORYTRACKER_GENERATE_STATISTICS
|
||||
struct Statistics
|
||||
{
|
||||
Statistics() : AllocationHighWaterMark(0), CurrentAllocationBytes(0),
|
||||
TotalAllocationBytes(0), MaxNumAllocations(0),
|
||||
CurrentNumAllocations(0), TotalNumAllocations(0)
|
||||
{ }
|
||||
size_t AllocationHighWaterMark;
|
||||
size_t CurrentAllocationBytes;
|
||||
size_t TotalAllocationBytes;
|
||||
|
||||
size_t MaxNumAllocations;
|
||||
size_t CurrentNumAllocations;
|
||||
size_t TotalNumAllocations;
|
||||
} MemStats;
|
||||
#endif
|
||||
|
||||
void DumpLeaks();
|
||||
|
||||
#ifdef CAUDIO_MEMORYTRACKER_LOG_ALL_ALLOCATIONS
|
||||
std::ofstream outMemLog;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CMEMORYTRACKER_H_INCLUDED
|
|
@ -1,71 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CAUDIOMUTEX_H
|
||||
#define CAUDIOMUTEX_H
|
||||
|
||||
#include "../include/cAudioDefines.h"
|
||||
|
||||
#ifdef CAUDIO_MAKE_THREAD_SAFE
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
#include <windows.h> //Basic windows include
|
||||
#else
|
||||
#include <pthread.h> //Assumed linux system
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
#ifdef CAUDIO_MAKE_THREAD_SAFE
|
||||
//! Basic mutex class used for internal thread locking
|
||||
class cAudioMutex
|
||||
{
|
||||
public:
|
||||
cAudioMutex();
|
||||
~cAudioMutex();
|
||||
|
||||
void lock();
|
||||
void unlock();
|
||||
private:
|
||||
void initialize();
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
CRITICAL_SECTION criticalSection;
|
||||
#else
|
||||
pthread_mutex_t Mutex;
|
||||
#endif
|
||||
bool Initialized;
|
||||
};
|
||||
#else
|
||||
//Dud class to disable the mutex
|
||||
class cAudioMutex
|
||||
{
|
||||
public:
|
||||
cAudioMutex();
|
||||
~cAudioMutex();
|
||||
|
||||
void lock();
|
||||
void unlock();
|
||||
private:
|
||||
void initialize();
|
||||
bool Initialized;
|
||||
};
|
||||
#endif
|
||||
|
||||
class cAudioMutexBasicLock
|
||||
{
|
||||
public:
|
||||
cAudioMutexBasicLock(cAudioMutex& mutex) : Mutex(&mutex)
|
||||
{
|
||||
Mutex->lock();
|
||||
}
|
||||
~cAudioMutexBasicLock()
|
||||
{
|
||||
Mutex->unlock();
|
||||
}
|
||||
protected:
|
||||
cAudioMutex* Mutex;
|
||||
};
|
||||
};
|
||||
|
||||
#endif //! CAUDIOMUTEX_H
|
|
@ -1,40 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef COGGAUDIODECODERFACTORY_H
|
||||
#define COGGAUDIODECODERFACTORY_H
|
||||
|
||||
#include "../include/IAudioDecoderFactory.h"
|
||||
#include "cOggDecoder.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_OGG_DECODER
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
class cOggAudioDecoderFactory : public IAudioDecoderFactory
|
||||
{
|
||||
public:
|
||||
cOggAudioDecoderFactory() {}
|
||||
~cOggAudioDecoderFactory() {}
|
||||
|
||||
IAudioDecoder* CreateAudioDecoder(IDataSource* stream)
|
||||
{
|
||||
Mutex.lock();
|
||||
IAudioDecoder* decoder = CAUDIO_NEW cOggDecoder(stream);
|
||||
Mutex.unlock();
|
||||
return decoder;
|
||||
}
|
||||
|
||||
protected:
|
||||
cAudioMutex Mutex;
|
||||
private:
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! COGGAUDIODECODERFACTORY_H
|
|
@ -1,58 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef COGGDECODER_H_INCLUDED
|
||||
#define COGGDECODER_H_INCLUDED
|
||||
|
||||
#include "../include/cAudioDefines.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_OGG_DECODER
|
||||
|
||||
#include "../include/IAudioDecoder.h"
|
||||
#include <ogg/ogg.h>
|
||||
#include <vorbis/codec.h>
|
||||
#include <vorbis/vorbisfile.h>
|
||||
#include "../Headers/cMemoryOverride.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
class cOggDecoder : public IAudioDecoder, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
|
||||
cOggDecoder(IDataSource* stream);
|
||||
~cOggDecoder();
|
||||
|
||||
virtual AudioFormats getFormat();
|
||||
virtual int getFrequency();
|
||||
virtual bool isSeekingSupported();
|
||||
virtual bool isValid();
|
||||
virtual int readAudioData(void* output, int amount);
|
||||
virtual bool setPosition(int position, bool relative);
|
||||
virtual bool seek(float seconds,bool relative);
|
||||
virtual float getTotalTime();
|
||||
virtual int getTotalSize();
|
||||
virtual int getCompressedSize();
|
||||
virtual float getCurrentTime();
|
||||
virtual int getCurrentPosition();
|
||||
virtual int getCurrentCompressedPosition();
|
||||
|
||||
protected:
|
||||
//! Callbacks used for read memory
|
||||
ov_callbacks vorbisCallbacks;
|
||||
//! Format information
|
||||
vorbis_info* vorbisInfo;
|
||||
//! User Comments
|
||||
vorbis_comment* vorbisComment;
|
||||
//! Stream handle
|
||||
OggVorbis_File oggStream;
|
||||
bool Valid;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! COGGDECODER_H_INCLUDED
|
|
@ -1,84 +0,0 @@
|
|||
#ifndef CPLUGINMANAGER_H_INCLUDED
|
||||
#define CPLUGINMANAGER_H_INCLUDED
|
||||
|
||||
#include "../include/IPluginManager.h"
|
||||
#include "../include/IAudioPlugin.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
#include "../Headers/cSTLAllocator.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_DYNAMIC_PLUGIN_SUPPORT
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
|
||||
struct HINSTANCE__;
|
||||
typedef struct HINSTANCE__* hInstance;
|
||||
|
||||
# define DYNLIB_HANDLE hInstance
|
||||
# define DYNLIB_LOAD( a ) LoadLibraryEx( a, NULL, LOAD_WITH_ALTERED_SEARCH_PATH )
|
||||
# define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
|
||||
# define DYNLIB_UNLOAD( a ) !FreeLibrary( a )
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_MAC
|
||||
# include <dlfcn.h>
|
||||
# define DYNLIB_HANDLE void*
|
||||
# define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY | RTLD_GLOBAL)
|
||||
# define DYNLIB_GETSYM( a, b ) dlsym( a, b )
|
||||
# define DYNLIB_UNLOAD( a ) dlclose( a )
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_LINUX
|
||||
# include <dlfcn.h>
|
||||
# define DYNLIB_HANDLE void*
|
||||
# define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY | RTLD_GLOBAL)
|
||||
# define DYNLIB_GETSYM( a, b ) dlsym( a, b )
|
||||
# define DYNLIB_UNLOAD( a ) dlclose( a )
|
||||
#endif
|
||||
|
||||
#endif //! CAUDIO_COMPILE_WITH_DYNAMIC_PLUGIN_SUPPORT
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cPluginManager : public IPluginManager
|
||||
{
|
||||
public:
|
||||
cPluginManager();
|
||||
~cPluginManager();
|
||||
|
||||
static cPluginManager* Instance()
|
||||
{
|
||||
static cPluginManager theInstance;
|
||||
return &theInstance;
|
||||
}
|
||||
|
||||
virtual bool installPlugin(IAudioPlugin* plugin, const char* name);
|
||||
virtual bool installPlugin(const char* filename, const char* name);
|
||||
|
||||
virtual bool checkForPlugin(const char* name);
|
||||
virtual IAudioPlugin* getPlugin(const char* name);
|
||||
virtual unsigned int getPluginCount();
|
||||
cAudioVector<IAudioPlugin*>::Type getPluginList();
|
||||
|
||||
virtual void uninstallPlugin(IAudioPlugin* plugin);
|
||||
virtual void uninstallPlugin(const char* name);
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_DYNAMIC_PLUGIN_SUPPORT
|
||||
void autoLoadPlugins();
|
||||
#endif
|
||||
protected:
|
||||
cAudioMap<cAudioString, IAudioPlugin*>::Type RegisteredPlugins;
|
||||
typedef cAudioMap<cAudioString, IAudioPlugin*>::Type::iterator RegisteredPluginsIterator;
|
||||
#ifdef CAUDIO_COMPILE_WITH_DYNAMIC_PLUGIN_SUPPORT
|
||||
cAudioMap<IAudioPlugin*, DYNLIB_HANDLE>::Type DynamicallyLoadedPlugins;
|
||||
typedef cAudioMap<IAudioPlugin*, DYNLIB_HANDLE>::Type::iterator DynamicallyLoadedPluginsIterator;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
#endif //! CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
|
||||
#endif //! CPLUGINMANAGER_H_INCLUDED
|
|
@ -1,43 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CRAWAUDIODECODERFACOTRY_H_INCLUDED
|
||||
#define CRAWAUDIODECODERFACOTRY_H_INCLUDED
|
||||
|
||||
#include "../include/IAudioDecoderFactory.h"
|
||||
#include "cRawDecoder.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
class cRawAudioDecoderFactory : public IAudioDecoderFactory
|
||||
{
|
||||
public:
|
||||
cRawAudioDecoderFactory() {}
|
||||
~cRawAudioDecoderFactory() {}
|
||||
|
||||
IAudioDecoder* CreateAudioDecoder(IDataSource* stream)
|
||||
{
|
||||
Mutex.lock();
|
||||
IAudioDecoder* decoder = CAUDIO_NEW cRawDecoder(stream, 22050, EAF_16BIT_MONO);
|
||||
Mutex.unlock();
|
||||
return decoder;
|
||||
}
|
||||
|
||||
IAudioDecoder* CreateAudioDecoder(IDataSource* stream, unsigned int frequency = 22050, AudioFormats format = EAF_16BIT_MONO)
|
||||
{
|
||||
Mutex.lock();
|
||||
IAudioDecoder* decoder = CAUDIO_NEW cRawDecoder(stream, frequency, format);
|
||||
Mutex.unlock();
|
||||
return decoder;
|
||||
}
|
||||
protected:
|
||||
cAudioMutex Mutex;
|
||||
private:
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif //! CRAWAUDIODECODERFACOTRY_H_INCLUDED
|
|
@ -1,40 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CRAWDECODER_H_INCLUDED
|
||||
#define CRAWDECODER_H_INCLUDED
|
||||
|
||||
#include "../include/IAudioDecoder.h"
|
||||
#include "../Headers/cMemoryOverride.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cRawDecoder : public IAudioDecoder, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
|
||||
cRawDecoder(IDataSource* stream, unsigned int frequency, AudioFormats format);
|
||||
~cRawDecoder();
|
||||
|
||||
virtual AudioFormats getFormat();
|
||||
virtual int getFrequency();
|
||||
virtual bool isSeekingSupported();
|
||||
virtual bool isValid();
|
||||
virtual int readAudioData(void* output, int amount);
|
||||
virtual bool setPosition(int position, bool relative);
|
||||
virtual bool seek(float seconds,bool relative);
|
||||
virtual float getTotalTime();
|
||||
virtual int getTotalSize();
|
||||
virtual int getCompressedSize();
|
||||
virtual float getCurrentTime();
|
||||
virtual int getCurrentPosition();
|
||||
virtual int getCurrentCompressedPosition();
|
||||
|
||||
private:
|
||||
unsigned int Frequency;
|
||||
AudioFormats Format;
|
||||
};
|
||||
};
|
||||
|
||||
#endif //! CRAWDECODER_H_INCLUDED
|
|
@ -1,132 +0,0 @@
|
|||
#ifndef CSTLALLOCATOR_H_INCLUDED
|
||||
#define CSTLALLOCATOR_H_INCLUDED
|
||||
|
||||
#include "../include/cAudioDefines.h"
|
||||
#include "../include/cAudioMemory.h"
|
||||
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
#ifdef CAUDIO_REROUTE_STL_ALLOCATIONS
|
||||
//! Reroutes allocations from STL containers into cAudio's memory system
|
||||
template <typename T> class cSTLAllocator
|
||||
{
|
||||
public:
|
||||
typedef T value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
template<typename U>
|
||||
struct rebind
|
||||
{
|
||||
typedef cSTLAllocator<U> other;
|
||||
};
|
||||
|
||||
cSTLAllocator()
|
||||
{ }
|
||||
|
||||
~cSTLAllocator() throw()
|
||||
{ }
|
||||
|
||||
cSTLAllocator( const cSTLAllocator& ) throw()
|
||||
{ }
|
||||
|
||||
template <typename U>
|
||||
cSTLAllocator( const cSTLAllocator<U>& ) throw()
|
||||
{ }
|
||||
|
||||
pointer address(reference x) const
|
||||
{
|
||||
return &x;
|
||||
}
|
||||
|
||||
const_pointer address(const_reference x) const
|
||||
{
|
||||
return &x;
|
||||
}
|
||||
|
||||
pointer allocate( size_type count, typename std::allocator<void>::const_pointer ptr = 0 )
|
||||
{
|
||||
(void)ptr;
|
||||
register size_type size = count*sizeof( T );
|
||||
pointer p = static_cast<pointer>(CAUDIO_MALLOC(size));
|
||||
return p;
|
||||
}
|
||||
|
||||
void deallocate( pointer p, size_type size )
|
||||
{
|
||||
CAUDIO_FREE(p);
|
||||
}
|
||||
|
||||
size_type max_size() const throw()
|
||||
{
|
||||
return cAudio::getMemoryProvider()->getMaxAllocationSize();
|
||||
}
|
||||
|
||||
void construct(pointer p, const T& val)
|
||||
{
|
||||
// call placement new
|
||||
new(static_cast<void*>(p)) T(val);
|
||||
}
|
||||
|
||||
void destroy(pointer p)
|
||||
{
|
||||
p->~T();
|
||||
}
|
||||
};
|
||||
|
||||
template<> class cSTLAllocator<void>
|
||||
{
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef void* pointer;
|
||||
typedef const void* const_pointer;
|
||||
typedef void value_type;
|
||||
|
||||
template<typename U>
|
||||
struct rebind
|
||||
{
|
||||
typedef cSTLAllocator<U> other;
|
||||
};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline bool operator==(const cSTLAllocator<T>&, const cSTLAllocator<T>&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool operator!=(const cSTLAllocator<T>&, const cSTLAllocator<T>&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_REROUTE_STL_ALLOCATIONS
|
||||
typedef std::basic_string< char, std::char_traits<char>, cSTLAllocator<char> > cAudioString;
|
||||
template<typename T1, typename T2> struct cAudioMap { typedef std::map< T1, T2, std::less< T1 >, cSTLAllocator< std::pair< T1, T2 > > > Type; };
|
||||
template<typename T> struct cAudioSet { typedef std::set< T, std::less< T >, cSTLAllocator< T > > Type; };
|
||||
template<typename T> struct cAudioList { typedef std::list< T, cSTLAllocator< T > > Type; };
|
||||
template<typename T> struct cAudioVector { typedef std::vector< T, cSTLAllocator< T > > Type; };
|
||||
#else
|
||||
typedef std::string cAudioString;
|
||||
template<typename T1, typename T2> struct cAudioMap { typedef std::map< T1, T2> Type; };
|
||||
template<typename T> struct cAudioSet { typedef std::set< T > Type; };
|
||||
template<typename T> struct cAudioList { typedef std::list< T > Type; };
|
||||
template<typename T> struct cAudioVector { typedef std::vector< T > Type; };
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif //! CSTLALLOCATOR_H_INCLUDED
|
|
@ -1,18 +0,0 @@
|
|||
#ifndef CSTANDARDMEMORYPROVIDER_H_INCLUDED
|
||||
#define CSTANDARDMEMORYPROVIDER_H_INCLUDED
|
||||
|
||||
#include "../include/IMemoryProvider.h"
|
||||
#include <cstring>
|
||||
namespace cAudio
|
||||
{
|
||||
//! Memory provider that wraps the standard memalloc and free
|
||||
class cStandardMemoryProvider : public IMemoryProvider
|
||||
{
|
||||
public:
|
||||
virtual void* Allocate(size_t size, const char* filename, int line, const char* function);
|
||||
virtual void Free(void* pointer);
|
||||
virtual size_t getMaxAllocationSize();
|
||||
};
|
||||
};
|
||||
|
||||
#endif //! CSTANDARDMEMORYPROVIDER_H_INCLUDED
|
|
@ -1,34 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CAUDIOTHREAD_H
|
||||
#define CAUDIOTHREAD_H
|
||||
|
||||
#include "../include/cAudioDefines.h"
|
||||
|
||||
//Helper defines in order to make sure the function is declared right for use as a thread
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
#define CAUDIO_DECLARE_THREAD_FUNCTION(functionName) unsigned __stdcall functionName( void* arguments )
|
||||
#else
|
||||
#define CAUDIO_DECLARE_THREAD_FUNCTION(functionName) void* functionName( void* arguments )
|
||||
#endif
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cAudioThread
|
||||
{
|
||||
public:
|
||||
// Really basic function to spawn a single detached thread
|
||||
/** \param start_address The function you want to call
|
||||
// \param arg Any arguments to pass to the function
|
||||
// \return 0 if successful, otherwise an error */
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
static int SpawnThread( unsigned __stdcall start_address( void* ), void *arg);
|
||||
#else
|
||||
static int SpawnThread( void* start_address( void* ), void *arg);
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
#endif //! CAUDIOTHREAD_H
|
|
@ -1,83 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CUTILS_H_INCLUDED
|
||||
#define CUTILS_H_INCLUDED
|
||||
#include "../include/cAudioPlatform.h"
|
||||
#include "../Headers/cSTLAllocator.h"
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
# include <direct.h>
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_LINUX
|
||||
# include <dirent.h>
|
||||
# include <stdio.h>
|
||||
# include <cstring>
|
||||
#endif
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
//! Grabs the current extention of a given string.
|
||||
static cAudioString getExt(const cAudioString& filename)
|
||||
{
|
||||
if(filename.find_last_of(".") == cAudioString::npos) return filename;
|
||||
return filename.substr(filename.find_last_of(".") + 1, filename.length()-filename.find_last_of(".")-1);
|
||||
}
|
||||
|
||||
//! Prevents a bug with NULL passed into cAudioString.
|
||||
static cAudioString safeCStr(const char* str)
|
||||
{
|
||||
if( str != NULL ) return cAudioString(str);
|
||||
else return cAudioString("");
|
||||
}
|
||||
|
||||
//! Returns a list of files/directories in the supplied directory. Used internally for auto-installation of plugins.
|
||||
static cAudioVector<cAudioString>::Type getFilesInDirectory(cAudioString path)
|
||||
{
|
||||
cAudioVector<cAudioString>::Type FileList;
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
cAudioString search = path + "\\" + cAudioString("*.*");
|
||||
WIN32_FIND_DATA info;
|
||||
HANDLE h = FindFirstFile(search.c_str(), &info);
|
||||
if (h != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (!(strcmp(info.cFileName, ".") == 0 || strcmp(info.cFileName, "..") == 0))
|
||||
{
|
||||
FileList.push_back(info.cFileName);
|
||||
}
|
||||
} while (FindNextFile(h, &info));
|
||||
FindClose(h);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_LINUX
|
||||
DIR *d;
|
||||
struct dirent *dir;
|
||||
d = opendir(path.c_str());
|
||||
if (d)
|
||||
{
|
||||
while ((dir = readdir(d)) != NULL)
|
||||
{
|
||||
if( strcmp( dir->d_name, "." ) == 0 || strcmp( dir->d_name, ".." ) == 0 ) { continue; }
|
||||
if( dir->d_type == DT_DIR ) continue;
|
||||
FileList.push_back(dir->d_name);
|
||||
}
|
||||
|
||||
closedir(d);
|
||||
}
|
||||
#endif
|
||||
|
||||
return FileList;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif //! CUTILS_H_INCLUDED
|
|
@ -1,39 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CWAVAUDIODECODERFACOTRY_H_INCLUDED
|
||||
#define CWAVAUDIODECODERFACOTRY_H_INCLUDED
|
||||
|
||||
#include "../include/IAudioDecoderFactory.h"
|
||||
#include "cWavDecoder.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_WAV_DECODER
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
class cWavAudioDecoderFactory : public IAudioDecoderFactory
|
||||
{
|
||||
public:
|
||||
cWavAudioDecoderFactory() {}
|
||||
~cWavAudioDecoderFactory() {}
|
||||
|
||||
IAudioDecoder* CreateAudioDecoder(IDataSource* stream)
|
||||
{
|
||||
Mutex.lock();
|
||||
IAudioDecoder* decoder = CAUDIO_NEW cWavDecoder(stream);
|
||||
Mutex.unlock();
|
||||
return decoder;
|
||||
}
|
||||
protected:
|
||||
cAudioMutex Mutex;
|
||||
private:
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CWAVAUDIODECODERFACOTRY_H_INCLUDED
|
|
@ -1,53 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#ifndef CWAVDECODER_H_INCLUDED
|
||||
#define CWAVDECODER_H_INCLUDED
|
||||
|
||||
#include "../include/IAudioDecoder.h"
|
||||
#include "../include/cAudioDefines.h"
|
||||
#include "../Headers/cMemoryOverride.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_WAV_DECODER
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cWavDecoder : public IAudioDecoder, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
|
||||
cWavDecoder(IDataSource* stream);
|
||||
~cWavDecoder();
|
||||
|
||||
virtual AudioFormats getFormat();
|
||||
virtual int getFrequency();
|
||||
virtual bool isSeekingSupported();
|
||||
virtual bool isValid();
|
||||
virtual int readAudioData(void* output, int amount);
|
||||
virtual bool setPosition(int position, bool relative);
|
||||
virtual bool seek(float seconds,bool relative);
|
||||
virtual float getTotalTime();
|
||||
virtual int getTotalSize();
|
||||
virtual int getCompressedSize();
|
||||
virtual float getCurrentTime();
|
||||
virtual int getCurrentPosition();
|
||||
virtual int getCurrentCompressedPosition();
|
||||
|
||||
private:
|
||||
short Channels;
|
||||
int SampleRate;
|
||||
int ByteRate;
|
||||
short BlockAlign;
|
||||
short BitsPerSample;
|
||||
int DataSize;
|
||||
int DataOffset;
|
||||
|
||||
bool Valid;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CFLACDECODER_H_INCLUDED
|
||||
|
23
License.txt
23
License.txt
|
@ -1,23 +0,0 @@
|
|||
The zlib/libpng License
|
||||
|
||||
Copyright (c) <2008> <DeathTouchStudios>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
|
60
ReadMe.txt
60
ReadMe.txt
|
@ -1,60 +0,0 @@
|
|||
This is the new cAudio 2.1.0 Release. This release is mainly a bug fix release.
|
||||
|
||||
Visit our site at http://caudio.deathtouchstudios.com/ for news and information.
|
||||
|
||||
To get help, report bugs, or talk about cAudio visit our forums at: http://www.deathtouchstudios.com/phpBB3/index.php
|
||||
|
||||
New:
|
||||
New Memory System (allows for the user to override all memory allocations by cAudio, providing a custom allocation scheme if necessary)
|
||||
New Memory Tracker (for finding memory leaks and tracking memory usage statistics)
|
||||
Official Mac OS X and IPhone support
|
||||
|
||||
Updated:
|
||||
Removed old memory system due to numerous bugs.
|
||||
Added a ogg vorbis close callback function to prevent a crash on Mac/IPhone
|
||||
Reorganized cAudioDefines to order by platform.
|
||||
Added defines to disable portions or all of the plugin system.
|
||||
Added defines for finer control of what is compiled into the library.
|
||||
Removed the ogg/vorbis encoding lib that was mistakenly linked in, which doubled the binary's size.
|
||||
|
||||
Note for linux users:
|
||||
By default, EFX is disabled on linux with an ifdef in cAudioDefines. We are doing this because of licensing issues with EFX on linux. We cannot provide in our packages key EFX headers, so if you want EFX support on linux, you must provide them yourself.
|
||||
|
||||
Known Bugs:
|
||||
Looping with small sounds (less than 192 KB with the default buffer settings) does not work properly if you try to change the loop setting while the sound is playing.
|
||||
|
||||
//////////////////
|
||||
// INSTALLATION //
|
||||
//////////////////
|
||||
|
||||
To compile:
|
||||
|
||||
Windows: Open up the cAudio Microsoft Visual C++ 2008 solution (or codeblocks project file for MinGW) and select Build Solution after you set Debug or Release.
|
||||
|
||||
Linux/Unix: Cd to the Source directory and run make.
|
||||
|
||||
Mac: Open up the xcode project file and compile away.
|
||||
|
||||
Libraries will end up in:
|
||||
|
||||
Windows: lib/win32-visual (MSVC) or lib/win32-gcc (Codeblocks).
|
||||
|
||||
Linux: lib/linux-x86.
|
||||
|
||||
Mac: bin/osx (bin/osx-iphone for IPhone)
|
||||
|
||||
To compile examples:
|
||||
|
||||
Windows: Automatically built by the MSVC Solution. For codeblocks, open up the projects in the Examples directory select perferred compiler and build configuration.
|
||||
|
||||
Linux/Unix: Cd to the Examples directory and run ./buildAll.sh
|
||||
|
||||
Mac: Open up the respective XCode project file and compile away.
|
||||
|
||||
Compiled examples will be in:
|
||||
|
||||
Windows: bin/win32-visual (MSVC) or bin/win32-gcc (Codeblocks).
|
||||
|
||||
Linux: bin/linux-x86.
|
||||
|
||||
Mac: bin/osx (bin/osx-iphone for IPhone)
|
|
@ -1,90 +0,0 @@
|
|||
VERSION=2.1.0
|
||||
SONAME=libcAudio.$(VERSION).so
|
||||
DIR=../bin/Linux/x86 #x86_64
|
||||
|
||||
DEPEND=-logg -lopenal -lvorbis -lvorbisfile -ldl\
|
||||
-I../dependencies/Headers
|
||||
|
||||
STATICDEPEND=/usr/lib/libogg.a /usr/lib/libopenal.so /usr/lib/libvorbis.a /usr/lib/libvorbisenc.a /usr/lib/libvorbisfile.a /usr/lib/libdl.a
|
||||
|
||||
OBJECT= cAudioCapture.o cAudioEffects.o cAudioManager.o cAudioSleep.o cAudioSource.o cConsoleLogReceiver.o cEffect.o cFileSource.o cFilter.o cFileLogReceiver.o cListener.o cLogger.o cMemorySource.o cMutex.o cOggAudioDecoderFactory.o cOggDecoder.o cPluginManager.o cRawDecoder.o cThread.o cWavAudioDecoderFactory.o cWavDecoder.o cMemoryTracker.o cStandardMemoryProvider.o cAudioMemory.o
|
||||
|
||||
LINK_OPTIONS=-shared
|
||||
COMPILE_OPTIONS=-fPIC
|
||||
CC=g++
|
||||
|
||||
all: shared
|
||||
|
||||
shared: $(OBJECT)
|
||||
$(CC) -o $(SONAME) $(OBJECT) $(LINK_OPTIONS) $(DEPEND)
|
||||
cp libcAudio.$(VERSION).so ../lib/linux-x86
|
||||
if test -f ../bin/linux-x86/libcAudio.so;\
|
||||
then rm ../bin/linux-x86/libcAudio.so;\
|
||||
ln -s ../../lib/linux-x86/libcAudio.$(VERSION).so ../bin/linux-x86/libcAudio.so;\
|
||||
else ln -s ../../lib/linux-x86/libcAudio.$(VERSION).so ../bin/linux-x86/libcAudio.so;\
|
||||
fi
|
||||
|
||||
static: $(OBJECT)
|
||||
ar cr libcAudio.$(VERSION).a *.o $(STATICDEPEND)
|
||||
ranlib libcAudio.$(VERSION).a
|
||||
cp libcAudio.$(VERSION).a ../lib/linux-x86
|
||||
if test -f ../bin/linux-x86/libcAudio.a;\
|
||||
then rm ../bin/linux-x86/libcAudio.a;\
|
||||
ln -s ../../lib/linux-x86/libcAudio.$(VERSION).a ../bin/linux-x86/libcAudio.a;\
|
||||
else ln -s ../../lib/linux-x86/libcAudio.$(VERSION).a ../bin/linux-x86/libcAudio.a;\
|
||||
fi;
|
||||
|
||||
install: $(OBJECT)
|
||||
if test -d /usr/local/lib/cAudio$(VERSION); \
|
||||
then sudo cp libcAudio.$(VERSION).so /usr/local/lib/cAudio$(VERSION); \
|
||||
else mkdir /usr/local/lib/cAudio$(VERSION); \
|
||||
sudo cp libcAudio.$(VERSION).so /usr/local/lib/cAudio$(VERSION);\
|
||||
fi
|
||||
|
||||
if test -d /usr/local/include/cAudio; \
|
||||
then sudo cp -r ../include/* /usr/local/include/cAudio; \
|
||||
else mkdir /usr/local/include/cAudio; \
|
||||
sudo cp -r ../include/* /usr/local/include/cAudio;\
|
||||
fi
|
||||
|
||||
if test -f /usr/local/lib/libcAudio.so;\
|
||||
then sudo rm /usr/local/lib/libcAudio.so;\
|
||||
sudo ln -s /usr/local/lib/cAudio$(VERSION)/libcAudio.$(VERSION).so /usr/local/lib/libcAudio.so;\
|
||||
else sudo ln -s /usr/local/lib/cAudio$(VERSION)/libcAudio.$(VERSION).so /usr/local/lib/libcAudio.so;\
|
||||
fi
|
||||
|
||||
ldconfig
|
||||
|
||||
|
||||
installStatic: $(OBJECT)
|
||||
if test -d /usr/local/lib/cAudio$(VERSION); \
|
||||
then sudo cp libcAudio.$(VERSION).a /usr/lib/cAudio$(VERSION); \
|
||||
else mkdir /usr/local/lib/cAudio$(VERSION); \
|
||||
sudo cp libcAudio.$(VERSION).a /usr/local/lib/cAudio$(VERSION);\
|
||||
fi
|
||||
|
||||
if test -d /usr/local/include/cAudio; \
|
||||
then sudo cp -r ../include/* /usr/local/include/cAudio; \
|
||||
else mkdir /usr/local/include/cAudio; \
|
||||
sudo cp -r ../include/* /usr/local/include/cAudio;\
|
||||
fi
|
||||
|
||||
if test -f /usr/local/lib/libcAudio.a;\
|
||||
then sudo rm /usr/local/lib/libcAudio.a;\
|
||||
sudo ln -s /usr/local/lib/cAudio$(VERSION)/libcAudio.$(VERSION).a /usr/local/lib/libcAudio.a;\
|
||||
else sudo ln -s /usr/local/lib/cAudio$(VERSION)/libcAudio.$(VERSION).a /usr/local/lib/libcAudio.a;\
|
||||
fi
|
||||
|
||||
ldconfig
|
||||
|
||||
buildExamples: $(OBJECT)
|
||||
cd ../Examples;\
|
||||
./buildAll.sh
|
||||
|
||||
clean:
|
||||
cd ../Examples
|
||||
rm -f *.o *.so lib*.so libcAudio.$(VERSION).a *~
|
||||
|
||||
%.o: %.cpp
|
||||
$(CC) -c -o $@ $< $(COMPILE_OPTIONS)
|
||||
|
|
@ -1,484 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cAudioCapture.h"
|
||||
#include "../Headers/cUtils.h"
|
||||
#include "../Headers/cThread.h"
|
||||
#include "../include/cAudioSleep.h"
|
||||
#include "../Headers/cLogger.h"
|
||||
#include "../Headers/cPluginManager.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
static bool RunAudioCaptureThread(false);
|
||||
|
||||
//Note: OpenAL is threadsafe, so a mutex only needs to protect the class state
|
||||
#ifdef CAUDIO_USE_INTERNAL_THREAD
|
||||
static cAudioMutex AudioCaptureObjectsMutex;
|
||||
static cAudioSet<IAudioCapture*>::Type AudioCaptureObjects;
|
||||
|
||||
CAUDIO_DECLARE_THREAD_FUNCTION(AudioCaptureUpdateThread)
|
||||
{
|
||||
while(RunAudioCaptureThread)
|
||||
{
|
||||
AudioCaptureObjectsMutex.lock();
|
||||
cAudioSet<IAudioCapture*>::Type::iterator it;
|
||||
for ( it=AudioCaptureObjects.begin() ; it != AudioCaptureObjects.end(); it++ )
|
||||
{
|
||||
(*it)->updateCaptureBuffer();
|
||||
}
|
||||
AudioCaptureObjectsMutex.unlock();
|
||||
cAudioSleep(1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
cAudioCapture::cAudioCapture() : Frequency(22050), Format(EAF_16BIT_MONO), InternalBufferSize(8192),
|
||||
SampleSize(2), Supported(false), Ready(false), Capturing(false),
|
||||
CaptureDevice(NULL)
|
||||
{
|
||||
checkCaptureExtension();
|
||||
getAvailableDevices();
|
||||
}
|
||||
cAudioCapture::~cAudioCapture()
|
||||
{
|
||||
shutdown();
|
||||
}
|
||||
|
||||
bool cAudioCapture::checkCaptureExtension()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
// Check for Capture Extension support
|
||||
Supported = ( alcIsExtensionPresent(NULL, "ALC_EXT_CAPTURE") == AL_TRUE );
|
||||
return Supported;
|
||||
}
|
||||
|
||||
bool cAudioCapture::initOpenALDevice()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(Supported)
|
||||
{
|
||||
if(CaptureDevice)
|
||||
shutdownOpenALDevice();
|
||||
if(DeviceName.empty())
|
||||
CaptureDevice = alcCaptureOpenDevice(NULL, Frequency, convertAudioFormatEnum(Format), InternalBufferSize / SampleSize);
|
||||
else
|
||||
CaptureDevice = alcCaptureOpenDevice(DeviceName.c_str(), Frequency, convertAudioFormatEnum(Format), InternalBufferSize / SampleSize);
|
||||
if(CaptureDevice)
|
||||
{
|
||||
DeviceName = alcGetString(CaptureDevice, ALC_CAPTURE_DEVICE_SPECIFIER);
|
||||
Ready = true;
|
||||
checkError();
|
||||
getLogger()->logDebug("AudioCapture", "OpenAL Capture Device Opened.");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
checkError();
|
||||
return false;
|
||||
}
|
||||
|
||||
void cAudioCapture::shutdownOpenALDevice()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(Supported)
|
||||
{
|
||||
if(Capturing)
|
||||
stopCapture();
|
||||
|
||||
if(CaptureDevice)
|
||||
{
|
||||
alcCaptureCloseDevice(CaptureDevice);
|
||||
CaptureDevice = NULL;
|
||||
Ready = false;
|
||||
getLogger()->logDebug("AudioCapture", "OpenAL Capture Device Closed.");
|
||||
signalEvent(ON_RELEASE);
|
||||
}
|
||||
checkError();
|
||||
CaptureBuffer.clear();
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioCapture::shutdown()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
shutdownOpenALDevice();
|
||||
signalEvent(ON_RELEASE);
|
||||
}
|
||||
|
||||
void cAudioCapture::getAvailableDevices()
|
||||
{
|
||||
// Get list of available Capture Devices
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if( alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT") == AL_TRUE )
|
||||
{
|
||||
const char* deviceList = alcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER);
|
||||
if (deviceList)
|
||||
{
|
||||
while(*deviceList)
|
||||
{
|
||||
cAudioString device(deviceList);
|
||||
AvailableDevices.push_back(device);
|
||||
deviceList += strlen(deviceList) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the name of the 'default' capture device
|
||||
DefaultDevice = alcGetString(NULL, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER);
|
||||
}
|
||||
}
|
||||
|
||||
const char* cAudioCapture::getAvailableDeviceName(unsigned int index)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(!AvailableDevices.empty())
|
||||
{
|
||||
//Bounds check
|
||||
if( index > (AvailableDevices.size()-1) ) index = (AvailableDevices.size()-1);
|
||||
const char* deviceName = AvailableDevices[index].c_str();
|
||||
return deviceName;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
unsigned int cAudioCapture::getAvailableDeviceCount()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
return AvailableDevices.size();
|
||||
}
|
||||
|
||||
const char* cAudioCapture::getDefaultDeviceName()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
return DefaultDevice.empty() ? "" : DefaultDevice.c_str();
|
||||
}
|
||||
|
||||
void cAudioCapture::updateCaptureBuffer(bool force)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(Capturing && CaptureDevice && Ready)
|
||||
{
|
||||
int AvailableSamples = 0;
|
||||
alcGetIntegerv(CaptureDevice, ALC_CAPTURE_SAMPLES, 1, &AvailableSamples);
|
||||
const unsigned int availbuffersize = AvailableSamples * SampleSize;
|
||||
|
||||
//If the samples in the OpenAL buffer are more than half of its max size, grab them
|
||||
if(availbuffersize > InternalBufferSize / 2 || force)
|
||||
{
|
||||
//Fixes a bug with the capture being forced, but no data being available
|
||||
if(availbuffersize > 0)
|
||||
{
|
||||
const unsigned int oldBufferSize = CaptureBuffer.size();
|
||||
CaptureBuffer.resize(oldBufferSize + availbuffersize, 0);
|
||||
alcCaptureSamples(CaptureDevice, &CaptureBuffer[oldBufferSize], AvailableSamples);
|
||||
checkError();
|
||||
getLogger()->logDebug("AudioCapture", "Captured %i bytes of audio data.", availbuffersize);
|
||||
signalEvent(ON_UPDATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool cAudioCapture::beginCapture()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(!Capturing)
|
||||
{
|
||||
CaptureBuffer.clear();
|
||||
if(CaptureDevice && Ready)
|
||||
{
|
||||
alcCaptureStart(CaptureDevice);
|
||||
Capturing = true;
|
||||
getLogger()->logDebug("AudioCapture", "OpenAL Capture Started.");
|
||||
signalEvent(ON_BEGINCAPTURE);
|
||||
}
|
||||
checkError();
|
||||
return Capturing;
|
||||
}
|
||||
checkError();
|
||||
return false;
|
||||
}
|
||||
|
||||
void cAudioCapture::stopCapture()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(CaptureDevice && Ready)
|
||||
{
|
||||
alcCaptureStop(CaptureDevice);
|
||||
updateCaptureBuffer(true);
|
||||
checkError();
|
||||
getLogger()->logDebug("AudioCapture", "OpenAL Capture Stopped.");
|
||||
signalEvent(ON_ENDCAPTURE);
|
||||
}
|
||||
Capturing = false;
|
||||
}
|
||||
|
||||
unsigned int cAudioCapture::getCapturedAudio(void* outputBuffer, unsigned int outputBufferSize)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
unsigned int internalBufferSize = CaptureBuffer.size();
|
||||
if(outputBuffer && outputBufferSize > 0 && internalBufferSize > 0)
|
||||
{
|
||||
int sizeToCopy = (outputBufferSize >= internalBufferSize) ? internalBufferSize : outputBufferSize;
|
||||
memcpy(outputBuffer, &CaptureBuffer[0], sizeToCopy);
|
||||
CaptureBuffer.erase(CaptureBuffer.begin(), CaptureBuffer.begin()+sizeToCopy);
|
||||
|
||||
getLogger()->logDebug("AudioCapture", "Copied out %i bytes of data out of %i bytes in the buffer at user request.", sizeToCopy, internalBufferSize);
|
||||
signalEvent(ON_USERREQUESTEDBUFFER);
|
||||
return sizeToCopy;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int cAudioCapture::getCurrentCapturedAudioSize()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
return CaptureBuffer.size();
|
||||
}
|
||||
|
||||
bool cAudioCapture::setFrequency(unsigned int frequency)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Frequency = frequency;
|
||||
shutdownOpenALDevice();
|
||||
return initOpenALDevice();
|
||||
}
|
||||
|
||||
bool cAudioCapture::setFormat(AudioFormats format)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Format = format;
|
||||
if(Format == EAF_8BIT_MONO)
|
||||
SampleSize = 1;
|
||||
else if(Format == EAF_8BIT_STEREO)
|
||||
SampleSize = 2;
|
||||
else if(Format == EAF_16BIT_MONO)
|
||||
SampleSize = 2;
|
||||
else
|
||||
SampleSize = 4;
|
||||
|
||||
shutdownOpenALDevice();
|
||||
return initOpenALDevice();
|
||||
}
|
||||
|
||||
bool cAudioCapture::setInternalBufferSize(unsigned int internalBufferSize)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
InternalBufferSize = internalBufferSize;
|
||||
|
||||
shutdownOpenALDevice();
|
||||
return initOpenALDevice();
|
||||
}
|
||||
|
||||
bool cAudioCapture::setDevice(const char* deviceName)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
DeviceName = safeCStr(deviceName);
|
||||
|
||||
shutdownOpenALDevice();
|
||||
return initOpenALDevice();
|
||||
}
|
||||
|
||||
bool cAudioCapture::initialize(const char* deviceName, unsigned int frequency, AudioFormats format, unsigned int internalBufferSize)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
DeviceName = safeCStr(deviceName);
|
||||
Frequency = frequency;
|
||||
InternalBufferSize = internalBufferSize;
|
||||
|
||||
Format = format;
|
||||
if(Format == EAF_8BIT_MONO)
|
||||
SampleSize = 1;
|
||||
else if(Format == EAF_8BIT_STEREO)
|
||||
SampleSize = 2;
|
||||
else if(Format == EAF_16BIT_MONO)
|
||||
SampleSize = 2;
|
||||
else
|
||||
SampleSize = 4;
|
||||
|
||||
shutdownOpenALDevice();
|
||||
signalEvent(ON_INIT);
|
||||
return initOpenALDevice();
|
||||
}
|
||||
|
||||
bool cAudioCapture::checkError()
|
||||
{
|
||||
if(CaptureDevice)
|
||||
{
|
||||
int error = alcGetError(CaptureDevice);
|
||||
if (error != AL_NO_ERROR)
|
||||
{
|
||||
const char* errorString = alGetString(error);
|
||||
getLogger()->logError("AudioCapture", "OpenAL Error: %s.", errorString);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
ALenum cAudioCapture::convertAudioFormatEnum(AudioFormats format)
|
||||
{
|
||||
switch(format)
|
||||
{
|
||||
case EAF_8BIT_MONO:
|
||||
return AL_FORMAT_MONO8;
|
||||
case EAF_16BIT_MONO:
|
||||
return AL_FORMAT_MONO16;
|
||||
case EAF_8BIT_STEREO:
|
||||
return AL_FORMAT_STEREO8;
|
||||
case EAF_16BIT_STEREO:
|
||||
return AL_FORMAT_STEREO16;
|
||||
default:
|
||||
return AL_FORMAT_MONO8;
|
||||
};
|
||||
}
|
||||
|
||||
CAUDIO_API IAudioCapture* createAudioCapture(bool initializeDefault)
|
||||
{
|
||||
cAudioCapture* capture = CAUDIO_NEW cAudioCapture;
|
||||
if(capture)
|
||||
{
|
||||
if(initializeDefault)
|
||||
capture->initialize();
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
cAudioVector<IAudioPlugin*>::Type plugins = cPluginManager::Instance()->getPluginList();
|
||||
for(unsigned int i = 0; i < plugins.size(); ++i)
|
||||
{
|
||||
plugins[i]->onCreateAudioCapture(capture);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_USE_INTERNAL_THREAD
|
||||
AudioCaptureObjectsMutex.lock();
|
||||
AudioCaptureObjects.insert(capture);
|
||||
|
||||
//First time launch of thread
|
||||
if(!RunAudioCaptureThread && AudioCaptureObjects.size() > 0)
|
||||
RunAudioCaptureThread = (cAudioThread::SpawnThread(AudioCaptureUpdateThread, NULL) == 0);
|
||||
AudioCaptureObjectsMutex.unlock();
|
||||
#endif
|
||||
}
|
||||
return capture;
|
||||
}
|
||||
|
||||
CAUDIO_API void destroyAudioCapture(IAudioCapture* capture)
|
||||
{
|
||||
if(capture)
|
||||
{
|
||||
#ifdef CAUDIO_USE_INTERNAL_THREAD
|
||||
AudioCaptureObjectsMutex.lock();
|
||||
AudioCaptureObjects.erase(capture);
|
||||
|
||||
//Kill the thread if there are no objects to process anymore
|
||||
if(RunAudioCaptureThread && AudioCaptureObjects.empty())
|
||||
RunAudioCaptureThread = false;
|
||||
AudioCaptureObjectsMutex.unlock();
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
cAudioVector<IAudioPlugin*>::Type plugins = cPluginManager::Instance()->getPluginList();
|
||||
for(unsigned int i = 0; i < plugins.size(); ++i)
|
||||
{
|
||||
plugins[i]->onDestoryAudioCapture(capture);
|
||||
}
|
||||
#endif
|
||||
|
||||
CAUDIO_DELETE capture;
|
||||
capture = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
CAUDIO_API bool isAudioCaptureThreadRunning()
|
||||
{
|
||||
return RunAudioCaptureThread;
|
||||
}
|
||||
|
||||
|
||||
void cAudioCapture::registerEventHandler(ICaptureEventHandler* handler)
|
||||
{
|
||||
if(handler)
|
||||
{
|
||||
eventHandlerList.push_back(handler);
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioCapture::unRegisterEventHandler(ICaptureEventHandler* handler)
|
||||
{
|
||||
if(handler)
|
||||
{
|
||||
eventHandlerList.remove(handler);
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioCapture::unRegisterAllEventHandlers()
|
||||
{
|
||||
eventHandlerList.clear();
|
||||
}
|
||||
|
||||
void cAudioCapture::signalEvent(Events sevent)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioList<ICaptureEventHandler*>::Type::iterator it = eventHandlerList.begin();
|
||||
|
||||
if(it != eventHandlerList.end()){
|
||||
|
||||
switch(sevent){
|
||||
|
||||
case ON_INIT:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onInit();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_UPDATE:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onUpdate();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_RELEASE:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onRelease();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_BEGINCAPTURE:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onBeginCapture();
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case ON_ENDCAPTURE:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onEndCapture();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_USERREQUESTEDBUFFER:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onUserRequestBuffer();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -1,597 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cAudioEffects.h"
|
||||
#include "../Headers/cFilter.h"
|
||||
#include "../Headers/cEffect.h"
|
||||
#include "../Headers/cUtils.h"
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
|
||||
//Number of effect slots to try to create
|
||||
#define EFFECT_SLOTS_TO_TEST 256
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
cAudioEffects::cAudioEffects() : MaxEffectsSupported(0)
|
||||
{
|
||||
for(int i=0; i<EET_COUNT; ++i)
|
||||
SupportedEffects[i] = false;
|
||||
|
||||
for(int i=0; i<EFT_COUNT; ++i)
|
||||
SupportedFilters[i] = false;
|
||||
}
|
||||
|
||||
cAudioEffects::~cAudioEffects()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
IEffect* cAudioEffects::createEffect()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
IEffect* effect = CAUDIO_NEW cEffect(&EFXInterface);
|
||||
|
||||
if(effect && effect->isValid())
|
||||
return effect;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IFilter* cAudioEffects::createFilter()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
IFilter* filter = CAUDIO_NEW cFilter(&EFXInterface);
|
||||
|
||||
if(filter && filter->isValid())
|
||||
return filter;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned int cAudioEffects::getMaxEffectsSupported() const
|
||||
{
|
||||
return MaxEffectsSupported;
|
||||
}
|
||||
|
||||
bool cAudioEffects::isEffectSupported(const EffectTypes& type) const
|
||||
{
|
||||
return SupportedEffects[type];
|
||||
}
|
||||
|
||||
bool cAudioEffects::isFilterSupported(const FilterTypes& type) const
|
||||
{
|
||||
return SupportedFilters[type];
|
||||
}
|
||||
|
||||
bool cAudioEffects::addEAXReverbEffectPreset(const char* name, const sEAXReverbParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
EAXReverbPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addReverbEffectPreset(const char* name, const sReverbParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
ReverbPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addChorusEffectPreset(const char* name, const sChorusParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
ChorusPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addDistortionEffectPreset(const char* name, const sDistortionParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
DistortionPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addEchoEffectPreset(const char* name, const sEchoParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
EchoPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addFlangerEffectPreset(const char* name, const sFlangerParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
FlangerPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addFrequencyShiftEffectPreset(const char* name, const sFrequencyShiftParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
FrequencyShiftPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addVocalMorpherEffectPreset(const char* name, const sVocalMorpherParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
VocalMorpherPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addPitchShifterEffectPreset(const char* name, const sPitchShifterParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
PitchShifterPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addRingModulatorEffectPreset(const char* name, const sRingModulatorParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
RingModulatorPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addAutowahEffectPreset(const char* name, const sAutowahParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
AutowahPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addCompressorEffectPreset(const char* name, const sCompressorParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
CompressorPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioEffects::addEqualizerEffectPreset(const char* name, const sEqualizerParameters& setting)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
EqualizerPresets[safeName] = setting;
|
||||
return true;
|
||||
}
|
||||
|
||||
sEAXReverbParameters cAudioEffects::getEAXReverbEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sEAXReverbParameters>::Type::iterator it = EAXReverbPresets.find(safeName);
|
||||
if(it != EAXReverbPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sEAXReverbParameters();
|
||||
}
|
||||
|
||||
sReverbParameters cAudioEffects::getReverbEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sReverbParameters>::Type::iterator it = ReverbPresets.find(safeName);
|
||||
if(it != ReverbPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sReverbParameters();
|
||||
}
|
||||
|
||||
sChorusParameters cAudioEffects::getChorusEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sChorusParameters>::Type::iterator it = ChorusPresets.find(safeName);
|
||||
if(it != ChorusPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sChorusParameters();
|
||||
}
|
||||
|
||||
sDistortionParameters cAudioEffects::getDistortionEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sDistortionParameters>::Type::iterator it = DistortionPresets.find(safeName);
|
||||
if(it != DistortionPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sDistortionParameters();
|
||||
}
|
||||
|
||||
sEchoParameters cAudioEffects::getEchoEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sEchoParameters>::Type::iterator it = EchoPresets.find(safeName);
|
||||
if(it != EchoPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sEchoParameters();
|
||||
}
|
||||
|
||||
sFlangerParameters cAudioEffects::getFlangerEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sFlangerParameters>::Type::iterator it = FlangerPresets.find(safeName);
|
||||
if(it != FlangerPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sFlangerParameters();
|
||||
}
|
||||
|
||||
sFrequencyShiftParameters cAudioEffects::getFrequencyShiftEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sFrequencyShiftParameters>::Type::iterator it = FrequencyShiftPresets.find(safeName);
|
||||
if(it != FrequencyShiftPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sFrequencyShiftParameters();
|
||||
}
|
||||
|
||||
sVocalMorpherParameters cAudioEffects::getVocalMorpherEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sVocalMorpherParameters>::Type::iterator it = VocalMorpherPresets.find(safeName);
|
||||
if(it != VocalMorpherPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sVocalMorpherParameters();
|
||||
}
|
||||
|
||||
sPitchShifterParameters cAudioEffects::getPitchShifterEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sPitchShifterParameters>::Type::iterator it = PitchShifterPresets.find(safeName);
|
||||
if(it != PitchShifterPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sPitchShifterParameters();
|
||||
}
|
||||
|
||||
sRingModulatorParameters cAudioEffects::getRingModulatorEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sRingModulatorParameters>::Type::iterator it = RingModulatorPresets.find(safeName);
|
||||
if(it != RingModulatorPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sRingModulatorParameters();
|
||||
}
|
||||
|
||||
sAutowahParameters cAudioEffects::getAutowahEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sAutowahParameters>::Type::iterator it = AutowahPresets.find(safeName);
|
||||
if(it != AutowahPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sAutowahParameters();
|
||||
}
|
||||
|
||||
sCompressorParameters cAudioEffects::getCompressorEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sCompressorParameters>::Type::iterator it = CompressorPresets.find(safeName);
|
||||
if(it != CompressorPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sCompressorParameters();
|
||||
}
|
||||
|
||||
sEqualizerParameters cAudioEffects::getEqualizerEffectPreset(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
cAudioMap<cAudioString, sEqualizerParameters>::Type::iterator it = EqualizerPresets.find(safeName);
|
||||
if(it != EqualizerPresets.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return sEqualizerParameters();
|
||||
}
|
||||
|
||||
void cAudioEffects::removeEffectPreset(const EffectTypes& type, const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
switch(type)
|
||||
{
|
||||
case EET_EAX_REVERB:
|
||||
EAXReverbPresets.erase(safeName);
|
||||
break;
|
||||
case EET_REVERB:
|
||||
ReverbPresets.erase(safeName);
|
||||
break;
|
||||
case EET_CHORUS:
|
||||
ChorusPresets.erase(safeName);
|
||||
break;
|
||||
case EET_DISTORTION:
|
||||
DistortionPresets.erase(safeName);
|
||||
break;
|
||||
case EET_ECHO:
|
||||
EchoPresets.erase(safeName);
|
||||
break;
|
||||
case EET_FLANGER:
|
||||
FlangerPresets.erase(safeName);
|
||||
break;
|
||||
case EET_FREQUENCY_SHIFTER:
|
||||
FrequencyShiftPresets.erase(safeName);
|
||||
break;
|
||||
case EET_VOCAL_MORPHER:
|
||||
VocalMorpherPresets.erase(safeName);
|
||||
break;
|
||||
case EET_PITCH_SHIFTER:
|
||||
PitchShifterPresets.erase(safeName);
|
||||
break;
|
||||
case EET_RING_MODULATOR:
|
||||
RingModulatorPresets.erase(safeName);
|
||||
break;
|
||||
case EET_AUTOWAH:
|
||||
AutowahPresets.erase(safeName);
|
||||
break;
|
||||
case EET_COMPRESSOR:
|
||||
CompressorPresets.erase(safeName);
|
||||
break;
|
||||
case EET_EQUALIZER:
|
||||
EqualizerPresets.erase(safeName);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool cAudioEffects::isEffectPresetRegistered(const EffectTypes& type, const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
switch(type)
|
||||
{
|
||||
case EET_EAX_REVERB:
|
||||
return (EAXReverbPresets.find(safeName) != EAXReverbPresets.end());
|
||||
break;
|
||||
case EET_REVERB:
|
||||
return (ReverbPresets.find(safeName) != ReverbPresets.end());
|
||||
break;
|
||||
case EET_CHORUS:
|
||||
return (ChorusPresets.find(safeName) != ChorusPresets.end());
|
||||
break;
|
||||
case EET_DISTORTION:
|
||||
return (DistortionPresets.find(safeName) != DistortionPresets.end());
|
||||
break;
|
||||
case EET_ECHO:
|
||||
return (EchoPresets.find(safeName) != EchoPresets.end());
|
||||
break;
|
||||
case EET_FLANGER:
|
||||
return (FlangerPresets.find(safeName) != FlangerPresets.end());
|
||||
break;
|
||||
case EET_FREQUENCY_SHIFTER:
|
||||
return (FrequencyShiftPresets.find(safeName) != FrequencyShiftPresets.end());
|
||||
break;
|
||||
case EET_VOCAL_MORPHER:
|
||||
return (VocalMorpherPresets.find(safeName) != VocalMorpherPresets.end());
|
||||
break;
|
||||
case EET_PITCH_SHIFTER:
|
||||
return (PitchShifterPresets.find(safeName) != PitchShifterPresets.end());
|
||||
break;
|
||||
case EET_RING_MODULATOR:
|
||||
return (RingModulatorPresets.find(safeName) != RingModulatorPresets.end());
|
||||
break;
|
||||
case EET_AUTOWAH:
|
||||
return (AutowahPresets.find(safeName) != AutowahPresets.end());
|
||||
break;
|
||||
case EET_COMPRESSOR:
|
||||
return (CompressorPresets.find(safeName) != CompressorPresets.end());
|
||||
break;
|
||||
case EET_EQUALIZER:
|
||||
return (EqualizerPresets.find(safeName) != EqualizerPresets.end());
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioEffects::removeAllEffectPresets(const EffectTypes& type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case EET_EAX_REVERB:
|
||||
EAXReverbPresets.clear();
|
||||
break;
|
||||
case EET_REVERB:
|
||||
ReverbPresets.clear();
|
||||
break;
|
||||
case EET_CHORUS:
|
||||
ChorusPresets.clear();
|
||||
break;
|
||||
case EET_DISTORTION:
|
||||
DistortionPresets.clear();
|
||||
break;
|
||||
case EET_ECHO:
|
||||
EchoPresets.clear();
|
||||
break;
|
||||
case EET_FLANGER:
|
||||
FlangerPresets.clear();
|
||||
break;
|
||||
case EET_FREQUENCY_SHIFTER:
|
||||
FrequencyShiftPresets.clear();
|
||||
break;
|
||||
case EET_VOCAL_MORPHER:
|
||||
VocalMorpherPresets.clear();
|
||||
break;
|
||||
case EET_PITCH_SHIFTER:
|
||||
PitchShifterPresets.clear();
|
||||
break;
|
||||
case EET_RING_MODULATOR:
|
||||
RingModulatorPresets.clear();
|
||||
break;
|
||||
case EET_AUTOWAH:
|
||||
AutowahPresets.clear();
|
||||
break;
|
||||
case EET_COMPRESSOR:
|
||||
CompressorPresets.clear();
|
||||
break;
|
||||
case EET_EQUALIZER:
|
||||
EqualizerPresets.clear();
|
||||
break;
|
||||
default:
|
||||
EAXReverbPresets.clear();
|
||||
ReverbPresets.clear();
|
||||
ChorusPresets.clear();
|
||||
DistortionPresets.clear();
|
||||
EchoPresets.clear();
|
||||
FlangerPresets.clear();
|
||||
FrequencyShiftPresets.clear();
|
||||
VocalMorpherPresets.clear();
|
||||
PitchShifterPresets.clear();
|
||||
RingModulatorPresets.clear();
|
||||
AutowahPresets.clear();
|
||||
CompressorPresets.clear();
|
||||
EqualizerPresets.clear();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
cEFXFunctions* cAudioEffects::getEFXInterface()
|
||||
{
|
||||
return &EFXInterface;
|
||||
}
|
||||
|
||||
void cAudioEffects::checkEFXSupportDetails()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(EFXInterface.Supported)
|
||||
{
|
||||
cAudioMutexBasicLock lock(EFXInterface.Mutex);
|
||||
|
||||
//Count the number of effect slots this device supports (limits the max number of effects available)
|
||||
unsigned int count = 0;
|
||||
ALuint effectSlots[EFFECT_SLOTS_TO_TEST];
|
||||
for(count=0; count<EFFECT_SLOTS_TO_TEST; ++count)
|
||||
{
|
||||
EFXInterface.alGenAuxiliaryEffectSlots(1, &effectSlots[count]);
|
||||
if(alGetError() != AL_NO_ERROR)
|
||||
break;
|
||||
}
|
||||
|
||||
MaxEffectsSupported = count;
|
||||
|
||||
//Check what effects are supported
|
||||
ALuint Effect;
|
||||
EFXInterface.alGenEffects(1, &Effect);
|
||||
if (alGetError() == AL_NO_ERROR)
|
||||
{
|
||||
SupportedEffects[EET_NULL] = true;
|
||||
|
||||
// Try setting Effect Type to known Effects
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_REVERB);
|
||||
SupportedEffects[EET_REVERB] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB);
|
||||
SupportedEffects[EET_EAX_REVERB] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_CHORUS);
|
||||
SupportedEffects[EET_CHORUS] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_DISTORTION);
|
||||
SupportedEffects[EET_DISTORTION] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_ECHO);
|
||||
SupportedEffects[EET_ECHO] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_FLANGER);
|
||||
SupportedEffects[EET_FLANGER] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_FREQUENCY_SHIFTER);
|
||||
SupportedEffects[EET_FREQUENCY_SHIFTER] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_VOCAL_MORPHER);
|
||||
SupportedEffects[EET_VOCAL_MORPHER] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_PITCH_SHIFTER);
|
||||
SupportedEffects[EET_PITCH_SHIFTER] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_RING_MODULATOR);
|
||||
SupportedEffects[EET_RING_MODULATOR] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_AUTOWAH);
|
||||
SupportedEffects[EET_AUTOWAH] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_COMPRESSOR);
|
||||
SupportedEffects[EET_COMPRESSOR] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alEffecti(Effect, AL_EFFECT_TYPE, AL_EFFECT_EQUALIZER);
|
||||
SupportedEffects[EET_EQUALIZER] = (alGetError() == AL_NO_ERROR);
|
||||
}
|
||||
|
||||
// Delete Effect
|
||||
EFXInterface.alDeleteEffects(1, &Effect);
|
||||
|
||||
// Generate a Filter to use to determine what Filter Types are supported
|
||||
ALuint Filter;
|
||||
EFXInterface.alGenFilters(1, &Filter);
|
||||
if (alGetError() == AL_NO_ERROR)
|
||||
{
|
||||
SupportedFilters[EFT_NULL] = true;
|
||||
|
||||
// Try setting the Filter type to known Filters
|
||||
EFXInterface.alFilteri(Filter, AL_FILTER_TYPE, AL_FILTER_LOWPASS);
|
||||
SupportedFilters[EFT_LOWPASS] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alFilteri(Filter, AL_FILTER_TYPE, AL_FILTER_HIGHPASS);
|
||||
SupportedFilters[EFT_HIGHPASS] = (alGetError() == AL_NO_ERROR);
|
||||
|
||||
EFXInterface.alFilteri(Filter, AL_FILTER_TYPE, AL_FILTER_BANDPASS);
|
||||
SupportedFilters[EFT_BANDPASS] = (alGetError() == AL_NO_ERROR);
|
||||
}
|
||||
|
||||
// Delete Filter
|
||||
EFXInterface.alDeleteFilters(1, &Filter);
|
||||
|
||||
//Cleanup the slots we created
|
||||
while(count > 0)
|
||||
{
|
||||
EFXInterface.alDeleteAuxiliaryEffectSlots(1, &effectSlots[--count]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,807 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cAudioManager.h"
|
||||
#include "../Headers/cFileSource.h"
|
||||
#include "../Headers/cMemorySource.h"
|
||||
#include "../Headers/cUtils.h"
|
||||
#include "../Headers/cOggAudioDecoderFactory.h"
|
||||
#include "../Headers/cWavAudioDecoderFactory.h"
|
||||
#include "../Headers/cRawAudioDecoderFactory.h"
|
||||
#include "../Headers/cThread.h"
|
||||
#include "../include/cAudioSleep.h"
|
||||
#include "../Headers/cLogger.h"
|
||||
#include "../Headers/cPluginManager.h"
|
||||
#include "../include/cAudioPlatform.h"
|
||||
#include "../Headers/cFileSourceFactory.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
#include <AL/efx.h>
|
||||
#include <AL/efx-creative.h>
|
||||
#include <AL/xram.h>
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_LINUX
|
||||
#include <AL/alext.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
static bool RunAudioManagerThread(false);
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_OGG_DECODER
|
||||
static cOggAudioDecoderFactory OggDecoderFactory;
|
||||
#endif
|
||||
#ifdef CAUDIO_COMPILE_WITH_WAV_DECODER
|
||||
static cWavAudioDecoderFactory WavDecoderFactory;
|
||||
#endif
|
||||
|
||||
static cRawAudioDecoderFactory RawDecoderFactory;
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
static cFileSourceFactory FileSourceFactory;
|
||||
#endif
|
||||
|
||||
//Note: OpenAL is threadsafe, so a mutex only needs to protect the class state
|
||||
#ifdef CAUDIO_USE_INTERNAL_THREAD
|
||||
static cAudioMutex AudioManagerObjectsMutex;
|
||||
static cAudioSet<IAudioManager*>::Type AudioManagerObjects;
|
||||
|
||||
CAUDIO_DECLARE_THREAD_FUNCTION(AudioManagerUpdateThread)
|
||||
{
|
||||
while(RunAudioManagerThread)
|
||||
{
|
||||
AudioManagerObjectsMutex.lock();
|
||||
cAudioSet<IAudioManager*>::Type::iterator it;
|
||||
for ( it=AudioManagerObjects.begin() ; it != AudioManagerObjects.end(); it++ )
|
||||
{
|
||||
(*it)->update();
|
||||
}
|
||||
AudioManagerObjectsMutex.unlock();
|
||||
cAudioSleep(1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool cAudioManager::initialize(const char* deviceName, int outputFrequency, int eaxEffectSlots)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
|
||||
if(Initialized)
|
||||
return false;
|
||||
|
||||
//Stores the context attributes (MAX of 4, with 2 zeros to terminate)
|
||||
ALint attribs[6] = { 0 };
|
||||
|
||||
unsigned int currentAttrib = 0;
|
||||
if(outputFrequency > 0)
|
||||
{
|
||||
attribs[currentAttrib++] = ALC_FREQUENCY;
|
||||
attribs[currentAttrib++] = outputFrequency;
|
||||
}
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
if(eaxEffectSlots > 0)
|
||||
{
|
||||
attribs[currentAttrib++] = ALC_MAX_AUXILIARY_SENDS;
|
||||
attribs[currentAttrib++] = eaxEffectSlots;
|
||||
}
|
||||
#endif
|
||||
|
||||
//Create a new device
|
||||
Device = alcOpenDevice(deviceName);
|
||||
//Check if device can be created
|
||||
if (Device == NULL)
|
||||
{
|
||||
getLogger()->logError("AudioManager", "Failed to Create OpenAL Device.");
|
||||
checkError();
|
||||
return false;
|
||||
}
|
||||
|
||||
Context = alcCreateContext(Device, attribs);
|
||||
if (Context == NULL)
|
||||
{
|
||||
getLogger()->logError("AudioManager", "Failed to Create OpenAL Context.");
|
||||
checkError();
|
||||
alcCloseDevice(Device);
|
||||
Device = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!alcMakeContextCurrent(Context))
|
||||
{
|
||||
getLogger()->logError("AudioManager", "Failed to make OpenAL Context current.");
|
||||
checkError();
|
||||
alcDestroyContext(Context);
|
||||
alcCloseDevice(Device);
|
||||
Context = NULL;
|
||||
Device = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
initEffects.getEFXInterface()->Mutex.lock();
|
||||
EFXSupported = initEffects.getEFXInterface()->CheckEFXSupport(Device);
|
||||
initEffects.getEFXInterface()->Mutex.unlock();
|
||||
initEffects.checkEFXSupportDetails();
|
||||
#endif
|
||||
|
||||
getLogger()->logInfo("AudioManager", "OpenAL Version: %s", alGetString(AL_VERSION));
|
||||
getLogger()->logInfo("AudioManager", "Vendor: %s", alGetString(AL_VENDOR));
|
||||
getLogger()->logInfo("AudioManager", "Renderer: %s", alGetString(AL_RENDERER));
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
if(EFXSupported)
|
||||
{
|
||||
int EFXMajorVersion = 0;
|
||||
int EFXMinorVersion = 0;
|
||||
alcGetIntegerv(Device, ALC_EFX_MAJOR_VERSION, 1, &EFXMajorVersion);
|
||||
alcGetIntegerv(Device, ALC_EFX_MINOR_VERSION, 1, &EFXMinorVersion);
|
||||
getLogger()->logInfo("AudioManager", "EFX Version: %i.%i", EFXMajorVersion, EFXMinorVersion);
|
||||
getLogger()->logInfo("AudioManager", "EFX supported and enabled.");
|
||||
}
|
||||
else
|
||||
{
|
||||
getLogger()->logWarning("AudioManager", "EFX is not supported, EFX disabled.");
|
||||
}
|
||||
#endif
|
||||
getLogger()->logInfo("AudioManager", "Supported Extensions: %s", alGetString(AL_EXTENSIONS));
|
||||
|
||||
Initialized = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
IAudioSource* cAudioManager::create(const char* name, const char* filename, bool stream)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
|
||||
cAudioString audioName = safeCStr(name);
|
||||
cAudioString path = safeCStr(filename);
|
||||
|
||||
cAudioString ext = getExt(path);
|
||||
IAudioDecoderFactory* factory = getAudioDecoderFactory(ext.c_str());
|
||||
|
||||
if(factory)
|
||||
{
|
||||
for(int i=0; i<dataSourcePriorityList.size(); ++i)
|
||||
{
|
||||
IDataSourceFactory* dataFactory = datasourcemap[dataSourcePriorityList[i].second];
|
||||
if(dataFactory)
|
||||
{
|
||||
IDataSource* source = dataFactory->CreateDataSource(filename, stream);
|
||||
if(source && source->isValid())
|
||||
{
|
||||
IAudioDecoder* decoder = factory->CreateAudioDecoder(source);
|
||||
source->drop();
|
||||
if(decoder && decoder->isValid())
|
||||
{
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
IAudioSource* audio = CAUDIO_NEW cAudioSource(decoder, Context, initEffects.getEFXInterface());
|
||||
#else
|
||||
IAudioSource* audio = CAUDIO_NEW cAudioSource(decoder, Context);
|
||||
#endif
|
||||
decoder->drop();
|
||||
|
||||
if(audio && audio->isValid())
|
||||
{
|
||||
if(!audioName.empty())
|
||||
audioIndex[audioName] = audio;
|
||||
|
||||
audioSources.push_back(audio);
|
||||
|
||||
getLogger()->logInfo("AudioManager", "Audio Source (%s) created from file %s from Data Source %s.", audioName.c_str(), path.c_str(), dataSourcePriorityList[i].second.c_str());
|
||||
|
||||
return audio;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Error creating audio source.", audioName.c_str());
|
||||
audio->drop();
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Audio data could not be decoded by (.%s) decoder.", audioName.c_str(), ext.c_str());
|
||||
decoder->drop();
|
||||
return NULL;
|
||||
}
|
||||
if(source)
|
||||
source->drop();
|
||||
}
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): File could not be found (.%s).", audioName.c_str(), path.c_str());
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): No decoder could be found for (.%s).", audioName.c_str(), ext.c_str());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IAudioSource* cAudioManager::createFromMemory(const char* name, const char* data, size_t length, const char* extension)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
|
||||
cAudioString audioName = safeCStr(name);
|
||||
cAudioString ext = safeCStr(extension);
|
||||
IAudioDecoderFactory* factory = getAudioDecoderFactory(ext.c_str());
|
||||
if(factory)
|
||||
{
|
||||
cMemorySource* source = CAUDIO_NEW cMemorySource(data, length, true);
|
||||
if(source)
|
||||
{
|
||||
if(source->isValid())
|
||||
{
|
||||
IAudioDecoder* decoder = factory->CreateAudioDecoder(source);
|
||||
source->drop();
|
||||
if(decoder)
|
||||
{
|
||||
if(decoder->isValid())
|
||||
{
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
IAudioSource* audio = CAUDIO_NEW cAudioSource(decoder, Context, initEffects.getEFXInterface());
|
||||
#else
|
||||
IAudioSource* audio = CAUDIO_NEW cAudioSource(decoder, Context);
|
||||
#endif
|
||||
decoder->drop();
|
||||
|
||||
if(audio)
|
||||
{
|
||||
if(audio->isValid())
|
||||
{
|
||||
if(!audioName.empty())
|
||||
audioIndex[audioName] = audio;
|
||||
|
||||
audioSources.push_back(audio);
|
||||
|
||||
getLogger()->logInfo("AudioManager", "Audio Source (%s) successfully created from memory.", audioName.c_str());
|
||||
|
||||
return audio;
|
||||
}
|
||||
audio->drop();
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Error creating audio source.", audioName.c_str());
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Could not allocate enough memory.", audioName.c_str());
|
||||
return NULL;
|
||||
}
|
||||
decoder->drop();
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Audio data could not be decoded by (.%s) decoder.", audioName.c_str(), ext.c_str());
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Could not allocate enough memory for decoder.", audioName.c_str());
|
||||
return NULL;
|
||||
}
|
||||
source->drop();
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Audio data is corrupt.", audioName.c_str());
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Could not allocate enough memory.", audioName.c_str());
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Codec (.%s) is not supported.", audioName.c_str(), ext.c_str());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IAudioSource* cAudioManager::createFromRaw(const char* name, const char* data, size_t length, unsigned int frequency, AudioFormats format)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
|
||||
cAudioString audioName = safeCStr(name);
|
||||
IAudioDecoderFactory* factory = getAudioDecoderFactory("raw");
|
||||
if(factory)
|
||||
{
|
||||
cMemorySource* source = CAUDIO_NEW cMemorySource(data, length, true);
|
||||
if(source)
|
||||
{
|
||||
if(source->isValid())
|
||||
{
|
||||
IAudioDecoder* decoder = ((cRawAudioDecoderFactory*)factory)->CreateAudioDecoder(source, frequency, format);
|
||||
source->drop();
|
||||
if(decoder)
|
||||
{
|
||||
if(decoder->isValid())
|
||||
{
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
IAudioSource* audio = CAUDIO_NEW cAudioSource(decoder, Context, initEffects.getEFXInterface());
|
||||
#else
|
||||
IAudioSource* audio = CAUDIO_NEW cAudioSource(decoder, Context);
|
||||
#endif
|
||||
decoder->drop();
|
||||
|
||||
if(audio)
|
||||
{
|
||||
if(audio->isValid())
|
||||
{
|
||||
if(!audioName.empty())
|
||||
audioIndex[audioName] = audio;
|
||||
|
||||
audioSources.push_back(audio);
|
||||
|
||||
getLogger()->logInfo("AudioManager", "Audio Source (%s) successfully created from raw data.", audioName.c_str());
|
||||
|
||||
return audio;
|
||||
}
|
||||
audio->drop();
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Error creating audio source.", audioName.c_str());
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Could not allocate enough memory.", audioName.c_str());
|
||||
return NULL;
|
||||
}
|
||||
decoder->drop();
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Audio data could not be decoded by (.%s) decoder.", audioName.c_str(), "raw");
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Could not allocate enough memory for decoder.", audioName.c_str());
|
||||
return NULL;
|
||||
}
|
||||
source->drop();
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Audio data is corrupt.", audioName.c_str());
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Could not allocate enough memory.", audioName.c_str());
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Codec (.%s) is not supported.", audioName.c_str(), "raw");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool cAudioManager::registerAudioDecoder(IAudioDecoderFactory* factory, const char* extension)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString ext = safeCStr(extension);
|
||||
decodermap[ext] = factory;
|
||||
getLogger()->logInfo("AudioManager", "Audio Decoder for extension .%s registered.", ext.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
void cAudioManager::unRegisterAudioDecoder(const char* extension)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString ext = safeCStr(extension);
|
||||
decodermapIterator it = decodermap.find(ext);
|
||||
if(it != decodermap.end())
|
||||
{
|
||||
decodermap.erase(it);
|
||||
getLogger()->logInfo("AudioManager", "Audio Decoder for extension .%s unregistered.", ext.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
bool cAudioManager::isAudioDecoderRegistered(const char* extension)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString ext = safeCStr(extension);
|
||||
decodermapIterator it = decodermap.find(ext);
|
||||
return (it != decodermap.end());
|
||||
}
|
||||
|
||||
IAudioDecoderFactory* cAudioManager::getAudioDecoderFactory(const char* extension)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString ext = safeCStr(extension);
|
||||
decodermapIterator it = decodermap.find(ext);
|
||||
if(it != decodermap.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void cAudioManager::unRegisterAllAudioDecoders()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
decodermap.clear();
|
||||
}
|
||||
|
||||
bool compareDataSourcePriorities(std::pair<int, cAudioString> left, std::pair<int, cAudioString> right)
|
||||
{
|
||||
return (left.first > right.first);
|
||||
}
|
||||
|
||||
bool cAudioManager::registerDataSource(IDataSourceFactory* factory, const char* name, int priority)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
datasourcemap[safeName] = factory;
|
||||
dataSourcePriorityList.push_back(std::pair<int, cAudioString>(priority, safeName));
|
||||
std::sort(dataSourcePriorityList.begin(), dataSourcePriorityList.end(), compareDataSourcePriorities);
|
||||
|
||||
getLogger()->logInfo("AudioManager", "Data Source named %s registered (Priority %i).", safeName.c_str(), priority);
|
||||
return true;
|
||||
}
|
||||
|
||||
void cAudioManager::unRegisterDataSource(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
datasourcemapIterator it = datasourcemap.find(safeName);
|
||||
if(it != datasourcemap.end())
|
||||
{
|
||||
datasourcemap.erase(it);
|
||||
getLogger()->logInfo("AudioManager", "Data Source named %s unregistered.", safeName.c_str());
|
||||
}
|
||||
|
||||
for(int i=0; i<dataSourcePriorityList.size(); ++i)
|
||||
{
|
||||
if(dataSourcePriorityList[i].second == safeName)
|
||||
{
|
||||
dataSourcePriorityList.erase(dataSourcePriorityList.begin()+i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(dataSourcePriorityList.begin(), dataSourcePriorityList.end(), compareDataSourcePriorities);
|
||||
}
|
||||
|
||||
bool cAudioManager::isDataSourceRegistered(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
datasourcemapIterator it = datasourcemap.find(safeName);
|
||||
return (it != datasourcemap.end());
|
||||
}
|
||||
|
||||
IDataSourceFactory* cAudioManager::getDataSourceFactory(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString safeName = safeCStr(name);
|
||||
datasourcemapIterator it = datasourcemap.find(safeName);
|
||||
if(it != datasourcemap.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void cAudioManager::unRegisterAllDataSources()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
datasourcemap.clear();
|
||||
dataSourcePriorityList.clear();
|
||||
}
|
||||
|
||||
void cAudioManager::registerEventHandler(IManagerEventHandler* handler)
|
||||
{
|
||||
if(handler)
|
||||
{
|
||||
eventHandlerList.push_back(handler);
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioManager::unRegisterEventHandler(IManagerEventHandler* handler)
|
||||
{
|
||||
if(handler)
|
||||
{
|
||||
eventHandlerList.remove(handler);
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioManager::unRegisterAllEventHandlers()
|
||||
{
|
||||
eventHandlerList.clear();
|
||||
}
|
||||
|
||||
void cAudioManager::signalEvent(Events sevent)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioList<IManagerEventHandler*>::Type::iterator it = eventHandlerList.begin();
|
||||
|
||||
if(it != eventHandlerList.end())
|
||||
{
|
||||
switch(sevent)
|
||||
{
|
||||
case ON_INIT:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++)
|
||||
{
|
||||
(*it)->onInit();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_UPDATE:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++)
|
||||
{
|
||||
(*it)->onUpdate();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_RELEASE:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++)
|
||||
{
|
||||
(*it)->onRelease();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_SOURCECREATE:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++)
|
||||
{
|
||||
(*it)->onSourceCreate();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_DECODERREGISTER:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++)
|
||||
{
|
||||
(*it)->onDecoderRegister();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_DATASOURCEREGISTER:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++)
|
||||
{
|
||||
(*it)->onDataSourceRegister();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IAudioSource* cAudioManager::getSoundByName(const char* name)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString audioName = safeCStr(name);
|
||||
audioIndexIterator i = audioIndex.find(audioName);
|
||||
if (i == audioIndex.end())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return i->second;
|
||||
}
|
||||
|
||||
void cAudioManager::releaseAllSources()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
for(unsigned int i=0; i<audioSources.size(); ++i)
|
||||
{
|
||||
IAudioSource* source = audioSources[i];
|
||||
if(source)
|
||||
source->drop();
|
||||
}
|
||||
audioSources.clear();
|
||||
audioIndex.clear();
|
||||
}
|
||||
|
||||
void cAudioManager::release(IAudioSource* source)
|
||||
{
|
||||
if(source)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
audioIndexIterator it = audioIndex.begin();
|
||||
for ( it=audioIndex.begin(); it != audioIndex.end(); it++ )
|
||||
{
|
||||
if( it->second == source )
|
||||
{
|
||||
audioIndex.erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(unsigned int i=0; i<audioSources.size(); ++i)
|
||||
{
|
||||
if(source == audioSources[i])
|
||||
{
|
||||
source->drop();
|
||||
audioSources.erase(audioSources.begin()+i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioManager::update()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
for(unsigned int i=0; i<audioSources.size(); ++i)
|
||||
{
|
||||
IAudioSource* source = audioSources[i];
|
||||
if (source->isValid())
|
||||
{
|
||||
if (source->update())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioManager::shutDown()
|
||||
{
|
||||
if(Initialized)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
releaseAllSources();
|
||||
//Reset context to null
|
||||
alcMakeContextCurrent(NULL);
|
||||
//Delete the context
|
||||
alcDestroyContext(Context);
|
||||
Context = NULL;
|
||||
//Close the device
|
||||
alcCloseDevice(Device);
|
||||
Device = NULL;
|
||||
Initialized = false;
|
||||
getLogger()->logInfo("AudioManager", "Manager successfully shutdown.");
|
||||
}
|
||||
}
|
||||
|
||||
bool cAudioManager::checkError()
|
||||
{
|
||||
int error = alGetError();
|
||||
const char* errorString;
|
||||
|
||||
if (error != AL_NO_ERROR)
|
||||
{
|
||||
errorString = alGetString(error);
|
||||
getLogger()->logError("AudioManager", "OpenAL Error: %s.", errorString);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(Device)
|
||||
{
|
||||
error = alcGetError(Device);
|
||||
if (error != AL_NO_ERROR)
|
||||
{
|
||||
errorString = alGetString(error);
|
||||
getLogger()->logError("AudioManager", "OpenAL Error: %s.", errorString);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void cAudioManager::getAvailableDevices()
|
||||
{
|
||||
// Get list of available Playback Devices
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if( alcIsExtensionPresent(NULL, "ALC_ENUMERATE_ALL_EXT") == AL_TRUE )
|
||||
{
|
||||
const char* deviceList = alcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER);
|
||||
if (deviceList)
|
||||
{
|
||||
while(*deviceList)
|
||||
{
|
||||
cAudioString device(deviceList);
|
||||
AvailableDevices.push_back(device);
|
||||
deviceList += strlen(deviceList) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the name of the 'default' capture device
|
||||
DefaultDevice = alcGetString(NULL, ALC_DEFAULT_ALL_DEVICES_SPECIFIER);
|
||||
}
|
||||
else if( alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT") == AL_TRUE )
|
||||
{
|
||||
const char* deviceList = alcGetString(NULL, ALC_DEVICE_SPECIFIER);
|
||||
if (deviceList)
|
||||
{
|
||||
while(*deviceList)
|
||||
{
|
||||
cAudioString device(deviceList);
|
||||
AvailableDevices.push_back(device);
|
||||
deviceList += strlen(deviceList) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the name of the 'default' capture device
|
||||
DefaultDevice = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
|
||||
}
|
||||
}
|
||||
|
||||
const char* cAudioManager::getAvailableDeviceName(unsigned int index)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(!AvailableDevices.empty())
|
||||
{
|
||||
//Bounds check
|
||||
if( index > (AvailableDevices.size()-1) ) index = (AvailableDevices.size()-1);
|
||||
const char* deviceName = AvailableDevices[index].c_str();
|
||||
return deviceName;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
unsigned int cAudioManager::getAvailableDeviceCount()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
return AvailableDevices.size();
|
||||
}
|
||||
|
||||
const char* cAudioManager::getDefaultDeviceName()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
return DefaultDevice.empty() ? "" : DefaultDevice.c_str();
|
||||
}
|
||||
|
||||
CAUDIO_API IAudioManager* createAudioManager(bool initializeDefault)
|
||||
{
|
||||
cAudioManager* manager = CAUDIO_NEW cAudioManager;
|
||||
if(manager)
|
||||
{
|
||||
if(initializeDefault)
|
||||
manager->initialize();
|
||||
|
||||
manager->getAvailableDevices();
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_OGG_DECODER
|
||||
manager->registerAudioDecoder(&OggDecoderFactory, "ogg");
|
||||
#endif
|
||||
#ifdef CAUDIO_COMPILE_WITH_WAV_DECODER
|
||||
manager->registerAudioDecoder(&WavDecoderFactory, "wav");
|
||||
#endif
|
||||
|
||||
manager->registerAudioDecoder(&RawDecoderFactory, "raw");
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
manager->registerDataSource(&FileSourceFactory, "FileSystem", 0);
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
cAudioVector<IAudioPlugin*>::Type plugins = cPluginManager::Instance()->getPluginList();
|
||||
for(unsigned int i = 0; i < plugins.size(); ++i)
|
||||
{
|
||||
plugins[i]->onCreateAudioManager(manager);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_USE_INTERNAL_THREAD
|
||||
AudioManagerObjectsMutex.lock();
|
||||
AudioManagerObjects.insert(manager);
|
||||
|
||||
//First time launch of thread
|
||||
if(!RunAudioManagerThread && AudioManagerObjects.size() > 0)
|
||||
RunAudioManagerThread = (cAudioThread::SpawnThread(AudioManagerUpdateThread, NULL) == 0);
|
||||
AudioManagerObjectsMutex.unlock();
|
||||
#endif
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
CAUDIO_API void destroyAudioManager(IAudioManager* manager)
|
||||
{
|
||||
if(manager)
|
||||
{
|
||||
#ifdef CAUDIO_USE_INTERNAL_THREAD
|
||||
AudioManagerObjectsMutex.lock();
|
||||
AudioManagerObjects.erase(manager);
|
||||
|
||||
//Kill the thread if there are no objects to process anymore
|
||||
if(RunAudioManagerThread && AudioManagerObjects.empty())
|
||||
RunAudioManagerThread = false;
|
||||
AudioManagerObjectsMutex.unlock();
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
cAudioVector<IAudioPlugin*>::Type plugins = cPluginManager::Instance()->getPluginList();
|
||||
for(unsigned int i = 0; i < plugins.size(); ++i)
|
||||
{
|
||||
plugins[i]->onDestroyAudioManager(manager);
|
||||
}
|
||||
#endif
|
||||
|
||||
manager->unRegisterAllAudioDecoders();
|
||||
manager->unRegisterAllDataSources();
|
||||
manager->unRegisterAllEventHandlers();
|
||||
manager->shutDown();
|
||||
|
||||
CAUDIO_DELETE manager;
|
||||
manager = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
CAUDIO_API bool isAudioManagerThreadRunning()
|
||||
{
|
||||
return RunAudioManagerThread;
|
||||
}
|
||||
|
||||
};
|
|
@ -1,15 +0,0 @@
|
|||
#include "../include/cAudioMemory.h"
|
||||
#include "../Headers/cStandardMemoryProvider.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
CAUDIO_API IMemoryProvider* getMemoryProvider()
|
||||
{
|
||||
#ifdef CAUDIO_MEMORY_USE_STD
|
||||
static cStandardMemoryProvider memoryProvider;
|
||||
#endif
|
||||
//To use your own memory provider, add it in here and set its name to memoryProvider
|
||||
|
||||
return &memoryProvider;
|
||||
}
|
||||
};
|
|
@ -1,28 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../include/cAudioPlatform.h"
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
#include <windows.h> //Basic windows include for Sleep();
|
||||
#else
|
||||
#include <unistd.h> //Assumed linux system, include for usleep()
|
||||
#include <time.h>
|
||||
#endif //If you need to support another platform, simply add a define for it
|
||||
|
||||
#include "../include/cAudioSleep.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
void cAudioSleep(unsigned int ms)
|
||||
{
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
Sleep(ms);
|
||||
#else
|
||||
usleep(ms*1000); //convert from milliseconds to microseconds
|
||||
#endif
|
||||
}
|
||||
|
||||
};
|
|
@ -1,847 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cAudioSource.h"
|
||||
#include "../Headers/cLogger.h"
|
||||
#include "../Headers/cFilter.h"
|
||||
#include "../Headers/cEffect.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
cAudioSource::cAudioSource(IAudioDecoder* decoder, ALCcontext* context, cEFXFunctions* oALFunctions)
|
||||
: Context(context), Source(0), Decoder(decoder), Loop(false), Valid(false),
|
||||
EFX(oALFunctions), Filter(NULL), EffectSlotsAvailable(0), LastFilterTimeStamp(0)
|
||||
#else
|
||||
cAudioSource::cAudioSource(IAudioDecoder* decoder, ALCcontext* context)
|
||||
: Context(context), Source(0), Decoder(decoder), Loop(false), Valid(false)
|
||||
#endif
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
|
||||
for(int i=0; i<CAUDIO_SOURCE_NUM_BUFFERS; ++i)
|
||||
Buffers[i] = 0;
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
for(int i=0; i<CAUDIO_SOURCE_MAX_EFFECT_SLOTS; ++i)
|
||||
Effects[i] = NULL;
|
||||
|
||||
for(int i=0; i<CAUDIO_SOURCE_MAX_EFFECT_SLOTS; ++i)
|
||||
LastEffectTimeStamp[i] = 0;
|
||||
#endif
|
||||
|
||||
if(Decoder)
|
||||
Decoder->grab();
|
||||
|
||||
//Generates 3 buffers for the ogg file
|
||||
alGenBuffers(CAUDIO_SOURCE_NUM_BUFFERS, Buffers);
|
||||
bool state = !checkError();
|
||||
if(state)
|
||||
{
|
||||
//Creates one source to be stored.
|
||||
alGenSources(1, &Source);
|
||||
state = !checkError();
|
||||
}
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
Valid = state && (Decoder != NULL) && (Context != NULL) && (EFX != NULL);
|
||||
#else
|
||||
Valid = state && (Decoder != NULL) && (Context != NULL);
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
int numSlots = 0;
|
||||
ALCdevice* device = alcGetContextsDevice(Context);
|
||||
alcGetIntegerv(device, ALC_MAX_AUXILIARY_SENDS, 1, &numSlots);
|
||||
|
||||
EffectSlotsAvailable = (numSlots <= CAUDIO_SOURCE_MAX_EFFECT_SLOTS) ? numSlots : CAUDIO_SOURCE_MAX_EFFECT_SLOTS;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
cAudioSource::~cAudioSource()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(Decoder)
|
||||
Decoder->drop();
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
for(int i=0; i<CAUDIO_SOURCE_MAX_EFFECT_SLOTS; ++i)
|
||||
{
|
||||
if(Effects[i])
|
||||
Effects[i]->drop();
|
||||
Effects[i] = NULL;
|
||||
}
|
||||
|
||||
if(Filter)
|
||||
Filter->drop();
|
||||
Filter = NULL;
|
||||
#endif
|
||||
unRegisterAllEventHandlers();
|
||||
}
|
||||
|
||||
bool cAudioSource::play()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if (!isPaused())
|
||||
{
|
||||
int queueSize = 0;
|
||||
//Purges all buffers from the source
|
||||
alSourcei(Source, AL_BUFFER, 0);
|
||||
checkError();
|
||||
for(int u = 0; u < CAUDIO_SOURCE_NUM_BUFFERS; u++)
|
||||
{
|
||||
int val = stream(Buffers[u]);
|
||||
|
||||
if(val < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if(val > 0)
|
||||
++queueSize;
|
||||
}
|
||||
//Stores the sources 3 buffers to be used in the queue
|
||||
alSourceQueueBuffers(Source, queueSize, Buffers);
|
||||
checkError();
|
||||
}
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
updateFilter();
|
||||
for(unsigned int i=0; i<CAUDIO_SOURCE_MAX_EFFECT_SLOTS; ++i)
|
||||
updateEffect(i);
|
||||
#endif
|
||||
alSourcePlay(Source);
|
||||
checkError();
|
||||
getLogger()->logDebug("Audio Source", "Source playing.");
|
||||
signalEvent(ON_PLAY);
|
||||
oldState = AL_PLAYING;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cAudioSource::play2d(const bool& toLoop)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcei(Source, AL_SOURCE_RELATIVE, true);
|
||||
loop(toLoop);
|
||||
bool state = play();
|
||||
checkError();
|
||||
return state;
|
||||
}
|
||||
|
||||
bool cAudioSource::play3d(const cVector3& position, const float& soundstr, const bool& toLoop)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcei(Source, AL_SOURCE_RELATIVE, false);
|
||||
setPosition(position);
|
||||
setStrength(soundstr);
|
||||
loop(toLoop);
|
||||
bool state = play();
|
||||
checkError();
|
||||
return state;
|
||||
}
|
||||
|
||||
void cAudioSource::pause()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcePause(Source);
|
||||
checkError();
|
||||
getLogger()->logDebug("Audio Source", "Source paused.");
|
||||
signalEvent(ON_PAUSE);
|
||||
oldState = AL_PAUSED;
|
||||
}
|
||||
|
||||
void cAudioSource::stop()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourceStop(Source);
|
||||
//Resets the audio to the beginning
|
||||
Decoder->setPosition(0, false);
|
||||
checkError();
|
||||
getLogger()->logDebug("Audio Source", "Source stopped.");
|
||||
signalEvent(ON_STOP);
|
||||
oldState = AL_STOPPED;
|
||||
}
|
||||
|
||||
void cAudioSource::loop(const bool& loop)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Loop = loop;
|
||||
}
|
||||
|
||||
bool cAudioSource::seek(const float& seconds, bool relative)
|
||||
{
|
||||
bool state = false;
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(Decoder->isSeekingSupported())
|
||||
{
|
||||
state = Decoder->seek(seconds, relative);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
float cAudioSource::getTotalAudioTime()
|
||||
{
|
||||
return Decoder->getTotalTime();
|
||||
}
|
||||
|
||||
int cAudioSource::getTotalAudioSize()
|
||||
{
|
||||
return Decoder->getTotalSize();
|
||||
}
|
||||
|
||||
int cAudioSource::getCompressedAudioSize()
|
||||
{
|
||||
return Decoder->getCompressedSize();
|
||||
}
|
||||
|
||||
float cAudioSource::getCurrentAudioTime()
|
||||
{
|
||||
return Decoder->getCurrentTime();
|
||||
}
|
||||
|
||||
int cAudioSource::getCurrentAudioPosition()
|
||||
{
|
||||
return Decoder->getCurrentPosition();
|
||||
}
|
||||
|
||||
int cAudioSource::getCurrentCompressedAudioPosition()
|
||||
{
|
||||
return Decoder->getCurrentCompressedPosition();
|
||||
}
|
||||
|
||||
bool cAudioSource::update()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
|
||||
int processed = 0;
|
||||
bool active = true;
|
||||
if(isValid() || isPlaying())
|
||||
{
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
updateFilter();
|
||||
for(unsigned int i=0; i<CAUDIO_SOURCE_MAX_EFFECT_SLOTS; ++i)
|
||||
updateEffect(i);
|
||||
#endif
|
||||
|
||||
//gets the sound source processed buffers
|
||||
alGetSourcei(Source, AL_BUFFERS_PROCESSED, &processed);
|
||||
|
||||
//while there is more data refill buffers with audio data.
|
||||
while (processed--)
|
||||
{
|
||||
ALuint buffer;
|
||||
alSourceUnqueueBuffers(Source, 1, &buffer);
|
||||
active = stream(buffer);
|
||||
|
||||
//if more in stream continue playing.
|
||||
if(active)
|
||||
{
|
||||
alSourceQueueBuffers(Source, 1, &buffer);
|
||||
}
|
||||
|
||||
checkError();
|
||||
}
|
||||
|
||||
signalEvent(ON_UPDATE);
|
||||
}
|
||||
|
||||
ALenum state;
|
||||
alGetSourcei(Source, AL_SOURCE_STATE, &state);
|
||||
if(state == AL_STOPPED && oldState != state)
|
||||
{
|
||||
//Resets the audio to the beginning
|
||||
Decoder->setPosition(0, false);
|
||||
getLogger()->logDebug("Audio Source", "Source stopped.");
|
||||
signalEvent(ON_STOP);
|
||||
oldState = state;
|
||||
}
|
||||
|
||||
return active;
|
||||
}
|
||||
|
||||
void cAudioSource::release()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
//Stops the audio Source
|
||||
alSourceStop(Source);
|
||||
empty();
|
||||
//Deletes the source
|
||||
alDeleteSources(1, &Source);
|
||||
//deletes the last filled buffer
|
||||
alDeleteBuffers(CAUDIO_SOURCE_NUM_BUFFERS, Buffers);
|
||||
checkError();
|
||||
getLogger()->logDebug("Audio Source", "Audio source released.");
|
||||
signalEvent(ON_RELEASE);
|
||||
}
|
||||
|
||||
const bool cAudioSource::isValid() const
|
||||
{
|
||||
return Valid;
|
||||
}
|
||||
|
||||
const bool cAudioSource::isPlaying() const
|
||||
{
|
||||
ALenum state = 0;
|
||||
alGetSourcei(Source, AL_SOURCE_STATE, &state);
|
||||
return (state == AL_PLAYING);
|
||||
}
|
||||
|
||||
const bool cAudioSource::isPaused() const
|
||||
{
|
||||
ALenum state = 0;
|
||||
alGetSourcei(Source, AL_SOURCE_STATE, &state);
|
||||
return (state == AL_PAUSED);
|
||||
}
|
||||
|
||||
const bool cAudioSource::isStopped() const
|
||||
{
|
||||
ALenum state = 0;
|
||||
alGetSourcei(Source, AL_SOURCE_STATE, &state);
|
||||
return (state == AL_STOPPED);
|
||||
}
|
||||
|
||||
const bool cAudioSource::isLooping() const
|
||||
{
|
||||
return Loop;
|
||||
}
|
||||
|
||||
void cAudioSource::setPosition(const cVector3& position)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSource3f(Source, AL_POSITION, position.x, position.y, position.z);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setVelocity(const cVector3& velocity)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSource3f(Source, AL_VELOCITY, velocity.x, velocity.y, velocity.z);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setDirection(const cVector3& direction)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSource3f(Source, AL_DIRECTION, direction.x, direction.y, direction.z);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setRolloffFactor(const float& rolloff)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_ROLLOFF_FACTOR, rolloff);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setStrength(const float& soundstrength)
|
||||
{
|
||||
float inverseStrength = 0.0f;
|
||||
if(soundstrength > 0.0f)
|
||||
inverseStrength = 1.0f / soundstrength;
|
||||
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_ROLLOFF_FACTOR, inverseStrength);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setMinDistance(const float& minDistance)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_REFERENCE_DISTANCE, minDistance);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setMaxDistance(const float& maxDistance)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_MAX_DISTANCE, maxDistance);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setPitch(const float& pitch)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef (Source, AL_PITCH, pitch);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setVolume(const float& volume)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_GAIN, volume);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setMinVolume(const float& minVolume)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_MIN_GAIN, minVolume);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setMaxVolume(const float& maxVolume)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_MAX_GAIN, maxVolume);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setInnerConeAngle(const float& innerAngle)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_CONE_INNER_ANGLE, innerAngle);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setOuterConeAngle(const float& outerAngle)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_CONE_OUTER_ANGLE, outerAngle);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setOuterConeVolume(const float& outerVolume)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_CONE_OUTER_GAIN, outerVolume);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setDopplerStrength(const float& dstrength)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSourcef(Source, AL_DOPPLER_FACTOR, dstrength);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::setDopplerVelocity(const cVector3& dvelocity)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alSource3f(Source, AL_DOPPLER_VELOCITY, dvelocity.x, dvelocity.y, dvelocity.z);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::move(const cVector3& position)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cVector3 oldPos = getPosition();
|
||||
cVector3 velocity = position - oldPos;
|
||||
|
||||
alSource3f(Source, AL_VELOCITY, velocity.x, velocity.y, velocity.z);
|
||||
alSource3f(Source, AL_POSITION, position.x, position.y, position.z);
|
||||
checkError();
|
||||
}
|
||||
|
||||
const cVector3 cAudioSource::getPosition() const
|
||||
{
|
||||
cVector3 position;
|
||||
alGetSourcefv(Source, AL_POSITION, &position.x);
|
||||
return position;
|
||||
}
|
||||
|
||||
const cVector3 cAudioSource::getVelocity() const
|
||||
{
|
||||
cVector3 velocity;
|
||||
alGetSourcefv(Source, AL_VELOCITY, &velocity.x);
|
||||
return velocity;
|
||||
}
|
||||
|
||||
const cVector3 cAudioSource::getDirection() const
|
||||
{
|
||||
cVector3 direction;
|
||||
alGetSourcefv(Source, AL_DIRECTION, &direction.x);
|
||||
return direction;
|
||||
}
|
||||
|
||||
const float cAudioSource::getRolloffFactor() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_ROLLOFF_FACTOR, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const float cAudioSource::getStrength() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_ROLLOFF_FACTOR, &value);
|
||||
|
||||
float inverseStrength = 0.0f;
|
||||
if(value > 0.0f)
|
||||
inverseStrength = 1.0f / value;
|
||||
|
||||
return inverseStrength;
|
||||
}
|
||||
|
||||
const float cAudioSource::getMinDistance() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_REFERENCE_DISTANCE, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const float cAudioSource::getMaxDistance() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_MAX_DISTANCE, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const float cAudioSource::getPitch() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_PITCH, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const float cAudioSource::getVolume() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_GAIN, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const float cAudioSource::getMinVolume() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_MIN_GAIN, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const float cAudioSource::getMaxVolume() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_MAX_GAIN, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const float cAudioSource::getInnerConeAngle() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_CONE_INNER_ANGLE, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const float cAudioSource::getOuterConeAngle() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_CONE_OUTER_ANGLE, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const float cAudioSource::getOuterConeVolume() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_CONE_OUTER_GAIN, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const float cAudioSource::getDopplerStrength() const
|
||||
{
|
||||
float value = 0.0f;
|
||||
alGetSourcef(Source, AL_DOPPLER_FACTOR, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
const cVector3 cAudioSource::getDopplerVelocity() const
|
||||
{
|
||||
cVector3 velocity;
|
||||
alGetSourcefv(Source, AL_DOPPLER_VELOCITY, &velocity.x);
|
||||
return velocity;
|
||||
}
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
unsigned int cAudioSource::getNumEffectSlotsAvailable() const
|
||||
{
|
||||
return EffectSlotsAvailable;
|
||||
}
|
||||
|
||||
bool cAudioSource::attachEffect(unsigned int slot, IEffect* effect)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(slot < EffectSlotsAvailable)
|
||||
{
|
||||
Effects[slot] = effect;
|
||||
|
||||
if(Effects[slot])
|
||||
Effects[slot]->grab();
|
||||
|
||||
updateEffect(slot);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void cAudioSource::removeEffect(unsigned int slot)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(slot < EffectSlotsAvailable)
|
||||
{
|
||||
if(Effects[slot])
|
||||
Effects[slot]->drop();
|
||||
|
||||
Effects[slot] = NULL;
|
||||
LastEffectTimeStamp[slot] = 0;
|
||||
updateEffect(slot, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool cAudioSource::attachFilter(IFilter* filter)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Filter = filter;
|
||||
|
||||
if(Filter)
|
||||
Filter->grab();
|
||||
|
||||
updateFilter();
|
||||
return true;
|
||||
}
|
||||
|
||||
void cAudioSource::removeFilter()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(Filter)
|
||||
Filter->drop();
|
||||
Filter = NULL;
|
||||
LastFilterTimeStamp = 0;
|
||||
updateFilter(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
void cAudioSource::empty()
|
||||
{
|
||||
int queued = 0;
|
||||
alGetSourcei(Source, AL_BUFFERS_QUEUED, &queued);
|
||||
|
||||
while (queued--)
|
||||
{
|
||||
ALuint buffer;
|
||||
alSourceUnqueueBuffers(Source, 1, &buffer);
|
||||
checkError();
|
||||
}
|
||||
}
|
||||
|
||||
bool cAudioSource::checkError()
|
||||
{
|
||||
int error = alGetError();
|
||||
const char* errorString;
|
||||
|
||||
if (error != AL_NO_ERROR)
|
||||
{
|
||||
errorString = alGetString(error);
|
||||
if(error == AL_OUT_OF_MEMORY)
|
||||
getLogger()->logCritical("Audio Source", "OpenAL Error: %s.", errorString);
|
||||
else
|
||||
getLogger()->logError("Audio Source", "OpenAL Error: %s.", errorString);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cAudioSource::stream(ALuint buffer)
|
||||
{
|
||||
if(Decoder)
|
||||
{
|
||||
//stores the caculated data into buffer that is passed to output.
|
||||
size_t totalread = 0;
|
||||
unsigned int errorcount = 0;
|
||||
char tempbuffer[CAUDIO_SOURCE_BUFFER_SIZE];
|
||||
while( totalread < CAUDIO_SOURCE_BUFFER_SIZE )
|
||||
{
|
||||
char tempbuffer2[CAUDIO_SOURCE_BUFFER_SIZE];
|
||||
int actualread = Decoder->readAudioData(tempbuffer2, CAUDIO_SOURCE_BUFFER_SIZE-totalread);
|
||||
if(actualread > 0)
|
||||
{
|
||||
memcpy(tempbuffer+totalread,tempbuffer2,actualread);
|
||||
totalread += actualread;
|
||||
}
|
||||
if(actualread < 0)
|
||||
{
|
||||
++errorcount;
|
||||
getLogger()->logDebug("Audio Source", "Decoder returned an error: %i (%i of 3)", actualread, errorcount);
|
||||
if(errorcount >= 3)
|
||||
{
|
||||
stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(actualread == 0)
|
||||
{
|
||||
if(isLooping())
|
||||
{
|
||||
//If we are to loop, set to the beginning and reload from the start
|
||||
Decoder->setPosition(0, false);
|
||||
getLogger()->logDebug("Audio Source", "Buffer looping.");
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Second check, in case looping is not enabled, we will return false for end of stream
|
||||
if(totalread == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
getLogger()->logDebug("Audio Source", "Buffered %i bytes of data into buffer %i at %i hz.", totalread, buffer, Decoder->getFrequency());
|
||||
alBufferData(buffer, convertAudioFormatEnum(Decoder->getFormat()), tempbuffer, totalread, Decoder->getFrequency());
|
||||
checkError();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
ALenum cAudioSource::convertAudioFormatEnum(AudioFormats format)
|
||||
{
|
||||
switch(format)
|
||||
{
|
||||
case EAF_8BIT_MONO:
|
||||
return AL_FORMAT_MONO8;
|
||||
case EAF_16BIT_MONO:
|
||||
return AL_FORMAT_MONO16;
|
||||
case EAF_8BIT_STEREO:
|
||||
return AL_FORMAT_STEREO8;
|
||||
case EAF_16BIT_STEREO:
|
||||
return AL_FORMAT_STEREO16;
|
||||
default:
|
||||
return AL_FORMAT_MONO8;
|
||||
};
|
||||
}
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
void cAudioSource::updateFilter(bool remove)
|
||||
{
|
||||
if(!remove)
|
||||
{
|
||||
if(Filter && Filter->isValid())
|
||||
{
|
||||
if(LastFilterTimeStamp != Filter->getLastUpdated())
|
||||
{
|
||||
LastFilterTimeStamp = Filter->getLastUpdated();
|
||||
cFilter* theFilter = static_cast<cFilter*>(Filter);
|
||||
if(theFilter)
|
||||
{
|
||||
alSourcei(Source, AL_DIRECT_FILTER, theFilter->getOpenALFilter());
|
||||
checkError();
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
alSourcei(Source, AL_DIRECT_FILTER, AL_FILTER_NULL);
|
||||
checkError();
|
||||
}
|
||||
|
||||
void cAudioSource::updateEffect(unsigned int slot, bool remove)
|
||||
{
|
||||
if(slot < EffectSlotsAvailable)
|
||||
{
|
||||
if(!remove)
|
||||
{
|
||||
if(Effects[slot] && Effects[slot]->isValid())
|
||||
{
|
||||
if(LastEffectTimeStamp[slot] != Effects[slot]->getLastUpdated())
|
||||
{
|
||||
LastEffectTimeStamp[slot] = Effects[slot]->getLastUpdated();
|
||||
cEffect* theEffect = static_cast<cEffect*>(Effects[slot]);
|
||||
if(theEffect)
|
||||
{
|
||||
ALuint filterID = AL_FILTER_NULL;
|
||||
cFilter* theFilter = static_cast<cFilter*>(theEffect->getFilter());
|
||||
if(theFilter)
|
||||
{
|
||||
filterID = theFilter->getOpenALFilter();
|
||||
}
|
||||
alSource3i(Source, AL_AUXILIARY_SEND_FILTER, theEffect->getOpenALEffectSlot(), slot, filterID);
|
||||
checkError();
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
alSource3i(Source, AL_AUXILIARY_SEND_FILTER, AL_EFFECTSLOT_NULL, slot, AL_FILTER_NULL);
|
||||
checkError();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void cAudioSource::registerEventHandler(ISourceEventHandler* handler)
|
||||
{
|
||||
if(handler)
|
||||
{
|
||||
cAudioMutexbasicLock lock(Mutex);
|
||||
eventHandlerList.push_back(handler);
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioSource::unRegisterEventHandler(ISourceEventHandler* handler)
|
||||
{
|
||||
if(handler)
|
||||
{
|
||||
cAudioMutexLock lock(Mutex);
|
||||
eventHandlerList.remove(handler);
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioSource::unRegisterAllEventHandlers()
|
||||
{
|
||||
cAudioMutexLock lock(Mutex);
|
||||
eventHandlerList.clear();
|
||||
}
|
||||
|
||||
void cAudioSource::signalEvent(Events sevent)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioList<ISourceEventHandler*>::Type::iterator it = eventHandlerList.begin();
|
||||
|
||||
if(it != eventHandlerList.end()){
|
||||
|
||||
switch(sevent){
|
||||
|
||||
case ON_UPDATE:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onUpdate();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_RELEASE:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onRelease();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_PLAY:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onPlay();
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case ON_PAUSE:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onPause();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ON_STOP:
|
||||
|
||||
for(it; it != eventHandlerList.end(); it++){
|
||||
(*it)->onStop();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cConsoleLogReceiver.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
#include <iostream>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
bool cConsoleLogReceiver::OnLogMessage(const char* sender, const char* message, LogLevel level, float time)
|
||||
{
|
||||
//std::cout << time << " " << sender << ": [" << LogLevelStrings[level] << "] " << message << std::endl;
|
||||
std::cout << "[" << LogLevelStrings[level] << "] " << message << std::endl;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,705 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cEffect.h"
|
||||
#include "../Headers/cLogger.h"
|
||||
#include "../Headers/cUtils.h"
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
cEffect::cEffect(cEFXFunctions* oALFunctions) : EFX(oALFunctions), Type(EET_NULL),
|
||||
Volume(1.0f), IgnoreAttenuation(false), LastUpdated(0), Valid(false), Filter(NULL),
|
||||
Effect(0), EffectSlot(0)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(EFX)
|
||||
{
|
||||
if(EFX->Supported)
|
||||
{
|
||||
cAudioMutexBasicLock lock(EFX->Mutex);
|
||||
|
||||
//Create Effect Slot
|
||||
EFX->alGenAuxiliaryEffectSlots(1, &EffectSlot);
|
||||
bool error = CheckError();
|
||||
if(error)
|
||||
{
|
||||
EffectSlot = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
//Create the effect object
|
||||
EFX->alGenEffects(1, &Effect);
|
||||
error = CheckError();
|
||||
if(error)
|
||||
{
|
||||
EFX->alDeleteAuxiliaryEffectSlots(1, &EffectSlot);
|
||||
EffectSlot = 0;
|
||||
Effect = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
//Bind the effect to the effect slot
|
||||
EFX->alAuxiliaryEffectSloti(EffectSlot, AL_EFFECTSLOT_EFFECT, Effect);
|
||||
error = CheckError();
|
||||
if(error)
|
||||
{
|
||||
EFX->alDeleteEffects(1, &Effect);
|
||||
EFX->alDeleteAuxiliaryEffectSlots(1, &EffectSlot);
|
||||
EffectSlot = 0;
|
||||
Effect = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
//Everything worked, effect is ready to use
|
||||
Valid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cEffect::~cEffect()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(EFX && EFX->Supported)
|
||||
{
|
||||
cAudioMutexBasicLock lock(EFX->Mutex);
|
||||
EFX->alAuxiliaryEffectSloti(EffectSlot, AL_EFFECTSLOT_EFFECT, AL_EFFECT_NULL);
|
||||
|
||||
if(Effect)
|
||||
{
|
||||
EFX->alDeleteEffects(1, &Effect);
|
||||
}
|
||||
|
||||
if(EffectSlot)
|
||||
{
|
||||
EFX->alDeleteAuxiliaryEffectSlots(1, &EffectSlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const EffectTypes& cEffect::getType() const
|
||||
{
|
||||
return Type;
|
||||
}
|
||||
|
||||
void cEffect::setType(const EffectTypes& type)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Type = type;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sEAXReverbParameters& cEffect::getEAXReverbParameters() const
|
||||
{
|
||||
return EAXReverbParam;
|
||||
}
|
||||
|
||||
void cEffect::setEAXReverbParameters(const sEAXReverbParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
EAXReverbParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sReverbParameters& cEffect::getReverbParameters() const
|
||||
{
|
||||
return ReverbParam;
|
||||
}
|
||||
|
||||
void cEffect::setReverbParameters(const sReverbParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
ReverbParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sChorusParameters& cEffect::getChorusParameters() const
|
||||
{
|
||||
return ChorusParam;
|
||||
}
|
||||
|
||||
void cEffect::setChorusParameters(const sChorusParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
ChorusParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sDistortionParameters& cEffect::getDistortionParameters() const
|
||||
{
|
||||
return DistortionParam;
|
||||
}
|
||||
|
||||
void cEffect::setDistortionParameters(const sDistortionParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
DistortionParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sEchoParameters& cEffect::getEchoParameters() const
|
||||
{
|
||||
return EchoParam;
|
||||
}
|
||||
|
||||
void cEffect::setEchoParameters(const sEchoParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
EchoParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sFlangerParameters& cEffect::getFlangerParameters() const
|
||||
{
|
||||
return FlangerParam;
|
||||
}
|
||||
|
||||
void cEffect::setFlangerParameters(const sFlangerParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
FlangerParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sFrequencyShiftParameters& cEffect::getFrequencyShiftParameters() const
|
||||
{
|
||||
return FrequencyShiftParam;
|
||||
}
|
||||
|
||||
void cEffect::setFrequencyShiftParameters(const sFrequencyShiftParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
FrequencyShiftParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sVocalMorpherParameters& cEffect::getVocalMorpherParameters() const
|
||||
{
|
||||
return VocalMorpherParam;
|
||||
}
|
||||
|
||||
void cEffect::setVocalMorpherParameters(const sVocalMorpherParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
VocalMorpherParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sPitchShifterParameters& cEffect::getPitchShifterParameters() const
|
||||
{
|
||||
return PitchShifterParam;
|
||||
}
|
||||
|
||||
void cEffect::setPitchShifterParameters(const sPitchShifterParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
PitchShifterParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sRingModulatorParameters& cEffect::getRingModulatorParameters() const
|
||||
{
|
||||
return RingModulatorParam;
|
||||
}
|
||||
|
||||
void cEffect::setRingModulatorParameters(const sRingModulatorParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
RingModulatorParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sAutowahParameters& cEffect::getAutowahParameters() const
|
||||
{
|
||||
return AutowahParam;
|
||||
}
|
||||
|
||||
void cEffect::setAutowahParameters(const sAutowahParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
AutowahParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sCompressorParameters& cEffect::getCompressorParameters() const
|
||||
{
|
||||
return CompressorParam;
|
||||
}
|
||||
|
||||
void cEffect::setCompressorParameters(const sCompressorParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
CompressorParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
const sEqualizerParameters& cEffect::getEqualizerParameters() const
|
||||
{
|
||||
return EqualizerParam;
|
||||
}
|
||||
|
||||
void cEffect::setEqualizerParameters(const sEqualizerParameters& param)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
EqualizerParam = param;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
float cEffect::getMasterVolume() const
|
||||
{
|
||||
return Volume;
|
||||
}
|
||||
|
||||
void cEffect::setMasterVolume(const float& volume)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Volume = volume;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
bool cEffect::isIgnoringAttenuation() const
|
||||
{
|
||||
return IgnoreAttenuation;
|
||||
}
|
||||
|
||||
void cEffect::ignoreAttenuation(const bool& ignore)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
IgnoreAttenuation = ignore;
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
IFilter* cEffect::getFilter() const
|
||||
{
|
||||
return Filter;
|
||||
}
|
||||
|
||||
void cEffect::attachFilter(IFilter* filter)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Filter = filter;
|
||||
|
||||
if(Filter)
|
||||
Filter->grab();
|
||||
UpdateEffect();
|
||||
}
|
||||
|
||||
void cEffect::removeFilter()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(Filter)
|
||||
Filter->drop();
|
||||
Filter = NULL;
|
||||
}
|
||||
|
||||
unsigned int cEffect::getLastUpdated() const
|
||||
{
|
||||
return LastUpdated;
|
||||
}
|
||||
|
||||
bool cEffect::isValid() const
|
||||
{
|
||||
return Valid;
|
||||
}
|
||||
|
||||
ALuint cEffect::getOpenALEffect() const
|
||||
{
|
||||
return Effect;
|
||||
}
|
||||
|
||||
ALuint cEffect::getOpenALEffectSlot() const
|
||||
{
|
||||
return EffectSlot;
|
||||
}
|
||||
|
||||
bool cEffect::UpdateEffect()
|
||||
{
|
||||
++LastUpdated;
|
||||
|
||||
ALenum alEffectType = ConvertEffectEnum(Type);
|
||||
|
||||
if(EFX && EFX->Supported && EffectSlot && Effect)
|
||||
{
|
||||
cAudioMutexBasicLock lock(EFX->Mutex);
|
||||
EFX->alEffecti(Effect, AL_EFFECT_TYPE, alEffectType);
|
||||
Valid = !CheckError();
|
||||
if(!Valid)
|
||||
return false;
|
||||
|
||||
EFX->alAuxiliaryEffectSlotf(EffectSlot, AL_EFFECTSLOT_GAIN, Volume);
|
||||
Valid = !CheckError();
|
||||
if(!Valid)
|
||||
return false;
|
||||
|
||||
EFX->alAuxiliaryEffectSloti(EffectSlot, AL_EFFECTSLOT_AUXILIARY_SEND_AUTO, IgnoreAttenuation ? AL_TRUE : AL_FALSE);
|
||||
Valid = !CheckError();
|
||||
if(!Valid)
|
||||
return false;
|
||||
|
||||
if(Type == EET_EAX_REVERB)
|
||||
{
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_DENSITY, EAXReverbParam.Density);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_DIFFUSION, EAXReverbParam.Diffusion);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_GAIN, EAXReverbParam.Gain);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_GAINHF, EAXReverbParam.GainHF);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_GAINLF, EAXReverbParam.GainLF);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_DECAY_TIME, EAXReverbParam.DecayTime);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_DECAY_HFRATIO, EAXReverbParam.DecayHFRatio);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_DECAY_LFRATIO, EAXReverbParam.DecayLFRatio);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_REFLECTIONS_GAIN, EAXReverbParam.ReflectionsGain);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_REFLECTIONS_DELAY, EAXReverbParam.ReflectionsDelay);
|
||||
EFX->alEffectfv(Effect, AL_EAXREVERB_REFLECTIONS_PAN, &EAXReverbParam.ReflectionsPan.x);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_LATE_REVERB_GAIN, EAXReverbParam.LateReverbGain);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_LATE_REVERB_DELAY, EAXReverbParam.LateReverbDelay);
|
||||
EFX->alEffectfv(Effect, AL_EAXREVERB_LATE_REVERB_PAN, &EAXReverbParam.LateReverbPan.x);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_ECHO_TIME, EAXReverbParam.EchoTime);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_ECHO_DEPTH, EAXReverbParam.EchoDepth);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_MODULATION_TIME, EAXReverbParam.ModulationTime);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_MODULATION_DEPTH, EAXReverbParam.ModulationDepth);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_HFREFERENCE, EAXReverbParam.HFReference);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_LFREFERENCE, EAXReverbParam.LFReference);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, EAXReverbParam.RoomRolloffFactor);
|
||||
EFX->alEffectf(Effect, AL_EAXREVERB_AIR_ABSORPTION_GAINHF, EAXReverbParam.AirAbsorptionGainHF);
|
||||
EFX->alEffecti(Effect, AL_EAXREVERB_DECAY_HFLIMIT, EAXReverbParam.DecayHFLimit ? AL_TRUE : AL_FALSE);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_REVERB)
|
||||
{
|
||||
EFX->alEffectf(Effect, AL_REVERB_DENSITY, ReverbParam.Density);
|
||||
EFX->alEffectf(Effect, AL_REVERB_DIFFUSION, ReverbParam.Diffusion);
|
||||
EFX->alEffectf(Effect, AL_REVERB_GAIN, ReverbParam.Gain);
|
||||
EFX->alEffectf(Effect, AL_REVERB_GAINHF, ReverbParam.GainHF);
|
||||
EFX->alEffectf(Effect, AL_REVERB_DECAY_TIME, ReverbParam.DecayTime);
|
||||
EFX->alEffectf(Effect, AL_REVERB_DECAY_HFRATIO, ReverbParam.DecayHFRatio);
|
||||
EFX->alEffectf(Effect, AL_REVERB_REFLECTIONS_GAIN, ReverbParam.ReflectionsGain);
|
||||
EFX->alEffectf(Effect, AL_REVERB_REFLECTIONS_DELAY, ReverbParam.ReflectionsDelay);
|
||||
EFX->alEffectf(Effect, AL_REVERB_LATE_REVERB_GAIN, ReverbParam.LateReverbGain);
|
||||
EFX->alEffectf(Effect, AL_REVERB_LATE_REVERB_DELAY, ReverbParam.LateReverbDelay);
|
||||
EFX->alEffectf(Effect, AL_REVERB_ROOM_ROLLOFF_FACTOR, ReverbParam.RoomRolloffFactor);
|
||||
EFX->alEffectf(Effect, AL_REVERB_AIR_ABSORPTION_GAINHF, ReverbParam.AirAbsorptionGainHF);
|
||||
EFX->alEffecti(Effect, AL_REVERB_DECAY_HFLIMIT, ReverbParam.DecayHFLimit ? AL_TRUE : AL_FALSE);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_CHORUS)
|
||||
{
|
||||
ALenum waveform = AL_CHORUS_DEFAULT_WAVEFORM;
|
||||
switch(ChorusParam.Waveform)
|
||||
{
|
||||
case sChorusParameters::ECW_SINUSOID:
|
||||
waveform = AL_CHORUS_WAVEFORM_SINUSOID;
|
||||
break;
|
||||
case sChorusParameters::ECW_TRIANGLE:
|
||||
waveform = AL_CHORUS_WAVEFORM_TRIANGLE;
|
||||
break;
|
||||
default:
|
||||
waveform = AL_CHORUS_DEFAULT_WAVEFORM;
|
||||
break;
|
||||
};
|
||||
EFX->alEffecti(Effect, AL_CHORUS_WAVEFORM, waveform);
|
||||
EFX->alEffecti(Effect, AL_CHORUS_PHASE, ChorusParam.Phase);
|
||||
EFX->alEffectf(Effect, AL_CHORUS_RATE, ChorusParam.Rate);
|
||||
EFX->alEffectf(Effect, AL_CHORUS_DEPTH, ChorusParam.Depth);
|
||||
EFX->alEffectf(Effect, AL_CHORUS_FEEDBACK, ChorusParam.Feedback);
|
||||
EFX->alEffectf(Effect, AL_CHORUS_DELAY, ChorusParam.Delay);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_DISTORTION)
|
||||
{
|
||||
EFX->alEffectf(Effect, AL_DISTORTION_EDGE, DistortionParam.Edge);
|
||||
EFX->alEffectf(Effect, AL_DISTORTION_GAIN, DistortionParam.Gain);
|
||||
EFX->alEffectf(Effect, AL_DISTORTION_LOWPASS_CUTOFF, DistortionParam.LowpassCutoff);
|
||||
EFX->alEffectf(Effect, AL_DISTORTION_EQCENTER, DistortionParam.EqCenter);
|
||||
EFX->alEffectf(Effect, AL_DISTORTION_EQBANDWIDTH, DistortionParam.EqBandwidth);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_ECHO)
|
||||
{
|
||||
EFX->alEffectf(Effect, AL_ECHO_DELAY, EchoParam.Delay);
|
||||
EFX->alEffectf(Effect, AL_ECHO_LRDELAY, EchoParam.LRDelay);
|
||||
EFX->alEffectf(Effect, AL_ECHO_DAMPING, EchoParam.Damping);
|
||||
EFX->alEffectf(Effect, AL_ECHO_FEEDBACK, EchoParam.Feedback);
|
||||
EFX->alEffectf(Effect, AL_ECHO_SPREAD, EchoParam.Spread);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_FLANGER)
|
||||
{
|
||||
ALenum waveform = AL_FLANGER_DEFAULT_WAVEFORM;
|
||||
switch(FlangerParam.Waveform)
|
||||
{
|
||||
case sFlangerParameters::EFW_SINUSOID:
|
||||
waveform = AL_FLANGER_WAVEFORM_SINUSOID;
|
||||
break;
|
||||
case sFlangerParameters::EFW_TRIANGLE:
|
||||
waveform = AL_FLANGER_WAVEFORM_SINUSOID;
|
||||
break;
|
||||
default:
|
||||
waveform = AL_FLANGER_DEFAULT_WAVEFORM;
|
||||
break;
|
||||
};
|
||||
EFX->alEffecti(Effect, AL_FLANGER_WAVEFORM, waveform);
|
||||
EFX->alEffecti(Effect, AL_FLANGER_PHASE, FlangerParam.Phase);
|
||||
EFX->alEffectf(Effect, AL_FLANGER_RATE, FlangerParam.Rate);
|
||||
EFX->alEffectf(Effect, AL_FLANGER_DEPTH, FlangerParam.Depth);
|
||||
EFX->alEffectf(Effect, AL_FLANGER_FEEDBACK, FlangerParam.Feedback);
|
||||
EFX->alEffectf(Effect, AL_FLANGER_DELAY, FlangerParam.Delay);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_FREQUENCY_SHIFTER)
|
||||
{
|
||||
ALenum shiftleft = ConvertFrequencyShiftEnum(FrequencyShiftParam.Left);
|
||||
ALenum shiftright = ConvertFrequencyShiftEnum(FrequencyShiftParam.Right);
|
||||
EFX->alEffectf(Effect, AL_FREQUENCY_SHIFTER_FREQUENCY, FrequencyShiftParam.Frequency);
|
||||
EFX->alEffecti(Effect, AL_FREQUENCY_SHIFTER_LEFT_DIRECTION, shiftleft);
|
||||
EFX->alEffecti(Effect, AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION, shiftright);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_VOCAL_MORPHER)
|
||||
{
|
||||
ALenum pA = ConvertVocalMorphPhonemeEnum(VocalMorpherParam.PhonemeA);
|
||||
ALenum pB = ConvertVocalMorphPhonemeEnum(VocalMorpherParam.PhonemeB);
|
||||
|
||||
ALenum waveform = AL_VOCAL_MORPHER_DEFAULT_WAVEFORM;
|
||||
switch(VocalMorpherParam.Waveform)
|
||||
{
|
||||
case sVocalMorpherParameters::EMW_SINUSOID:
|
||||
waveform = AL_VOCAL_MORPHER_WAVEFORM_SINUSOID;
|
||||
break;
|
||||
case sVocalMorpherParameters::EMW_TRIANGLE:
|
||||
waveform = AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE;
|
||||
break;
|
||||
case sVocalMorpherParameters::EMW_SAW:
|
||||
waveform = AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH;
|
||||
break;
|
||||
default:
|
||||
waveform = AL_VOCAL_MORPHER_DEFAULT_WAVEFORM;
|
||||
break;
|
||||
};
|
||||
|
||||
EFX->alEffecti(Effect, AL_VOCAL_MORPHER_PHONEMEA, pA);
|
||||
EFX->alEffecti(Effect, AL_VOCAL_MORPHER_PHONEMEB, pB);
|
||||
EFX->alEffecti(Effect, AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING, VocalMorpherParam.PhonemeACoarseTune);
|
||||
EFX->alEffecti(Effect, AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING, VocalMorpherParam.PhonemeBCoarseTune);
|
||||
EFX->alEffecti(Effect, AL_VOCAL_MORPHER_WAVEFORM, waveform);
|
||||
EFX->alEffectf(Effect, AL_VOCAL_MORPHER_RATE, VocalMorpherParam.Rate);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_PITCH_SHIFTER)
|
||||
{
|
||||
EFX->alEffecti(Effect, AL_PITCH_SHIFTER_COARSE_TUNE, PitchShifterParam.CoarseTune);
|
||||
EFX->alEffecti(Effect, AL_PITCH_SHIFTER_FINE_TUNE, PitchShifterParam.FineTune);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_RING_MODULATOR)
|
||||
{
|
||||
ALenum waveform = AL_RING_MODULATOR_DEFAULT_WAVEFORM;
|
||||
switch(RingModulatorParam.Waveform)
|
||||
{
|
||||
case sRingModulatorParameters::EMW_SINUSOID:
|
||||
waveform = AL_RING_MODULATOR_SINUSOID;
|
||||
break;
|
||||
case sRingModulatorParameters::EMW_SAW:
|
||||
waveform = AL_RING_MODULATOR_SAWTOOTH;
|
||||
break;
|
||||
case sRingModulatorParameters::EMW_SQUARE:
|
||||
waveform = AL_RING_MODULATOR_SQUARE;
|
||||
break;
|
||||
default:
|
||||
waveform = AL_RING_MODULATOR_DEFAULT_WAVEFORM;
|
||||
break;
|
||||
};
|
||||
|
||||
EFX->alEffectf(Effect, AL_RING_MODULATOR_FREQUENCY, RingModulatorParam.Frequency);
|
||||
EFX->alEffectf(Effect, AL_RING_MODULATOR_HIGHPASS_CUTOFF, RingModulatorParam.HighPassCutoff);
|
||||
EFX->alEffecti(Effect, AL_RING_MODULATOR_WAVEFORM, waveform);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_AUTOWAH)
|
||||
{
|
||||
EFX->alEffectf(Effect, AL_AUTOWAH_ATTACK_TIME, AutowahParam.AttackTime);
|
||||
EFX->alEffectf(Effect, AL_AUTOWAH_RELEASE_TIME, AutowahParam.ReleaseTime);
|
||||
EFX->alEffectf(Effect, AL_AUTOWAH_RESONANCE, AutowahParam.Resonance);
|
||||
EFX->alEffectf(Effect, AL_AUTOWAH_PEAK_GAIN, AutowahParam.PeakGain);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_COMPRESSOR)
|
||||
{
|
||||
EFX->alEffecti(Effect, AL_COMPRESSOR_ONOFF, CompressorParam.Active ? AL_TRUE : AL_FALSE);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EET_EQUALIZER)
|
||||
{
|
||||
EFX->alEffectf(Effect, AL_EQUALIZER_LOW_GAIN, EqualizerParam.LowGain);
|
||||
EFX->alEffectf(Effect, AL_EQUALIZER_LOW_CUTOFF, EqualizerParam.LowCutoff);
|
||||
EFX->alEffectf(Effect, AL_EQUALIZER_MID1_GAIN, EqualizerParam.Mid1Gain);
|
||||
EFX->alEffectf(Effect, AL_EQUALIZER_MID1_CENTER, EqualizerParam.Mid1Center);
|
||||
EFX->alEffectf(Effect, AL_EQUALIZER_MID1_WIDTH, EqualizerParam.Mid1Width);
|
||||
EFX->alEffectf(Effect, AL_EQUALIZER_MID2_GAIN, EqualizerParam.Mid2Gain);
|
||||
EFX->alEffectf(Effect, AL_EQUALIZER_MID2_CENTER, EqualizerParam.Mid2Center);
|
||||
EFX->alEffectf(Effect, AL_EQUALIZER_MID2_WIDTH, EqualizerParam.Mid2Width);
|
||||
EFX->alEffectf(Effect, AL_EQUALIZER_HIGH_GAIN, EqualizerParam.HighGain);
|
||||
EFX->alEffectf(Effect, AL_EQUALIZER_HIGH_CUTOFF, EqualizerParam.HighCutoff);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cEffect::CheckError()
|
||||
{
|
||||
int error = alGetError();
|
||||
const char* errorString;
|
||||
|
||||
if (error != AL_NO_ERROR)
|
||||
{
|
||||
errorString = alGetString(error);
|
||||
if(error == AL_OUT_OF_MEMORY)
|
||||
getLogger()->logCritical("Audio Effect", "OpenAL Error: %s.", errorString);
|
||||
else
|
||||
getLogger()->logError("Audio Effect", "OpenAL Error: %s.", errorString);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
ALenum cEffect::ConvertEffectEnum(EffectTypes type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case EET_NULL:
|
||||
return AL_EFFECT_NULL;
|
||||
case EET_EAX_REVERB:
|
||||
return AL_EFFECT_EAXREVERB;
|
||||
case EET_REVERB:
|
||||
return AL_EFFECT_REVERB;
|
||||
case EET_CHORUS:
|
||||
return AL_EFFECT_CHORUS;
|
||||
case EET_DISTORTION:
|
||||
return AL_EFFECT_DISTORTION;
|
||||
case EET_ECHO:
|
||||
return AL_EFFECT_ECHO;
|
||||
case EET_FLANGER:
|
||||
return AL_EFFECT_FLANGER;
|
||||
case EET_FREQUENCY_SHIFTER:
|
||||
return AL_EFFECT_FREQUENCY_SHIFTER;
|
||||
case EET_VOCAL_MORPHER:
|
||||
return AL_EFFECT_VOCAL_MORPHER;
|
||||
case EET_PITCH_SHIFTER:
|
||||
return AL_EFFECT_PITCH_SHIFTER;
|
||||
case EET_RING_MODULATOR:
|
||||
return AL_EFFECT_RING_MODULATOR;
|
||||
case EET_AUTOWAH:
|
||||
return AL_EFFECT_AUTOWAH;
|
||||
case EET_COMPRESSOR:
|
||||
return AL_EFFECT_COMPRESSOR;
|
||||
case EET_EQUALIZER:
|
||||
return AL_EFFECT_EQUALIZER;
|
||||
default:
|
||||
return AL_EFFECT_NULL;
|
||||
};
|
||||
}
|
||||
|
||||
ALenum cEffect::ConvertFrequencyShiftEnum(sFrequencyShiftParameters::ShiftDirection shift)
|
||||
{
|
||||
switch(shift)
|
||||
{
|
||||
case sFrequencyShiftParameters::ESD_DOWN:
|
||||
return AL_FREQUENCY_SHIFTER_DIRECTION_DOWN;
|
||||
case sFrequencyShiftParameters::ESD_UP:
|
||||
return AL_FREQUENCY_SHIFTER_DIRECTION_UP;
|
||||
case sFrequencyShiftParameters::ESD_OFF:
|
||||
return AL_FREQUENCY_SHIFTER_DIRECTION_OFF;
|
||||
default:
|
||||
return AL_FREQUENCY_SHIFTER_DIRECTION_DOWN;
|
||||
};
|
||||
}
|
||||
|
||||
ALenum cEffect::ConvertVocalMorphPhonemeEnum(sVocalMorpherParameters::MorpherPhoneme phoneme)
|
||||
{
|
||||
switch(phoneme)
|
||||
{
|
||||
case sVocalMorpherParameters::EMP_A:
|
||||
return AL_VOCAL_MORPHER_PHONEME_A;
|
||||
case sVocalMorpherParameters::EMP_E:
|
||||
return AL_VOCAL_MORPHER_PHONEME_E;
|
||||
case sVocalMorpherParameters::EMP_I:
|
||||
return AL_VOCAL_MORPHER_PHONEME_I;
|
||||
case sVocalMorpherParameters::EMP_O:
|
||||
return AL_VOCAL_MORPHER_PHONEME_O;
|
||||
case sVocalMorpherParameters::EMP_U:
|
||||
return AL_VOCAL_MORPHER_PHONEME_U;
|
||||
case sVocalMorpherParameters::EMP_AA:
|
||||
return AL_VOCAL_MORPHER_PHONEME_AA;
|
||||
case sVocalMorpherParameters::EMP_AE:
|
||||
return AL_VOCAL_MORPHER_PHONEME_AE;
|
||||
case sVocalMorpherParameters::EMP_AH:
|
||||
return AL_VOCAL_MORPHER_PHONEME_AH;
|
||||
case sVocalMorpherParameters::EMP_AO:
|
||||
return AL_VOCAL_MORPHER_PHONEME_AO;
|
||||
case sVocalMorpherParameters::EMP_EH:
|
||||
return AL_VOCAL_MORPHER_PHONEME_EH;
|
||||
case sVocalMorpherParameters::EMP_ER:
|
||||
return AL_VOCAL_MORPHER_PHONEME_ER;
|
||||
case sVocalMorpherParameters::EMP_IH:
|
||||
return AL_VOCAL_MORPHER_PHONEME_IH;
|
||||
case sVocalMorpherParameters::EMP_IY:
|
||||
return AL_VOCAL_MORPHER_PHONEME_IY;
|
||||
case sVocalMorpherParameters::EMP_UH:
|
||||
return AL_VOCAL_MORPHER_PHONEME_UH;
|
||||
case sVocalMorpherParameters::EMP_UW:
|
||||
return AL_VOCAL_MORPHER_PHONEME_UW;
|
||||
case sVocalMorpherParameters::EMP_B:
|
||||
return AL_VOCAL_MORPHER_PHONEME_B;
|
||||
case sVocalMorpherParameters::EMP_D:
|
||||
return AL_VOCAL_MORPHER_PHONEME_D;
|
||||
case sVocalMorpherParameters::EMP_F:
|
||||
return AL_VOCAL_MORPHER_PHONEME_F;
|
||||
case sVocalMorpherParameters::EMP_G:
|
||||
return AL_VOCAL_MORPHER_PHONEME_G;
|
||||
case sVocalMorpherParameters::EMP_J:
|
||||
return AL_VOCAL_MORPHER_PHONEME_J;
|
||||
case sVocalMorpherParameters::EMP_K:
|
||||
return AL_VOCAL_MORPHER_PHONEME_K;
|
||||
case sVocalMorpherParameters::EMP_L:
|
||||
return AL_VOCAL_MORPHER_PHONEME_L;
|
||||
case sVocalMorpherParameters::EMP_M:
|
||||
return AL_VOCAL_MORPHER_PHONEME_M;
|
||||
case sVocalMorpherParameters::EMP_N:
|
||||
return AL_VOCAL_MORPHER_PHONEME_N;
|
||||
case sVocalMorpherParameters::EMP_P:
|
||||
return AL_VOCAL_MORPHER_PHONEME_P;
|
||||
case sVocalMorpherParameters::EMP_R:
|
||||
return AL_VOCAL_MORPHER_PHONEME_R;
|
||||
case sVocalMorpherParameters::EMP_S:
|
||||
return AL_VOCAL_MORPHER_PHONEME_S;
|
||||
case sVocalMorpherParameters::EMP_T:
|
||||
return AL_VOCAL_MORPHER_PHONEME_T;
|
||||
case sVocalMorpherParameters::EMP_V:
|
||||
return AL_VOCAL_MORPHER_PHONEME_V;
|
||||
case sVocalMorpherParameters::EMP_Z:
|
||||
return AL_VOCAL_MORPHER_PHONEME_Z;
|
||||
default:
|
||||
return AL_VOCAL_MORPHER_DEFAULT_PHONEMEA;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,170 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cFileLogReceiver.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
cFileLogReceiver::cFileLogReceiver()
|
||||
{
|
||||
firsttime = false;
|
||||
}
|
||||
|
||||
cFileLogReceiver::~cFileLogReceiver()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool cFileLogReceiver::OnLogMessage(const char* sender, const char* message, LogLevel level, float time)
|
||||
{
|
||||
std::ofstream outf;
|
||||
|
||||
if(firsttime == false)
|
||||
{
|
||||
if( !outf.is_open() )
|
||||
{
|
||||
// Reset log file
|
||||
outf.setf( std::ios::fixed );
|
||||
outf.precision( 3 );
|
||||
outf.open( "cAudioEngineLog.html", std::ios::out );
|
||||
|
||||
if( !outf ){
|
||||
return false;
|
||||
}
|
||||
|
||||
outf<<"<html>\n";
|
||||
outf<<"<head>\n";
|
||||
outf<<"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
|
||||
outf<<"<title>cAudio Log</title>\n";
|
||||
outf<<"<style type=\"text/css\">\n";
|
||||
|
||||
outf<<"body, html {\n";
|
||||
outf<<"background: #000000;\n";
|
||||
outf<<"width: 1000px;\n";
|
||||
outf<<"font-family: Arial;\n";
|
||||
outf<<"font-size: 16px;\n";
|
||||
outf<<"color: #C0C0C0;\n";
|
||||
outf<<"}\n";
|
||||
|
||||
outf<<"h1 {\n";
|
||||
outf<<"color : #FFFFFF;\n";
|
||||
outf<<"border-bottom : 1px dotted #888888;\n";
|
||||
outf<<"}\n";
|
||||
|
||||
outf<<"pre {\n";
|
||||
outf<<"font-family : arial;\n";
|
||||
outf<<"margin : 0;\n";
|
||||
outf<<"}\n";
|
||||
|
||||
outf<<".box {\n";
|
||||
outf<<"border : 1px dotted #818286;\n";
|
||||
outf<<"padding : 5px;\n";
|
||||
outf<<"margin: 5px;\n";
|
||||
outf<<"width: 950px;\n";
|
||||
outf<<"background-color : #292929;\n";
|
||||
outf<<"}\n";
|
||||
|
||||
outf<<".err {\n";
|
||||
outf<<"color: #EE1100;\n";
|
||||
outf<<"font-weight: bold\n";
|
||||
outf<<"}\n";
|
||||
|
||||
outf<<".warn {\n";
|
||||
outf<<"color: #FFCC00;\n";
|
||||
outf<<"font-weight: bold\n";
|
||||
outf<<"}\n";
|
||||
|
||||
outf<<".crit {\n";
|
||||
outf<<"color: #BB0077;\n";
|
||||
outf<<"font-weight: bold\n";
|
||||
outf<<"}\n";
|
||||
|
||||
outf<<".info {\n";
|
||||
outf<<"color: #C0C0C0;\n";
|
||||
outf<<"}\n";
|
||||
|
||||
outf<<".debug {\n";
|
||||
outf<<"color: #CCA0A0;\n";
|
||||
outf<<"}\n";
|
||||
|
||||
outf<<"</style>\n";
|
||||
outf<<"</head>\n\n";
|
||||
|
||||
outf<<"<body>\n";
|
||||
outf<<"<h1>cAudio Log</h1>\n";
|
||||
outf<<"<h3>" << "2.0.0" << "</h3>\n";
|
||||
outf<<"<div class=\"box\">\n";
|
||||
outf<<"<table>\n";
|
||||
|
||||
outf.flush();
|
||||
|
||||
}
|
||||
firsttime = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
outf.open( "cAudioEngineLog.html", std::ios::out | std::ios::app );
|
||||
|
||||
if( !outf ){
|
||||
return false;
|
||||
}
|
||||
|
||||
outf<<"<tr>\n";
|
||||
outf<<"<td width=\"100\">";
|
||||
outf<<time;
|
||||
outf <<"</td>\n";
|
||||
outf<<"<td class=\"";
|
||||
|
||||
switch( level )
|
||||
{
|
||||
case ELL_DEBUG:
|
||||
outf<<"debug";
|
||||
break;
|
||||
|
||||
case ELL_INFO:
|
||||
outf<<"info";
|
||||
break;
|
||||
|
||||
case ELL_WARNING:
|
||||
outf<<"warn";
|
||||
break;
|
||||
|
||||
case ELL_ERROR:
|
||||
outf<<"err";
|
||||
break;
|
||||
|
||||
case ELL_CRITICAL:
|
||||
outf<<"crit";
|
||||
break;
|
||||
|
||||
case ELL_COUNT:
|
||||
outf<<"debug";
|
||||
break;
|
||||
|
||||
default:
|
||||
outf<<"debug";
|
||||
}
|
||||
|
||||
outf<<"\"><pre>\n";
|
||||
outf<<message;
|
||||
outf<<"\n</pre></td>\n";
|
||||
outf<<"</tr>\n";
|
||||
|
||||
outf.flush();
|
||||
|
||||
}
|
||||
outf.close();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cFileSource.h"
|
||||
#include "../Headers/cUtils.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
cFileSource::cFileSource(const char* filename) : pFile(NULL), Valid(false), Filesize(0)
|
||||
{
|
||||
cAudioString safeFilename = safeCStr(filename);
|
||||
if(safeFilename.length() != 0)
|
||||
{
|
||||
pFile = fopen(safeFilename.c_str(),"rb");
|
||||
if(pFile)
|
||||
Valid = true;
|
||||
}
|
||||
|
||||
if(Valid)
|
||||
{
|
||||
fseek(pFile, 0, SEEK_END);
|
||||
Filesize = ftell(pFile);
|
||||
fseek(pFile, 0, SEEK_SET);
|
||||
}
|
||||
}
|
||||
|
||||
cFileSource::~cFileSource()
|
||||
{
|
||||
if(pFile)
|
||||
fclose(pFile);
|
||||
}
|
||||
|
||||
bool cFileSource::isValid()
|
||||
{
|
||||
return Valid;
|
||||
}
|
||||
|
||||
int cFileSource::getCurrentPos()
|
||||
{
|
||||
return ftell(pFile);
|
||||
}
|
||||
|
||||
int cFileSource::getSize()
|
||||
{
|
||||
return Filesize;
|
||||
}
|
||||
|
||||
int cFileSource::read(void* output, int size)
|
||||
{
|
||||
return fread(output, sizeof(char), size, pFile);
|
||||
}
|
||||
|
||||
bool cFileSource::seek(int amount, bool relative)
|
||||
{
|
||||
if(relative == true)
|
||||
{
|
||||
int oldamount = ftell(pFile);
|
||||
fseek(pFile, amount, SEEK_CUR);
|
||||
|
||||
//check against the absolute position
|
||||
if(oldamount+amount != ftell(pFile))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
fseek(pFile, amount, SEEK_SET);
|
||||
if(amount != ftell(pFile))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,183 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cFilter.h"
|
||||
#include "../Headers/cLogger.h"
|
||||
#include "../Headers/cUtils.h"
|
||||
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
cFilter::cFilter(cEFXFunctions* oALFunctions) : EFX(oALFunctions), Type(EFT_NULL),
|
||||
Volume(1.0f), LowFreqVolume(1.0f), HighFreqVolume(1.0f), LastUpdated(0),
|
||||
Valid(false), Filter(0)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(EFX)
|
||||
Valid = EFX->Supported;
|
||||
|
||||
if(Valid)
|
||||
{
|
||||
cAudioMutexBasicLock lock(EFX->Mutex);
|
||||
EFX->alGenFilters(1, &Filter);
|
||||
Valid = !CheckError();
|
||||
if(!Valid)
|
||||
Filter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
cFilter::~cFilter()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(Filter && EFX && EFX->Supported)
|
||||
{
|
||||
cAudioMutexBasicLock lock(EFX->Mutex);
|
||||
EFX->alDeleteFilters(1, &Filter);
|
||||
}
|
||||
}
|
||||
|
||||
const FilterTypes& cFilter::getType() const
|
||||
{
|
||||
return Type;
|
||||
}
|
||||
|
||||
void cFilter::setType(const FilterTypes& type)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Type = type;
|
||||
UpdateFilter();
|
||||
}
|
||||
|
||||
float cFilter::getVolume() const
|
||||
{
|
||||
return Volume;
|
||||
}
|
||||
|
||||
void cFilter::setVolume(const float& volume)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Volume = volume;
|
||||
UpdateFilter();
|
||||
}
|
||||
|
||||
float cFilter::getLowFrequencyVolume() const
|
||||
{
|
||||
return LowFreqVolume;
|
||||
}
|
||||
|
||||
void cFilter::setLowFrequencyVolume(const float& volumeLF)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
LowFreqVolume = volumeLF;
|
||||
UpdateFilter();
|
||||
}
|
||||
|
||||
float cFilter::getHighFrequencyVolume() const
|
||||
{
|
||||
return HighFreqVolume;
|
||||
}
|
||||
|
||||
void cFilter::setHighFrequencyVolume(const float& volumeHF)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
HighFreqVolume = volumeHF;
|
||||
UpdateFilter();
|
||||
}
|
||||
|
||||
unsigned int cFilter::getLastUpdated() const
|
||||
{
|
||||
return LastUpdated;
|
||||
}
|
||||
|
||||
bool cFilter::isValid() const
|
||||
{
|
||||
return Valid;
|
||||
}
|
||||
|
||||
ALuint cFilter::getOpenALFilter() const
|
||||
{
|
||||
return Filter;
|
||||
}
|
||||
|
||||
bool cFilter::UpdateFilter()
|
||||
{
|
||||
++LastUpdated;
|
||||
|
||||
ALenum alFilterType = ConvertFilterEnum(Type);
|
||||
|
||||
if(Filter && EFX && EFX->Supported)
|
||||
{
|
||||
cAudioMutexBasicLock lock(EFX->Mutex);
|
||||
EFX->alFilteri(Filter, AL_FILTER_TYPE, alFilterType);
|
||||
Valid = !CheckError();
|
||||
if(!Valid)
|
||||
return false;
|
||||
|
||||
if(Type == EFT_LOWPASS)
|
||||
{
|
||||
EFX->alFilterf(Filter, AL_LOWPASS_GAIN, Volume);
|
||||
EFX->alFilterf(Filter, AL_LOWPASS_GAINHF, HighFreqVolume);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EFT_HIGHPASS)
|
||||
{
|
||||
EFX->alFilterf(Filter, AL_HIGHPASS_GAIN, Volume);
|
||||
EFX->alFilterf(Filter, AL_HIGHPASS_GAINLF, LowFreqVolume);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else if(Type == EFT_BANDPASS)
|
||||
{
|
||||
EFX->alFilterf(Filter, AL_BANDPASS_GAIN, Volume);
|
||||
EFX->alFilterf(Filter, AL_BANDPASS_GAINLF, LowFreqVolume);
|
||||
EFX->alFilterf(Filter, AL_BANDPASS_GAINHF, HighFreqVolume);
|
||||
Valid = !CheckError();
|
||||
return Valid;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cFilter::CheckError()
|
||||
{
|
||||
int error = alGetError();
|
||||
const char* errorString;
|
||||
|
||||
if (error != AL_NO_ERROR)
|
||||
{
|
||||
errorString = alGetString(error);
|
||||
if(error == AL_OUT_OF_MEMORY)
|
||||
getLogger()->logCritical("Audio Filter", "OpenAL Error: %s.", errorString);
|
||||
else
|
||||
getLogger()->logError("Audio Filter", "OpenAL Error: %s.", errorString);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
ALenum cFilter::ConvertFilterEnum(FilterTypes type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case EFT_NULL:
|
||||
return AL_FILTER_NULL;
|
||||
case EFT_LOWPASS:
|
||||
return AL_FILTER_LOWPASS;
|
||||
case EFT_HIGHPASS:
|
||||
return AL_FILTER_HIGHPASS;
|
||||
case EFT_BANDPASS:
|
||||
return AL_FILTER_BANDPASS;
|
||||
default:
|
||||
return AL_FILTER_NULL;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,66 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cListener.h"
|
||||
#include <AL/al.h>
|
||||
#include "../Headers/cEFXFunctions.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
void cListener::setPosition(const cVector3& pos)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Position = pos;
|
||||
alListener3f(AL_POSITION, Position.x, Position.y, Position.z);
|
||||
}
|
||||
void cListener::setDirection(const cVector3& dir)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Direction = dir;
|
||||
float orient[6] = {Direction[0], Direction[1], Direction[2], UpVector[0], UpVector[1], UpVector[2]};
|
||||
alListenerfv(AL_ORIENTATION, orient);
|
||||
}
|
||||
void cListener::setUpVector(const cVector3& up)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
UpVector = up;
|
||||
float orient[6] = {Direction[0], Direction[1], Direction[2], UpVector[0], UpVector[1], UpVector[2]};
|
||||
alListenerfv(AL_ORIENTATION, orient);
|
||||
}
|
||||
void cListener::setVelocity(const cVector3& vel)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Velocity = vel;
|
||||
alListener3f(AL_VELOCITY, Velocity.x, Velocity.y, Velocity.z);
|
||||
}
|
||||
void cListener::setMasterVolume(const float& volume)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
MasterGain = volume;
|
||||
alListenerf(AL_GAIN, MasterGain);
|
||||
}
|
||||
void cListener::move(const cVector3& pos)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
Velocity = pos - Position;
|
||||
Position = pos;
|
||||
|
||||
alListener3f(AL_POSITION, Position.x, Position.y, Position.z);
|
||||
alListener3f(AL_VELOCITY, Velocity.x, Velocity.y, Velocity.z);
|
||||
}
|
||||
#ifdef CAUDIO_EFX_ENABLED
|
||||
void cListener::setMetersPerUnit(const float& meters)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
alListenerf(AL_METERS_PER_UNIT, meters);
|
||||
}
|
||||
|
||||
float cListener::getMetersPerUnit(void) const
|
||||
{
|
||||
float value = 1.0f;
|
||||
alGetListenerf(AL_METERS_PER_UNIT, &value);
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
};
|
|
@ -1,166 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include "../Headers/cLogger.h"
|
||||
#include "../Headers/cConsoleLogReceiver.h"
|
||||
#include "../Headers/cFileLogReceiver.h"
|
||||
#include "../Headers/cUtils.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
static cLogger Logger;
|
||||
static bool FirstTimeLogInit(false);
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
static cConsoleLogReceiver ConsoleLog;
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
static cFileLogReceiver FileLog;
|
||||
#endif
|
||||
|
||||
cLogger::cLogger() : StartTime(0), MinLogLevel(ELL_INFO)
|
||||
{
|
||||
StartTime = clock();
|
||||
}
|
||||
|
||||
void cLogger::logCritical( const char* sender, const char *msg, ... )
|
||||
{
|
||||
if(ELL_CRITICAL >= MinLogLevel)
|
||||
{
|
||||
Mutex.lock();
|
||||
va_list args;
|
||||
va_start( args, msg );
|
||||
broadcastMessage( ELL_CRITICAL, sender, msg, args );
|
||||
va_end( args );
|
||||
Mutex.unlock();
|
||||
}
|
||||
}
|
||||
void cLogger::logError( const char* sender, const char *msg, ... )
|
||||
{
|
||||
if(ELL_ERROR >= MinLogLevel)
|
||||
{
|
||||
Mutex.lock();
|
||||
va_list args;
|
||||
va_start( args, msg );
|
||||
broadcastMessage( ELL_ERROR, sender, msg, args );
|
||||
va_end( args );
|
||||
Mutex.unlock();
|
||||
}
|
||||
}
|
||||
void cLogger::logWarning( const char* sender, const char *msg, ... )
|
||||
{
|
||||
if(ELL_WARNING >= MinLogLevel)
|
||||
{
|
||||
Mutex.lock();
|
||||
va_list args;
|
||||
va_start( args, msg );
|
||||
broadcastMessage( ELL_WARNING, sender, msg, args );
|
||||
va_end( args );
|
||||
Mutex.unlock();
|
||||
}
|
||||
}
|
||||
void cLogger::logInfo( const char* sender, const char *msg, ... )
|
||||
{
|
||||
if(ELL_INFO >= MinLogLevel)
|
||||
{
|
||||
Mutex.lock();
|
||||
va_list args;
|
||||
va_start( args, msg );
|
||||
broadcastMessage( ELL_INFO, sender, msg, args );
|
||||
va_end( args );
|
||||
Mutex.unlock();
|
||||
}
|
||||
}
|
||||
void cLogger::logDebug( const char* sender, const char *msg, ... )
|
||||
{
|
||||
if(ELL_DEBUG >= MinLogLevel)
|
||||
{
|
||||
Mutex.lock();
|
||||
va_list args;
|
||||
va_start( args, msg );
|
||||
broadcastMessage( ELL_DEBUG, sender, msg, args );
|
||||
va_end( args );
|
||||
Mutex.unlock();
|
||||
}
|
||||
}
|
||||
void cLogger::setLogLevel( const LogLevel& logLevel )
|
||||
{
|
||||
Mutex.lock();
|
||||
MinLogLevel = logLevel;
|
||||
Mutex.unlock();
|
||||
}
|
||||
void cLogger::broadcastMessage( LogLevel level, const char* sender, const char* msg, va_list args )
|
||||
{
|
||||
float messageTime = (clock() - StartTime) / (float)CLOCKS_PER_SEC;
|
||||
vsnprintf( TempTextBuf, 2048, msg, args );
|
||||
|
||||
ReceiversIterator it = Receivers.begin();
|
||||
for (it = Receivers.begin(); it != Receivers.end(); it++)
|
||||
{
|
||||
it->second->OnLogMessage(sender, TempTextBuf, level, messageTime);
|
||||
}
|
||||
}
|
||||
bool cLogger::registerLogReceiver(ILogReceiver* receiver, const char* name)
|
||||
{
|
||||
Mutex.lock();
|
||||
cAudioString logName = safeCStr(name);
|
||||
Receivers[logName] = receiver;
|
||||
Mutex.unlock();
|
||||
return true;
|
||||
}
|
||||
|
||||
void cLogger::unRegisterLogReceiver(const char* name)
|
||||
{
|
||||
Mutex.lock();
|
||||
cAudioString logName = safeCStr(name);
|
||||
ReceiversIterator it = Receivers.find(logName);
|
||||
if(it != Receivers.end())
|
||||
{
|
||||
Receivers.erase(it);
|
||||
}
|
||||
Mutex.unlock();
|
||||
}
|
||||
|
||||
bool cLogger::isLogReceiverRegistered(const char* name)
|
||||
{
|
||||
Mutex.lock();
|
||||
cAudioString logName = safeCStr(name);
|
||||
ReceiversIterator it = Receivers.find(logName);
|
||||
bool result = (it != Receivers.end());
|
||||
Mutex.unlock();
|
||||
return result;
|
||||
}
|
||||
|
||||
ILogReceiver* cLogger::getLogReceiver(const char* name)
|
||||
{
|
||||
Mutex.lock();
|
||||
cAudioString logName = safeCStr(name);
|
||||
ReceiversIterator it = Receivers.find(logName);
|
||||
if(it != Receivers.end())
|
||||
{
|
||||
Mutex.unlock();
|
||||
return it->second;
|
||||
}
|
||||
Mutex.unlock();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CAUDIO_API ILogger* getLogger()
|
||||
{
|
||||
if(!FirstTimeLogInit)
|
||||
{
|
||||
FirstTimeLogInit = true;
|
||||
#ifdef CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
Logger.registerLogReceiver(&ConsoleLog, "Console");
|
||||
#endif
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
Logger.registerLogReceiver(&FileLog,"File");
|
||||
#endif
|
||||
}
|
||||
return &Logger;
|
||||
}
|
||||
};
|
|
@ -1,96 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cMemorySource.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
cMemorySource::cMemorySource(const void* data, int size, bool copy) : Data(NULL), Size(0), Valid(false), Pos(0)
|
||||
{
|
||||
if(data && size > 0)
|
||||
{
|
||||
Size = size;
|
||||
if(copy)
|
||||
{
|
||||
Data = (char*)CAUDIO_MALLOC(Size);
|
||||
if(Data)
|
||||
memcpy(Data, data, Size);
|
||||
}
|
||||
else
|
||||
{
|
||||
Data = (char*)data;
|
||||
}
|
||||
if(Data)
|
||||
Valid = true;
|
||||
}
|
||||
}
|
||||
|
||||
cMemorySource::~cMemorySource()
|
||||
{
|
||||
CAUDIO_FREE(Data);
|
||||
}
|
||||
|
||||
bool cMemorySource::isValid()
|
||||
{
|
||||
return Valid;
|
||||
}
|
||||
|
||||
int cMemorySource::getCurrentPos()
|
||||
{
|
||||
return Pos;
|
||||
}
|
||||
|
||||
int cMemorySource::getSize()
|
||||
{
|
||||
return Size;
|
||||
}
|
||||
|
||||
int cMemorySource::read(void* output, int size)
|
||||
{
|
||||
|
||||
//memset(output, 0, size);
|
||||
if(Pos+size <= Size)
|
||||
{
|
||||
memcpy(output, Data+Pos, size);
|
||||
Pos += size;
|
||||
return size;
|
||||
}
|
||||
else
|
||||
{
|
||||
int extra = (Pos+size) - Size;
|
||||
int copied = size - extra;
|
||||
memcpy(output, Data+Pos, copied);
|
||||
Pos = Size;
|
||||
return copied;
|
||||
}
|
||||
}
|
||||
|
||||
bool cMemorySource::seek(int amount, bool relative)
|
||||
{
|
||||
if(relative)
|
||||
{
|
||||
Pos += amount;
|
||||
if(Pos > Size)
|
||||
{
|
||||
Pos = Size;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Pos = amount;
|
||||
if(Pos > Size)
|
||||
{
|
||||
Pos = Size;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
|
@ -1,116 +0,0 @@
|
|||
#include "../Headers/cMemoryTracker.h"
|
||||
|
||||
#ifdef CAUDIO_USE_MEMORYTRACKER
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
cMemoryTracker::cMemoryTracker()
|
||||
{
|
||||
#ifdef CAUDIO_MEMORYTRACKER_LOG_ALL_ALLOCATIONS
|
||||
outMemLog.open("cAudioMemoryLog.log");
|
||||
#endif
|
||||
}
|
||||
|
||||
cMemoryTracker::~cMemoryTracker()
|
||||
{
|
||||
#ifdef CAUDIO_MEMORYTRACKER_LOG_ALL_ALLOCATIONS
|
||||
outMemLog.close();
|
||||
#endif
|
||||
DumpLeaks();
|
||||
}
|
||||
|
||||
void cMemoryTracker::AddAllocation(void* pointer, size_t size, const char* filename, int line, const char* function)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cTrackedMemoryBlock block;
|
||||
block.size = size;
|
||||
block.filename = filename;
|
||||
block.line = line;
|
||||
block.function = function;
|
||||
TrackedBlocks[pointer] = block;
|
||||
|
||||
#ifdef CAUDIO_MEMORYTRACKER_GENERATE_STATISTICS
|
||||
MemStats.CurrentAllocationBytes += size;
|
||||
MemStats.TotalAllocationBytes += size;
|
||||
|
||||
MemStats.CurrentNumAllocations += 1;
|
||||
MemStats.TotalNumAllocations += 1;
|
||||
|
||||
MemStats.AllocationHighWaterMark = MemStats.CurrentAllocationBytes > MemStats.AllocationHighWaterMark ? MemStats.CurrentAllocationBytes : MemStats.AllocationHighWaterMark;
|
||||
MemStats.MaxNumAllocations = MemStats.CurrentNumAllocations > MemStats.MaxNumAllocations ? MemStats.CurrentNumAllocations : MemStats.MaxNumAllocations;
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_MEMORYTRACKER_LOG_ALL_ALLOCATIONS
|
||||
if(outMemLog.good())
|
||||
{
|
||||
outMemLog << "Allocation at " << pointer << " with size " << size << " bytes in " << filename << " (Line: " << line << ") function: " << function << std::endl;
|
||||
outMemLog.flush();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void cMemoryTracker::RemoveAllocation(void* pointer)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
std::map<void*, cTrackedMemoryBlock>::iterator it = TrackedBlocks.find(pointer);
|
||||
if(it != TrackedBlocks.end())
|
||||
{
|
||||
#ifdef CAUDIO_MEMORYTRACKER_LOG_ALL_ALLOCATIONS
|
||||
if(outMemLog.good())
|
||||
{
|
||||
outMemLog << "Deallocation of address " << pointer << " with size " << it->second.size << " bytes in " << it->second.filename << " (Line: " << it->second.line << ") function: " << it->second.function << std::endl;
|
||||
outMemLog.flush();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_MEMORYTRACKER_GENERATE_STATISTICS
|
||||
size_t size = it->second.size;
|
||||
MemStats.CurrentAllocationBytes -= size;
|
||||
MemStats.CurrentNumAllocations -= 1;
|
||||
#endif
|
||||
TrackedBlocks.erase(pointer);
|
||||
}
|
||||
}
|
||||
|
||||
void cMemoryTracker::DumpLeaks()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
|
||||
std::ofstream leakFile("cAudioMemoryLeaks.log");
|
||||
|
||||
#ifdef CAUDIO_MEMORYTRACKER_GENERATE_STATISTICS
|
||||
//Dump Statistics
|
||||
leakFile << "Highest Amount of Allocated Memory: " << MemStats.AllocationHighWaterMark << " bytes." << std::endl;
|
||||
leakFile << "Memory Allocated at Shutdown: " << MemStats.CurrentAllocationBytes << " bytes." << std::endl;
|
||||
leakFile << "Total Allocated Memory: " << MemStats.TotalAllocationBytes << " bytes." << std::endl;
|
||||
|
||||
leakFile << "Highest Number of Allocated Objects: " << MemStats.MaxNumAllocations << std::endl;
|
||||
leakFile << "Objects Allocated at Shutdown: " << MemStats.CurrentNumAllocations << std::endl;
|
||||
leakFile << "Total Objects Allocated: " << MemStats.TotalNumAllocations << std::endl;
|
||||
leakFile << std::endl;
|
||||
#endif
|
||||
|
||||
std::map<void*, cTrackedMemoryBlock>::iterator it;
|
||||
for(it = TrackedBlocks.begin(); it != TrackedBlocks.end(); it++)
|
||||
{
|
||||
if(leakFile.good())
|
||||
{
|
||||
leakFile << "Address:" << it->first << " Size:" << it->second.size << " in " << it->second.filename << " (Line: " << it->second.line << ") function: " << it->second.function << std::endl;
|
||||
leakFile.flush();
|
||||
}
|
||||
}
|
||||
|
||||
if(TrackedBlocks.size() == 0)
|
||||
{
|
||||
leakFile << "No Leaks Detected!" << std::endl;
|
||||
leakFile.flush();
|
||||
}
|
||||
|
||||
leakFile.close();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cMutex.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
#ifdef CAUDIO_MAKE_THREAD_SAFE
|
||||
cAudioMutex::cAudioMutex() : Initialized(false)
|
||||
{
|
||||
}
|
||||
|
||||
cAudioMutex::~cAudioMutex()
|
||||
{
|
||||
if(!Initialized)
|
||||
return;
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
DeleteCriticalSection(&criticalSection);
|
||||
#else
|
||||
pthread_mutex_destroy(&Mutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
void cAudioMutex::lock(void)
|
||||
{
|
||||
if(!Initialized)
|
||||
initialize();
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
EnterCriticalSection(&criticalSection);
|
||||
#else
|
||||
int error = pthread_mutex_lock(&Mutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
void cAudioMutex::unlock(void)
|
||||
{
|
||||
if(!Initialized)
|
||||
return;
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
LeaveCriticalSection(&criticalSection);
|
||||
#else
|
||||
int error = pthread_mutex_unlock(&Mutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
void cAudioMutex::initialize(void)
|
||||
{
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
InitializeCriticalSection(&criticalSection);
|
||||
#else
|
||||
pthread_mutexattr_t attr;
|
||||
int error = pthread_mutexattr_init(&attr);
|
||||
error = pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
|
||||
error = pthread_mutex_init(&Mutex, &attr);
|
||||
error = pthread_mutexattr_destroy(&attr);
|
||||
#endif
|
||||
Initialized=true;
|
||||
}
|
||||
#else
|
||||
cAudioMutex::cAudioMutex() : Initialized(false)
|
||||
{
|
||||
}
|
||||
|
||||
cAudioMutex::~cAudioMutex()
|
||||
{
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
void cAudioMutex::lock(void)
|
||||
{
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
void cAudioMutex::unlock(void)
|
||||
{
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
void cAudioMutex::initialize(void)
|
||||
{
|
||||
//Do nothing
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
|
@ -1,8 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cOggAudioDecoderFactory.h"
|
||||
|
||||
|
||||
|
|
@ -1,182 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cOggDecoder.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_OGG_DECODER
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
//! Read Vorbis Data
|
||||
size_t VorbisRead(void *ptr, size_t byteSize,size_t sizeToRead, void *datasource)
|
||||
{
|
||||
IDataSource* Stream = (IDataSource*)datasource;
|
||||
return Stream->read(ptr,byteSize*sizeToRead);
|
||||
}
|
||||
|
||||
//! Seek Vorbis Data
|
||||
int VorbisSeek(void *datasource,ogg_int64_t offset,int whence)
|
||||
{
|
||||
IDataSource* Stream = (IDataSource*)datasource;
|
||||
switch (whence)
|
||||
{
|
||||
case SEEK_SET:
|
||||
Stream->seek(offset, false);
|
||||
break;
|
||||
|
||||
case SEEK_CUR:
|
||||
Stream->seek(offset, true);
|
||||
break;
|
||||
|
||||
case SEEK_END:
|
||||
Stream->seek(Stream->getSize()-offset, false);
|
||||
break;
|
||||
};
|
||||
return 0;
|
||||
}
|
||||
|
||||
//! Returns the vorbis data that was stored.
|
||||
long VorbisTell(void *datasource)
|
||||
{
|
||||
return ((IDataSource*)datasource)->getCurrentPos();
|
||||
}
|
||||
|
||||
int VorbisCloseFunc(void *datasource)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
cOggDecoder::cOggDecoder(IDataSource* stream) : IAudioDecoder(stream)
|
||||
{
|
||||
vorbisCallbacks.read_func = VorbisRead;
|
||||
vorbisCallbacks.close_func = VorbisCloseFunc;
|
||||
vorbisCallbacks.seek_func = VorbisSeek;
|
||||
vorbisCallbacks.tell_func = VorbisTell;
|
||||
Valid = (ov_open_callbacks(Stream,&oggStream,NULL,0,vorbisCallbacks) == 0);
|
||||
|
||||
if(Valid)
|
||||
{
|
||||
vorbisInfo = ov_info(&oggStream, -1);
|
||||
vorbisComment = ov_comment(&oggStream,-1);
|
||||
}
|
||||
}
|
||||
|
||||
cOggDecoder::~cOggDecoder()
|
||||
{
|
||||
ov_clear(&oggStream);
|
||||
}
|
||||
|
||||
AudioFormats cOggDecoder::getFormat()
|
||||
{
|
||||
if(Valid)
|
||||
{
|
||||
if(vorbisInfo->channels == 1)
|
||||
{
|
||||
return EAF_16BIT_MONO;
|
||||
}
|
||||
else
|
||||
{
|
||||
return EAF_16BIT_STEREO;
|
||||
}
|
||||
}
|
||||
return EAF_8BIT_MONO;
|
||||
}
|
||||
|
||||
int cOggDecoder::getFrequency()
|
||||
{
|
||||
if(Valid)
|
||||
{
|
||||
return vorbisInfo->rate;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool cOggDecoder::isSeekingSupported()
|
||||
{
|
||||
if(Valid)
|
||||
{
|
||||
return (ov_seekable(&oggStream)!=0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cOggDecoder::isValid()
|
||||
{
|
||||
return Valid;
|
||||
}
|
||||
|
||||
int cOggDecoder::readAudioData(void* output, int amount)
|
||||
{
|
||||
if(Valid)
|
||||
{
|
||||
int temp = 0;
|
||||
int result = ov_read(&oggStream,(char*)output,amount,0,2,1,&temp);
|
||||
//return (result < 0) ? 0 : result;
|
||||
return result;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool cOggDecoder::setPosition(int position, bool relative)
|
||||
{
|
||||
if(Valid)
|
||||
{
|
||||
if(ov_seekable(&oggStream))
|
||||
{
|
||||
return (ov_raw_seek(&oggStream,position)==0);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cOggDecoder::seek(float seconds, bool relative)
|
||||
{
|
||||
if(Valid)
|
||||
{
|
||||
if(ov_seekable(&oggStream))
|
||||
{
|
||||
if(relative)
|
||||
{
|
||||
float curtime = ov_time_tell(&oggStream);
|
||||
return (ov_time_seek(&oggStream,curtime+seconds)==0);
|
||||
}
|
||||
else
|
||||
return (ov_time_seek(&oggStream,seconds)==0);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
float cOggDecoder::getTotalTime()
|
||||
{
|
||||
return ov_time_total(&oggStream, -1);
|
||||
}
|
||||
|
||||
int cOggDecoder::getTotalSize()
|
||||
{
|
||||
return ov_pcm_total(&oggStream, -1) * vorbisInfo->channels;
|
||||
}
|
||||
|
||||
int cOggDecoder::getCompressedSize()
|
||||
{
|
||||
return ov_raw_total(&oggStream, -1);
|
||||
}
|
||||
|
||||
float cOggDecoder::getCurrentTime()
|
||||
{
|
||||
return ov_time_tell(&oggStream);
|
||||
}
|
||||
|
||||
int cOggDecoder::getCurrentPosition()
|
||||
{
|
||||
return ov_pcm_tell(&oggStream) * vorbisInfo->channels;
|
||||
}
|
||||
|
||||
int cOggDecoder::getCurrentCompressedPosition()
|
||||
{
|
||||
return ov_raw_tell(&oggStream);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,181 +0,0 @@
|
|||
#include "../Headers/cPluginManager.h"
|
||||
#include "../Headers/cUtils.h"
|
||||
#include "../include/cAudioPlatform.h"
|
||||
#include "../include/cAudioDefines.h"
|
||||
#include "../include/ILogger.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_DYNAMIC_PLUGIN_SUPPORT
|
||||
typedef IAudioPlugin* (*GetPluginModule)(const char* version);
|
||||
#endif
|
||||
|
||||
cPluginManager::cPluginManager()
|
||||
{
|
||||
#ifdef CAUDIO_COMPILE_WITH_DYNAMIC_PLUGIN_SUPPORT
|
||||
autoLoadPlugins();
|
||||
#endif
|
||||
}
|
||||
|
||||
cPluginManager::~cPluginManager()
|
||||
{
|
||||
#ifdef CAUDIO_COMPILE_WITH_DYNAMIC_PLUGIN_SUPPORT
|
||||
DynamicallyLoadedPluginsIterator it;
|
||||
for(it = DynamicallyLoadedPlugins.begin(); it != DynamicallyLoadedPlugins.end(); it++)
|
||||
{
|
||||
//Found a plugin we loaded from the filesystem, unload it and delete the plugin
|
||||
it->first->drop();
|
||||
if(DYNLIB_UNLOAD(it->second))
|
||||
{
|
||||
//Could be an error, not reporting it for now
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cPluginManager::installPlugin(IAudioPlugin* plugin, const char* name)
|
||||
{
|
||||
if(plugin)
|
||||
{
|
||||
cAudioString theName = safeCStr(name);
|
||||
if(theName.empty())
|
||||
theName = plugin->getPluginName();
|
||||
|
||||
if(plugin->installPlugin(getLogger()))
|
||||
{
|
||||
RegisteredPlugins[theName] = plugin;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cPluginManager::installPlugin(const char* filename, const char* name)
|
||||
{
|
||||
#ifdef CAUDIO_COMPILE_WITH_DYNAMIC_PLUGIN_SUPPORT
|
||||
DYNLIB_HANDLE m_hInst = DYNLIB_LOAD(filename);
|
||||
if(m_hInst)
|
||||
{
|
||||
GetPluginModule moduleFunc = (GetPluginModule)DYNLIB_GETSYM(m_hInst, "GetPluginModule");
|
||||
|
||||
if(moduleFunc)
|
||||
{
|
||||
IAudioPlugin* plugin = moduleFunc(CAUDIO_VERSION);
|
||||
|
||||
if(plugin)
|
||||
{
|
||||
DynamicallyLoadedPlugins[plugin] = m_hInst;
|
||||
|
||||
return installPlugin(plugin, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cPluginManager::checkForPlugin(const char* name)
|
||||
{
|
||||
return (RegisteredPlugins.find(name) != RegisteredPlugins.end());
|
||||
}
|
||||
|
||||
IAudioPlugin* cPluginManager::getPlugin(const char* name)
|
||||
{
|
||||
if(RegisteredPlugins.find(name) != RegisteredPlugins.end())
|
||||
{
|
||||
return RegisteredPlugins[name];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned int cPluginManager::getPluginCount()
|
||||
{
|
||||
return RegisteredPlugins.size();
|
||||
}
|
||||
|
||||
cAudioVector<IAudioPlugin*>::Type cPluginManager::getPluginList()
|
||||
{
|
||||
cAudioVector<IAudioPlugin*>::Type list;
|
||||
RegisteredPluginsIterator it;
|
||||
for(it = RegisteredPlugins.begin(); it != RegisteredPlugins.end(); it++)
|
||||
{
|
||||
list.push_back(it->second);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
void cPluginManager::uninstallPlugin(IAudioPlugin* plugin)
|
||||
{
|
||||
if(plugin)
|
||||
{
|
||||
RegisteredPluginsIterator it;
|
||||
for(it = RegisteredPlugins.begin(); it != RegisteredPlugins.end(); it++)
|
||||
{
|
||||
if(it->second == plugin)
|
||||
{
|
||||
RegisteredPlugins.erase(it->first);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_DYNAMIC_PLUGIN_SUPPORT
|
||||
DynamicallyLoadedPluginsIterator it2 = DynamicallyLoadedPlugins.find(plugin);
|
||||
if(it2 != DynamicallyLoadedPlugins.end())
|
||||
{
|
||||
//Found a plugin we loaded from the filesystem, unload it and delete the plugin
|
||||
it2->first->drop();
|
||||
if(DYNLIB_UNLOAD(it2->second))
|
||||
{
|
||||
//Could be an error, not reporting it for now
|
||||
}
|
||||
DynamicallyLoadedPlugins.erase(it2->first);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void cPluginManager::uninstallPlugin(const char* name)
|
||||
{
|
||||
if(RegisteredPlugins.find(name) != RegisteredPlugins.end())
|
||||
{
|
||||
uninstallPlugin(RegisteredPlugins[name]);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_DYNAMIC_PLUGIN_SUPPORT
|
||||
void cPluginManager::autoLoadPlugins()
|
||||
{
|
||||
cAudioVector<cAudioString>::Type fileList = getFilesInDirectory(".");
|
||||
for(int i=0; i<fileList.size(); ++i)
|
||||
{
|
||||
if(fileList[i].substr(0, 4) == "cAp_")
|
||||
{
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
if(fileList[i].substr(fileList[i].length()-4, 4) == ".dll")
|
||||
#endif
|
||||
#ifdef CAUDIO_PLATFORM_LINUX
|
||||
if(fileList[i].substr(fileList[i].length()-3, 3) == ".so")
|
||||
#endif
|
||||
#ifdef CAUDIO_PLATFORM_MAC
|
||||
if(fileList[i].substr(fileList[i].length()-6, 6) == ".dylib")
|
||||
#endif
|
||||
{
|
||||
//Found a plugin, load it
|
||||
installPlugin(cAudioString("./" + fileList[i]).c_str(), NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
CAUDIO_API IPluginManager* getPluginManager()
|
||||
{
|
||||
return cPluginManager::Instance();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif //! CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
|
@ -1,114 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cRawDecoder.h"
|
||||
|
||||
namespace cAudio{
|
||||
|
||||
cRawDecoder::cRawDecoder(IDataSource* stream, unsigned int frequency, AudioFormats format) : IAudioDecoder(stream), Frequency(frequency), Format(format)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
cRawDecoder::~cRawDecoder()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
AudioFormats cRawDecoder::getFormat()
|
||||
{
|
||||
return Format;
|
||||
}
|
||||
|
||||
int cRawDecoder::getFrequency()
|
||||
{
|
||||
return Frequency;
|
||||
}
|
||||
|
||||
bool cRawDecoder::isSeekingSupported()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cRawDecoder::isValid()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
int cRawDecoder::readAudioData(void* output, int amount)
|
||||
{
|
||||
return Stream->read(output,amount);
|
||||
}
|
||||
|
||||
bool cRawDecoder::setPosition(int position, bool relative)
|
||||
{
|
||||
Stream->seek(position,relative);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cRawDecoder::seek(float seconds,bool relative)
|
||||
{
|
||||
int SampleSize = 1;
|
||||
if(Format == EAF_8BIT_MONO)
|
||||
SampleSize = 1;
|
||||
else if(Format == EAF_8BIT_STEREO)
|
||||
SampleSize = 2;
|
||||
else if(Format == EAF_16BIT_MONO)
|
||||
SampleSize = 2;
|
||||
else
|
||||
SampleSize = 4;
|
||||
|
||||
int amountToSeek = seconds * (float)Frequency * (float)SampleSize;
|
||||
return setPosition(amountToSeek, relative);
|
||||
}
|
||||
|
||||
float cRawDecoder::getTotalTime()
|
||||
{
|
||||
int SampleSize = 0;
|
||||
if(Format == EAF_8BIT_MONO)
|
||||
SampleSize = 1;
|
||||
else if(Format == EAF_8BIT_STEREO)
|
||||
SampleSize = 2;
|
||||
else if(Format == EAF_16BIT_MONO)
|
||||
SampleSize = 2;
|
||||
else
|
||||
SampleSize = 4;
|
||||
return (float)Stream->getSize() / ((float)Frequency * (float)SampleSize);
|
||||
}
|
||||
|
||||
int cRawDecoder::getTotalSize()
|
||||
{
|
||||
return Stream->getSize();
|
||||
}
|
||||
|
||||
int cRawDecoder::getCompressedSize()
|
||||
{
|
||||
return Stream->getSize();
|
||||
}
|
||||
|
||||
float cRawDecoder::getCurrentTime()
|
||||
{
|
||||
int SampleSize = 0;
|
||||
if(Format == EAF_8BIT_MONO)
|
||||
SampleSize = 1;
|
||||
else if(Format == EAF_8BIT_STEREO)
|
||||
SampleSize = 2;
|
||||
else if(Format == EAF_16BIT_MONO)
|
||||
SampleSize = 2;
|
||||
else
|
||||
SampleSize = 4;
|
||||
|
||||
return (float)Stream->getCurrentPos() / ((float)Frequency * (float)SampleSize);
|
||||
}
|
||||
|
||||
int cRawDecoder::getCurrentPosition()
|
||||
{
|
||||
return Stream->getCurrentPos();
|
||||
}
|
||||
|
||||
int cRawDecoder::getCurrentCompressedPosition()
|
||||
{
|
||||
return Stream->getCurrentPos();
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
#include "../Headers/cStandardMemoryProvider.h"
|
||||
#include "../Headers/cMemoryTracker.h"
|
||||
#include <stdlib.h>
|
||||
#include <limits>
|
||||
|
||||
#ifdef max
|
||||
#undef max
|
||||
#endif
|
||||
|
||||
#ifdef min
|
||||
#undef min
|
||||
#endif
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
void* cStandardMemoryProvider::Allocate(size_t size, const char* filename, int line, const char* function)
|
||||
{
|
||||
void* ptr = malloc(size);
|
||||
#ifdef CAUDIO_USE_MEMORYTRACKER
|
||||
cMemoryTracker::Instance()->AddAllocation(ptr, size, filename, line, function);
|
||||
#endif
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void cStandardMemoryProvider::Free(void* pointer)
|
||||
{
|
||||
if(pointer)
|
||||
{
|
||||
#ifdef CAUDIO_USE_MEMORYTRACKER
|
||||
cMemoryTracker::Instance()->RemoveAllocation(pointer);
|
||||
#endif
|
||||
free(pointer);
|
||||
}
|
||||
}
|
||||
|
||||
size_t cStandardMemoryProvider::getMaxAllocationSize()
|
||||
{
|
||||
return std::numeric_limits<size_t>::max();
|
||||
}
|
||||
};
|
|
@ -1,43 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cThread.h"
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
#include <windows.h> //Basic windows includes
|
||||
#include <process.h>
|
||||
#else
|
||||
#include <pthread.h> //Assumed linux system
|
||||
#endif
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
int cAudioThread::SpawnThread( unsigned __stdcall start_address( void* ), void *arg)
|
||||
{
|
||||
HANDLE threadHandle;
|
||||
unsigned threadID = 0;
|
||||
|
||||
threadHandle = (HANDLE) _beginthreadex(NULL,0,start_address,arg,0,&threadID);
|
||||
|
||||
int state = (threadHandle==0) ? 1 : 0;
|
||||
|
||||
if(state == 0)
|
||||
CloseHandle( threadHandle );
|
||||
|
||||
return state;
|
||||
}
|
||||
#else
|
||||
int cAudioThread::SpawnThread( void* start_address( void* ), void *arg)
|
||||
{
|
||||
pthread_t threadHandle;
|
||||
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init( &attr );
|
||||
pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED );
|
||||
|
||||
return pthread_create( &threadHandle, &attr, start_address, arg );
|
||||
}
|
||||
#endif
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cWavAudioDecoderFactory.h"
|
|
@ -1,232 +0,0 @@
|
|||
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cWavDecoder.h"
|
||||
#include <string.h>
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_WAV_DECODER
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
cWavDecoder::cWavDecoder(IDataSource* stream) : IAudioDecoder(stream), Valid(false)
|
||||
{
|
||||
const char* RIFFTAG = "RIFF";
|
||||
const char* WAVETAG = "WAVE";
|
||||
const char* FORMATTAG = "fmt ";
|
||||
const char* DATATAG = "data";
|
||||
|
||||
char ident[4];
|
||||
int tempint32 = 0;
|
||||
short tempint16 = 0;
|
||||
char tempint8 = 0;
|
||||
|
||||
unsigned int startOffset = 0;
|
||||
|
||||
//Read the first 4 bytes
|
||||
Stream->seek(0, false);
|
||||
Stream->read(ident, 4);
|
||||
//Check to see if it is a valid RIFF file
|
||||
if(strncmp(ident, RIFFTAG, 4) == 0)
|
||||
{
|
||||
Stream->read(&tempint32, 4);
|
||||
//Check to see if the file is big enough to be valid (not completely accurate)
|
||||
if(tempint32 >= 44)
|
||||
{
|
||||
Stream->read(ident, 4);
|
||||
//Check that it is a wave file
|
||||
if(strncmp(ident, WAVETAG, 4) == 0)
|
||||
{
|
||||
//Save our position
|
||||
startOffset = Stream->getCurrentPos();
|
||||
|
||||
//Scan for the first fmt chuck (not necessarily right after)
|
||||
do
|
||||
{
|
||||
Stream->read(ident, 4);
|
||||
}
|
||||
while((strncmp(ident, FORMATTAG, 4) != 0) && (Stream->getCurrentPos() < Stream->getSize()));
|
||||
|
||||
//Did we find it?
|
||||
if(Stream->getCurrentPos() < (Stream->getSize() - 16))
|
||||
{
|
||||
//Yes, read it in
|
||||
Stream->read(&tempint32, 4);
|
||||
if(tempint32 >= 16)
|
||||
{
|
||||
//Check that it is in PCM format, we don't support compressed wavs
|
||||
Stream->read(&tempint16, 2);
|
||||
if(tempint16 == 1)
|
||||
{
|
||||
Stream->read(&tempint16, 2);
|
||||
Channels = tempint16;
|
||||
//We only support mono or stereo wavs
|
||||
if(Channels == 1 || Channels == 2)
|
||||
{
|
||||
Stream->read(&tempint32, 4);
|
||||
SampleRate = tempint32;
|
||||
Stream->read(&tempint32, 4);
|
||||
ByteRate = tempint32;
|
||||
Stream->read(&tempint16, 2);
|
||||
BlockAlign = tempint16;
|
||||
Stream->read(&tempint16, 2);
|
||||
BitsPerSample = tempint16;
|
||||
|
||||
//We only support 8 bit or 16 bit wavs
|
||||
if(BitsPerSample == 8 || BitsPerSample == 16)
|
||||
{
|
||||
//Reset our pointer to start scanning for the data block
|
||||
Stream->seek(startOffset, false);
|
||||
//Scan for the first data chuck (not necessarily right after)
|
||||
do
|
||||
{
|
||||
Stream->read(ident, 4);
|
||||
}
|
||||
while((strncmp(ident, DATATAG, 4) != 0) && (Stream->getCurrentPos() < Stream->getSize()));
|
||||
|
||||
//Did we find it?
|
||||
if(Stream->getCurrentPos() < Stream->getSize())
|
||||
{
|
||||
//Get size of data block
|
||||
Stream->read(&tempint32, 4);
|
||||
DataSize = tempint32;
|
||||
DataOffset = Stream->getCurrentPos();
|
||||
|
||||
Valid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cWavDecoder::~cWavDecoder()
|
||||
{
|
||||
Channels = 0;
|
||||
SampleRate = 0;
|
||||
ByteRate = 0;
|
||||
BlockAlign = 0;
|
||||
BitsPerSample = 0;
|
||||
DataSize = 0;
|
||||
DataOffset = 0;
|
||||
Valid = false;
|
||||
}
|
||||
|
||||
AudioFormats cWavDecoder::getFormat()
|
||||
{
|
||||
if(Channels == 1 && BitsPerSample == 8)
|
||||
return EAF_8BIT_MONO;
|
||||
else if(Channels == 1 && BitsPerSample == 16)
|
||||
return EAF_16BIT_MONO;
|
||||
else if(Channels == 2 && BitsPerSample == 8)
|
||||
return EAF_8BIT_STEREO;
|
||||
else
|
||||
return EAF_16BIT_STEREO;
|
||||
}
|
||||
|
||||
int cWavDecoder::getFrequency()
|
||||
{
|
||||
return SampleRate;
|
||||
}
|
||||
|
||||
bool cWavDecoder::isSeekingSupported()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cWavDecoder::isValid()
|
||||
{
|
||||
return Valid;
|
||||
}
|
||||
|
||||
int cWavDecoder::readAudioData(void* output, int amount)
|
||||
{
|
||||
int currentPos = Stream->getCurrentPos();
|
||||
int startPos = DataOffset;
|
||||
int endPos = DataOffset + DataSize;
|
||||
int amountToRead = amount;
|
||||
|
||||
//Bounds checks (and adjustments if possible)
|
||||
if(currentPos > endPos)
|
||||
return 0;
|
||||
|
||||
if(currentPos < startPos)
|
||||
{
|
||||
Stream->seek(startPos, false);
|
||||
currentPos = Stream->getCurrentPos();
|
||||
}
|
||||
|
||||
if((currentPos + amountToRead) > endPos)
|
||||
amountToRead = endPos - currentPos;
|
||||
|
||||
if(amountToRead < 0)
|
||||
amountToRead = 0;
|
||||
|
||||
return Stream->read(output,amountToRead);
|
||||
|
||||
}
|
||||
|
||||
bool cWavDecoder::setPosition(int position, bool relative)
|
||||
{
|
||||
int currentPos = Stream->getCurrentPos();
|
||||
int startPos = DataOffset;
|
||||
int endPos = DataOffset + DataSize;
|
||||
|
||||
//Bounds checks (and adjustments if possible)
|
||||
if(!relative && position < startPos)
|
||||
position = startPos;
|
||||
if(!relative && position > endPos)
|
||||
position = endPos;
|
||||
if(relative && currentPos + position < startPos)
|
||||
position = startPos - currentPos;
|
||||
if(relative && currentPos + position > startPos)
|
||||
position = endPos - currentPos;
|
||||
|
||||
Stream->seek(position,relative);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cWavDecoder::seek(float seconds,bool relative)
|
||||
{
|
||||
int amountToSeek = seconds * (float)SampleRate * (float)Channels * (float)(BitsPerSample/8);
|
||||
return setPosition(amountToSeek, relative);
|
||||
}
|
||||
|
||||
float cWavDecoder::getTotalTime()
|
||||
{
|
||||
return (float)Stream->getSize() / ((float)SampleRate * (float)Channels * (float)(BitsPerSample/8));
|
||||
}
|
||||
|
||||
int cWavDecoder::getTotalSize()
|
||||
{
|
||||
return Stream->getSize();
|
||||
}
|
||||
|
||||
int cWavDecoder::getCompressedSize()
|
||||
{
|
||||
return Stream->getSize();
|
||||
}
|
||||
|
||||
float cWavDecoder::getCurrentTime()
|
||||
{
|
||||
return (float)Stream->getCurrentPos() / ((float)SampleRate * (float)Channels * (float)(BitsPerSample/8));
|
||||
}
|
||||
|
||||
int cWavDecoder::getCurrentPosition()
|
||||
{
|
||||
return Stream->getCurrentPos();
|
||||
}
|
||||
|
||||
int cWavDecoder::getCurrentCompressedPosition()
|
||||
{
|
||||
return Stream->getCurrentPos();
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,572 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
7B8F7D611139F74C0092C2FD /* cAudioManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D4C1139F74C0092C2FD /* cAudioManager.cpp */; };
|
||||
7B8F7D621139F74C0092C2FD /* cAudioEffects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D4D1139F74C0092C2FD /* cAudioEffects.cpp */; };
|
||||
7B8F7D631139F74C0092C2FD /* cAudioCapture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D4E1139F74C0092C2FD /* cAudioCapture.cpp */; };
|
||||
7B8F7D641139F74C0092C2FD /* cAudioSleep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D4F1139F74C0092C2FD /* cAudioSleep.cpp */; };
|
||||
7B8F7D651139F74C0092C2FD /* cAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D501139F74C0092C2FD /* cAudioSource.cpp */; };
|
||||
7B8F7D661139F74C0092C2FD /* cConsoleLogReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D511139F74C0092C2FD /* cConsoleLogReceiver.cpp */; };
|
||||
7B8F7D671139F74C0092C2FD /* cEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D521139F74C0092C2FD /* cEffect.cpp */; };
|
||||
7B8F7D681139F74C0092C2FD /* cFileLogReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D531139F74C0092C2FD /* cFileLogReceiver.cpp */; };
|
||||
7B8F7D691139F74C0092C2FD /* cFileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D541139F74C0092C2FD /* cFileSource.cpp */; };
|
||||
7B8F7D6A1139F74C0092C2FD /* cFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D551139F74C0092C2FD /* cFilter.cpp */; };
|
||||
7B8F7D6B1139F74C0092C2FD /* cListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D561139F74C0092C2FD /* cListener.cpp */; };
|
||||
7B8F7D6C1139F74C0092C2FD /* cLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D571139F74C0092C2FD /* cLogger.cpp */; };
|
||||
7B8F7D6D1139F74C0092C2FD /* cMemorySource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D581139F74C0092C2FD /* cMemorySource.cpp */; };
|
||||
7B8F7D6E1139F74C0092C2FD /* cMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D591139F74C0092C2FD /* cMutex.cpp */; };
|
||||
7B8F7D6F1139F74C0092C2FD /* cOggAudioDecoderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D5A1139F74C0092C2FD /* cOggAudioDecoderFactory.cpp */; };
|
||||
7B8F7D701139F74C0092C2FD /* cOggDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D5B1139F74C0092C2FD /* cOggDecoder.cpp */; };
|
||||
7B8F7D711139F74C0092C2FD /* cPluginManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D5C1139F74C0092C2FD /* cPluginManager.cpp */; };
|
||||
7B8F7D721139F74C0092C2FD /* cRawDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D5D1139F74C0092C2FD /* cRawDecoder.cpp */; };
|
||||
7B8F7D731139F74C0092C2FD /* cThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D5E1139F74C0092C2FD /* cThread.cpp */; };
|
||||
7B8F7D741139F74C0092C2FD /* cWavAudioDecoderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D5F1139F74C0092C2FD /* cWavAudioDecoderFactory.cpp */; };
|
||||
7B8F7D751139F74C0092C2FD /* cWavDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B8F7D601139F74C0092C2FD /* cWavDecoder.cpp */; };
|
||||
7B8F7DE31139F7950092C2FD /* cAudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DC91139F7950092C2FD /* cAudio.h */; };
|
||||
7B8F7DE41139F7950092C2FD /* cAudioDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DCA1139F7950092C2FD /* cAudioDefines.h */; };
|
||||
7B8F7DE51139F7950092C2FD /* cAudioPlatform.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DCB1139F7950092C2FD /* cAudioPlatform.h */; };
|
||||
7B8F7DE61139F7950092C2FD /* cAudioSleep.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DCC1139F7950092C2FD /* cAudioSleep.h */; };
|
||||
7B8F7DE71139F7950092C2FD /* cVector3.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DCD1139F7950092C2FD /* cVector3.h */; };
|
||||
7B8F7DE81139F7950092C2FD /* EAudioFormats.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DCE1139F7950092C2FD /* EAudioFormats.h */; };
|
||||
7B8F7DE91139F7950092C2FD /* IAudioCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DCF1139F7950092C2FD /* IAudioCapture.h */; };
|
||||
7B8F7DEA1139F7950092C2FD /* IAudioDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DD01139F7950092C2FD /* IAudioDecoder.h */; };
|
||||
7B8F7DEB1139F7950092C2FD /* IAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DD11139F7950092C2FD /* IAudioDecoderFactory.h */; };
|
||||
7B8F7DEC1139F7950092C2FD /* IAudioEffects.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DD21139F7950092C2FD /* IAudioEffects.h */; };
|
||||
7B8F7DED1139F7950092C2FD /* IAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DD31139F7950092C2FD /* IAudioManager.h */; };
|
||||
7B8F7DEE1139F7950092C2FD /* IAudioPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DD41139F7950092C2FD /* IAudioPlugin.h */; };
|
||||
7B8F7DEF1139F7950092C2FD /* IAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DD51139F7950092C2FD /* IAudioSource.h */; };
|
||||
7B8F7DF01139F7950092C2FD /* ICaptureEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DD61139F7950092C2FD /* ICaptureEventHandler.h */; };
|
||||
7B8F7DF11139F7950092C2FD /* IDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DD71139F7950092C2FD /* IDataSource.h */; };
|
||||
7B8F7DF21139F7950092C2FD /* IDataSourceFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DD81139F7950092C2FD /* IDataSourceFactory.h */; };
|
||||
7B8F7DF31139F7950092C2FD /* IEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DD91139F7950092C2FD /* IEffect.h */; };
|
||||
7B8F7DF41139F7950092C2FD /* IEffectParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DDA1139F7950092C2FD /* IEffectParameters.h */; };
|
||||
7B8F7DF51139F7950092C2FD /* IFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DDB1139F7950092C2FD /* IFilter.h */; };
|
||||
7B8F7DF61139F7950092C2FD /* IListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DDC1139F7950092C2FD /* IListener.h */; };
|
||||
7B8F7DF71139F7950092C2FD /* ILogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DDD1139F7950092C2FD /* ILogger.h */; };
|
||||
7B8F7DF81139F7950092C2FD /* ILogReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DDE1139F7950092C2FD /* ILogReceiver.h */; };
|
||||
7B8F7DF91139F7950092C2FD /* IManagerEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DDF1139F7950092C2FD /* IManagerEventHandler.h */; };
|
||||
7B8F7DFA1139F7950092C2FD /* IPluginManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DE01139F7950092C2FD /* IPluginManager.h */; };
|
||||
7B8F7DFB1139F7950092C2FD /* IRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DE11139F7950092C2FD /* IRefCounted.h */; };
|
||||
7B8F7DFC1139F7950092C2FD /* ISourceEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DE21139F7950092C2FD /* ISourceEventHandler.h */; };
|
||||
7B8F7E161139F8C40092C2FD /* cAudioCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DFE1139F8C40092C2FD /* cAudioCapture.h */; };
|
||||
7B8F7E171139F8C40092C2FD /* cAudioEffects.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7DFF1139F8C40092C2FD /* cAudioEffects.h */; };
|
||||
7B8F7E181139F8C40092C2FD /* cAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E001139F8C40092C2FD /* cAudioManager.h */; };
|
||||
7B8F7E191139F8C40092C2FD /* cAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E011139F8C40092C2FD /* cAudioSource.h */; };
|
||||
7B8F7E1A1139F8C40092C2FD /* cConsoleLogReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E021139F8C40092C2FD /* cConsoleLogReceiver.h */; };
|
||||
7B8F7E1B1139F8C40092C2FD /* cEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E031139F8C40092C2FD /* cEffect.h */; };
|
||||
7B8F7E1C1139F8C40092C2FD /* cEFXFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E041139F8C40092C2FD /* cEFXFunctions.h */; };
|
||||
7B8F7E1D1139F8C40092C2FD /* cFileLogReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E051139F8C40092C2FD /* cFileLogReceiver.h */; };
|
||||
7B8F7E1E1139F8C40092C2FD /* cFileSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E061139F8C40092C2FD /* cFileSource.h */; };
|
||||
7B8F7E1F1139F8C40092C2FD /* cFileSourceFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E071139F8C40092C2FD /* cFileSourceFactory.h */; };
|
||||
7B8F7E201139F8C40092C2FD /* cFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E081139F8C40092C2FD /* cFilter.h */; };
|
||||
7B8F7E211139F8C40092C2FD /* cListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E091139F8C40092C2FD /* cListener.h */; };
|
||||
7B8F7E221139F8C40092C2FD /* cLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E0A1139F8C40092C2FD /* cLogger.h */; };
|
||||
7B8F7E231139F8C40092C2FD /* cMemorySource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E0B1139F8C40092C2FD /* cMemorySource.h */; };
|
||||
7B8F7E241139F8C40092C2FD /* cMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E0C1139F8C40092C2FD /* cMutex.h */; };
|
||||
7B8F7E251139F8C40092C2FD /* cOggAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E0D1139F8C40092C2FD /* cOggAudioDecoderFactory.h */; };
|
||||
7B8F7E261139F8C40092C2FD /* cOggDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E0E1139F8C40092C2FD /* cOggDecoder.h */; };
|
||||
7B8F7E271139F8C40092C2FD /* cPluginManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E0F1139F8C40092C2FD /* cPluginManager.h */; };
|
||||
7B8F7E281139F8C40092C2FD /* cRawAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E101139F8C40092C2FD /* cRawAudioDecoderFactory.h */; };
|
||||
7B8F7E291139F8C40092C2FD /* cRawDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E111139F8C40092C2FD /* cRawDecoder.h */; };
|
||||
7B8F7E2A1139F8C40092C2FD /* cThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E121139F8C40092C2FD /* cThread.h */; };
|
||||
7B8F7E2B1139F8C40092C2FD /* cUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E131139F8C40092C2FD /* cUtils.h */; };
|
||||
7B8F7E2C1139F8C40092C2FD /* cWavAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E141139F8C40092C2FD /* cWavAudioDecoderFactory.h */; };
|
||||
7B8F7E2D1139F8C40092C2FD /* cWavDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8F7E151139F8C40092C2FD /* cWavDecoder.h */; };
|
||||
7BA918FE1139A9BE00A9144B /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BA918FD1139A9BE00A9144B /* OpenAL.framework */; };
|
||||
7BB2D8E31150663600F6BFBD /* cAudioMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB2D8E21150663600F6BFBD /* cAudioMemory.h */; };
|
||||
7BB2D8E51150663F00F6BFBD /* IMemoryProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB2D8E41150663F00F6BFBD /* IMemoryProvider.h */; };
|
||||
7BB2D8E71150664D00F6BFBD /* cMemoryOverride.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB2D8E61150664D00F6BFBD /* cMemoryOverride.h */; };
|
||||
7BB2D8E91150666A00F6BFBD /* cMemoryTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB2D8E81150666A00F6BFBD /* cMemoryTracker.h */; };
|
||||
7BB2D8EB1150667200F6BFBD /* cStandardMemoryProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB2D8EA1150667200F6BFBD /* cStandardMemoryProvider.h */; };
|
||||
7BB2D8ED1150667D00F6BFBD /* cSTLAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB2D8EC1150667D00F6BFBD /* cSTLAllocator.h */; };
|
||||
7BB2D8EF115066C000F6BFBD /* cAudioMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7BB2D8EE115066C000F6BFBD /* cAudioMemory.cpp */; };
|
||||
7BB2D8F1115066DC00F6BFBD /* cMemoryTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7BB2D8F0115066DC00F6BFBD /* cMemoryTracker.cpp */; };
|
||||
7BB2D8F3115066F000F6BFBD /* cStandardMemoryProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7BB2D8F2115066F000F6BFBD /* cStandardMemoryProvider.cpp */; };
|
||||
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
7B8F7D4C1139F74C0092C2FD /* cAudioManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cAudioManager.cpp; path = Source/cAudioManager.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D4D1139F74C0092C2FD /* cAudioEffects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cAudioEffects.cpp; path = Source/cAudioEffects.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D4E1139F74C0092C2FD /* cAudioCapture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cAudioCapture.cpp; path = Source/cAudioCapture.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D4F1139F74C0092C2FD /* cAudioSleep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cAudioSleep.cpp; path = Source/cAudioSleep.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D501139F74C0092C2FD /* cAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cAudioSource.cpp; path = Source/cAudioSource.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D511139F74C0092C2FD /* cConsoleLogReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cConsoleLogReceiver.cpp; path = Source/cConsoleLogReceiver.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D521139F74C0092C2FD /* cEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cEffect.cpp; path = Source/cEffect.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D531139F74C0092C2FD /* cFileLogReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cFileLogReceiver.cpp; path = Source/cFileLogReceiver.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D541139F74C0092C2FD /* cFileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cFileSource.cpp; path = Source/cFileSource.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D551139F74C0092C2FD /* cFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cFilter.cpp; path = Source/cFilter.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D561139F74C0092C2FD /* cListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cListener.cpp; path = Source/cListener.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D571139F74C0092C2FD /* cLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cLogger.cpp; path = Source/cLogger.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D581139F74C0092C2FD /* cMemorySource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cMemorySource.cpp; path = Source/cMemorySource.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D591139F74C0092C2FD /* cMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cMutex.cpp; path = Source/cMutex.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D5A1139F74C0092C2FD /* cOggAudioDecoderFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cOggAudioDecoderFactory.cpp; path = Source/cOggAudioDecoderFactory.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D5B1139F74C0092C2FD /* cOggDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cOggDecoder.cpp; path = Source/cOggDecoder.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D5C1139F74C0092C2FD /* cPluginManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cPluginManager.cpp; path = Source/cPluginManager.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D5D1139F74C0092C2FD /* cRawDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cRawDecoder.cpp; path = Source/cRawDecoder.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D5E1139F74C0092C2FD /* cThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cThread.cpp; path = Source/cThread.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D5F1139F74C0092C2FD /* cWavAudioDecoderFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cWavAudioDecoderFactory.cpp; path = Source/cWavAudioDecoderFactory.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7D601139F74C0092C2FD /* cWavDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cWavDecoder.cpp; path = Source/cWavDecoder.cpp; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DC91139F7950092C2FD /* cAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cAudio.h; path = include/cAudio.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DCA1139F7950092C2FD /* cAudioDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cAudioDefines.h; path = include/cAudioDefines.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DCB1139F7950092C2FD /* cAudioPlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cAudioPlatform.h; path = include/cAudioPlatform.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DCC1139F7950092C2FD /* cAudioSleep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cAudioSleep.h; path = include/cAudioSleep.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DCD1139F7950092C2FD /* cVector3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cVector3.h; path = include/cVector3.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DCE1139F7950092C2FD /* EAudioFormats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EAudioFormats.h; path = include/EAudioFormats.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DCF1139F7950092C2FD /* IAudioCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IAudioCapture.h; path = include/IAudioCapture.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DD01139F7950092C2FD /* IAudioDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IAudioDecoder.h; path = include/IAudioDecoder.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DD11139F7950092C2FD /* IAudioDecoderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IAudioDecoderFactory.h; path = include/IAudioDecoderFactory.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DD21139F7950092C2FD /* IAudioEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IAudioEffects.h; path = include/IAudioEffects.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DD31139F7950092C2FD /* IAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IAudioManager.h; path = include/IAudioManager.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DD41139F7950092C2FD /* IAudioPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IAudioPlugin.h; path = include/IAudioPlugin.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DD51139F7950092C2FD /* IAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IAudioSource.h; path = include/IAudioSource.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DD61139F7950092C2FD /* ICaptureEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ICaptureEventHandler.h; path = include/ICaptureEventHandler.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DD71139F7950092C2FD /* IDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IDataSource.h; path = include/IDataSource.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DD81139F7950092C2FD /* IDataSourceFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IDataSourceFactory.h; path = include/IDataSourceFactory.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DD91139F7950092C2FD /* IEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IEffect.h; path = include/IEffect.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DDA1139F7950092C2FD /* IEffectParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IEffectParameters.h; path = include/IEffectParameters.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DDB1139F7950092C2FD /* IFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IFilter.h; path = include/IFilter.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DDC1139F7950092C2FD /* IListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IListener.h; path = include/IListener.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DDD1139F7950092C2FD /* ILogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ILogger.h; path = include/ILogger.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DDE1139F7950092C2FD /* ILogReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ILogReceiver.h; path = include/ILogReceiver.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DDF1139F7950092C2FD /* IManagerEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IManagerEventHandler.h; path = include/IManagerEventHandler.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DE01139F7950092C2FD /* IPluginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IPluginManager.h; path = include/IPluginManager.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DE11139F7950092C2FD /* IRefCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRefCounted.h; path = include/IRefCounted.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DE21139F7950092C2FD /* ISourceEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ISourceEventHandler.h; path = include/ISourceEventHandler.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DFE1139F8C40092C2FD /* cAudioCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cAudioCapture.h; path = Headers/cAudioCapture.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7DFF1139F8C40092C2FD /* cAudioEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cAudioEffects.h; path = Headers/cAudioEffects.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E001139F8C40092C2FD /* cAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cAudioManager.h; path = Headers/cAudioManager.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E011139F8C40092C2FD /* cAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cAudioSource.h; path = Headers/cAudioSource.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E021139F8C40092C2FD /* cConsoleLogReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cConsoleLogReceiver.h; path = Headers/cConsoleLogReceiver.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E031139F8C40092C2FD /* cEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cEffect.h; path = Headers/cEffect.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E041139F8C40092C2FD /* cEFXFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cEFXFunctions.h; path = Headers/cEFXFunctions.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E051139F8C40092C2FD /* cFileLogReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cFileLogReceiver.h; path = Headers/cFileLogReceiver.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E061139F8C40092C2FD /* cFileSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cFileSource.h; path = Headers/cFileSource.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E071139F8C40092C2FD /* cFileSourceFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cFileSourceFactory.h; path = Headers/cFileSourceFactory.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E081139F8C40092C2FD /* cFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cFilter.h; path = Headers/cFilter.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E091139F8C40092C2FD /* cListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cListener.h; path = Headers/cListener.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E0A1139F8C40092C2FD /* cLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cLogger.h; path = Headers/cLogger.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E0B1139F8C40092C2FD /* cMemorySource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cMemorySource.h; path = Headers/cMemorySource.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E0C1139F8C40092C2FD /* cMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cMutex.h; path = Headers/cMutex.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E0D1139F8C40092C2FD /* cOggAudioDecoderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cOggAudioDecoderFactory.h; path = Headers/cOggAudioDecoderFactory.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E0E1139F8C40092C2FD /* cOggDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cOggDecoder.h; path = Headers/cOggDecoder.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E0F1139F8C40092C2FD /* cPluginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cPluginManager.h; path = Headers/cPluginManager.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E101139F8C40092C2FD /* cRawAudioDecoderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cRawAudioDecoderFactory.h; path = Headers/cRawAudioDecoderFactory.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E111139F8C40092C2FD /* cRawDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cRawDecoder.h; path = Headers/cRawDecoder.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E121139F8C40092C2FD /* cThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cThread.h; path = Headers/cThread.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E131139F8C40092C2FD /* cUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cUtils.h; path = Headers/cUtils.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E141139F8C40092C2FD /* cWavAudioDecoderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cWavAudioDecoderFactory.h; path = Headers/cWavAudioDecoderFactory.h; sourceTree = SOURCE_ROOT; };
|
||||
7B8F7E151139F8C40092C2FD /* cWavDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cWavDecoder.h; path = Headers/cWavDecoder.h; sourceTree = SOURCE_ROOT; };
|
||||
7BA918FD1139A9BE00A9144B /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = /System/Library/Frameworks/OpenAL.framework; sourceTree = "<absolute>"; };
|
||||
7BB2D8E21150663600F6BFBD /* cAudioMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAudioMemory.h; sourceTree = "<group>"; };
|
||||
7BB2D8E41150663F00F6BFBD /* IMemoryProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMemoryProvider.h; sourceTree = "<group>"; };
|
||||
7BB2D8E61150664D00F6BFBD /* cMemoryOverride.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cMemoryOverride.h; sourceTree = "<group>"; };
|
||||
7BB2D8E81150666A00F6BFBD /* cMemoryTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cMemoryTracker.h; sourceTree = "<group>"; };
|
||||
7BB2D8EA1150667200F6BFBD /* cStandardMemoryProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cStandardMemoryProvider.h; sourceTree = "<group>"; };
|
||||
7BB2D8EC1150667D00F6BFBD /* cSTLAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cSTLAllocator.h; sourceTree = "<group>"; };
|
||||
7BB2D8EE115066C000F6BFBD /* cAudioMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cAudioMemory.cpp; path = Source/cAudioMemory.cpp; sourceTree = "<group>"; };
|
||||
7BB2D8F0115066DC00F6BFBD /* cMemoryTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cMemoryTracker.cpp; path = Source/cMemoryTracker.cpp; sourceTree = "<group>"; };
|
||||
7BB2D8F2115066F000F6BFBD /* cStandardMemoryProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cStandardMemoryProvider.cpp; path = Source/cStandardMemoryProvider.cpp; sourceTree = "<group>"; };
|
||||
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D2AAC07E0554694100DB518D /* libcAudio_Iphone_d.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libcAudio_Iphone_d.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D2AAC07C0554694100DB518D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
|
||||
7BA918FE1139A9BE00A9144B /* OpenAL.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
034768DFFF38A50411DB9C8B /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2AAC07E0554694100DB518D /* libcAudio_Iphone_d.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0867D691FE84028FC02AAC07 /* cAudio-Iphone */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B8F7DFD1139F8C40092C2FD /* Headers */,
|
||||
7B8F7DC81139F7950092C2FD /* include */,
|
||||
08FB77AEFE84172EC02AAC07 /* Classes */,
|
||||
32C88DFF0371C24200C91783 /* Other Sources */,
|
||||
0867D69AFE84028FC02AAC07 /* Frameworks */,
|
||||
034768DFFF38A50411DB9C8B /* Products */,
|
||||
);
|
||||
name = "cAudio-Iphone";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7BA918FD1139A9BE00A9144B /* OpenAL.framework */,
|
||||
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB77AEFE84172EC02AAC07 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7BB2D8F2115066F000F6BFBD /* cStandardMemoryProvider.cpp */,
|
||||
7BB2D8F0115066DC00F6BFBD /* cMemoryTracker.cpp */,
|
||||
7BB2D8EE115066C000F6BFBD /* cAudioMemory.cpp */,
|
||||
7B8F7D4C1139F74C0092C2FD /* cAudioManager.cpp */,
|
||||
7B8F7D4D1139F74C0092C2FD /* cAudioEffects.cpp */,
|
||||
7B8F7D4E1139F74C0092C2FD /* cAudioCapture.cpp */,
|
||||
7B8F7D4F1139F74C0092C2FD /* cAudioSleep.cpp */,
|
||||
7B8F7D501139F74C0092C2FD /* cAudioSource.cpp */,
|
||||
7B8F7D511139F74C0092C2FD /* cConsoleLogReceiver.cpp */,
|
||||
7B8F7D521139F74C0092C2FD /* cEffect.cpp */,
|
||||
7B8F7D531139F74C0092C2FD /* cFileLogReceiver.cpp */,
|
||||
7B8F7D541139F74C0092C2FD /* cFileSource.cpp */,
|
||||
7B8F7D551139F74C0092C2FD /* cFilter.cpp */,
|
||||
7B8F7D561139F74C0092C2FD /* cListener.cpp */,
|
||||
7B8F7D571139F74C0092C2FD /* cLogger.cpp */,
|
||||
7B8F7D581139F74C0092C2FD /* cMemorySource.cpp */,
|
||||
7B8F7D591139F74C0092C2FD /* cMutex.cpp */,
|
||||
7B8F7D5A1139F74C0092C2FD /* cOggAudioDecoderFactory.cpp */,
|
||||
7B8F7D5B1139F74C0092C2FD /* cOggDecoder.cpp */,
|
||||
7B8F7D5C1139F74C0092C2FD /* cPluginManager.cpp */,
|
||||
7B8F7D5D1139F74C0092C2FD /* cRawDecoder.cpp */,
|
||||
7B8F7D5E1139F74C0092C2FD /* cThread.cpp */,
|
||||
7B8F7D5F1139F74C0092C2FD /* cWavAudioDecoderFactory.cpp */,
|
||||
7B8F7D601139F74C0092C2FD /* cWavDecoder.cpp */,
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
32C88DFF0371C24200C91783 /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B8F7DC81139F7950092C2FD /* include */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7BB2D8E41150663F00F6BFBD /* IMemoryProvider.h */,
|
||||
7BB2D8E21150663600F6BFBD /* cAudioMemory.h */,
|
||||
7B8F7DC91139F7950092C2FD /* cAudio.h */,
|
||||
7B8F7DCA1139F7950092C2FD /* cAudioDefines.h */,
|
||||
7B8F7DCB1139F7950092C2FD /* cAudioPlatform.h */,
|
||||
7B8F7DCC1139F7950092C2FD /* cAudioSleep.h */,
|
||||
7B8F7DCD1139F7950092C2FD /* cVector3.h */,
|
||||
7B8F7DCE1139F7950092C2FD /* EAudioFormats.h */,
|
||||
7B8F7DCF1139F7950092C2FD /* IAudioCapture.h */,
|
||||
7B8F7DD01139F7950092C2FD /* IAudioDecoder.h */,
|
||||
7B8F7DD11139F7950092C2FD /* IAudioDecoderFactory.h */,
|
||||
7B8F7DD21139F7950092C2FD /* IAudioEffects.h */,
|
||||
7B8F7DD31139F7950092C2FD /* IAudioManager.h */,
|
||||
7B8F7DD41139F7950092C2FD /* IAudioPlugin.h */,
|
||||
7B8F7DD51139F7950092C2FD /* IAudioSource.h */,
|
||||
7B8F7DD61139F7950092C2FD /* ICaptureEventHandler.h */,
|
||||
7B8F7DD71139F7950092C2FD /* IDataSource.h */,
|
||||
7B8F7DD81139F7950092C2FD /* IDataSourceFactory.h */,
|
||||
7B8F7DD91139F7950092C2FD /* IEffect.h */,
|
||||
7B8F7DDA1139F7950092C2FD /* IEffectParameters.h */,
|
||||
7B8F7DDB1139F7950092C2FD /* IFilter.h */,
|
||||
7B8F7DDC1139F7950092C2FD /* IListener.h */,
|
||||
7B8F7DDD1139F7950092C2FD /* ILogger.h */,
|
||||
7B8F7DDE1139F7950092C2FD /* ILogReceiver.h */,
|
||||
7B8F7DDF1139F7950092C2FD /* IManagerEventHandler.h */,
|
||||
7B8F7DE01139F7950092C2FD /* IPluginManager.h */,
|
||||
7B8F7DE11139F7950092C2FD /* IRefCounted.h */,
|
||||
7B8F7DE21139F7950092C2FD /* ISourceEventHandler.h */,
|
||||
);
|
||||
path = include;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
7B8F7DFD1139F8C40092C2FD /* Headers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7BB2D8EC1150667D00F6BFBD /* cSTLAllocator.h */,
|
||||
7BB2D8EA1150667200F6BFBD /* cStandardMemoryProvider.h */,
|
||||
7BB2D8E81150666A00F6BFBD /* cMemoryTracker.h */,
|
||||
7BB2D8E61150664D00F6BFBD /* cMemoryOverride.h */,
|
||||
7B8F7DFE1139F8C40092C2FD /* cAudioCapture.h */,
|
||||
7B8F7DFF1139F8C40092C2FD /* cAudioEffects.h */,
|
||||
7B8F7E001139F8C40092C2FD /* cAudioManager.h */,
|
||||
7B8F7E011139F8C40092C2FD /* cAudioSource.h */,
|
||||
7B8F7E021139F8C40092C2FD /* cConsoleLogReceiver.h */,
|
||||
7B8F7E031139F8C40092C2FD /* cEffect.h */,
|
||||
7B8F7E041139F8C40092C2FD /* cEFXFunctions.h */,
|
||||
7B8F7E051139F8C40092C2FD /* cFileLogReceiver.h */,
|
||||
7B8F7E061139F8C40092C2FD /* cFileSource.h */,
|
||||
7B8F7E071139F8C40092C2FD /* cFileSourceFactory.h */,
|
||||
7B8F7E081139F8C40092C2FD /* cFilter.h */,
|
||||
7B8F7E091139F8C40092C2FD /* cListener.h */,
|
||||
7B8F7E0A1139F8C40092C2FD /* cLogger.h */,
|
||||
7B8F7E0B1139F8C40092C2FD /* cMemorySource.h */,
|
||||
7B8F7E0C1139F8C40092C2FD /* cMutex.h */,
|
||||
7B8F7E0D1139F8C40092C2FD /* cOggAudioDecoderFactory.h */,
|
||||
7B8F7E0E1139F8C40092C2FD /* cOggDecoder.h */,
|
||||
7B8F7E0F1139F8C40092C2FD /* cPluginManager.h */,
|
||||
7B8F7E101139F8C40092C2FD /* cRawAudioDecoderFactory.h */,
|
||||
7B8F7E111139F8C40092C2FD /* cRawDecoder.h */,
|
||||
7B8F7E121139F8C40092C2FD /* cThread.h */,
|
||||
7B8F7E131139F8C40092C2FD /* cUtils.h */,
|
||||
7B8F7E141139F8C40092C2FD /* cWavAudioDecoderFactory.h */,
|
||||
7B8F7E151139F8C40092C2FD /* cWavDecoder.h */,
|
||||
);
|
||||
path = Headers;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D2AAC07A0554694100DB518D /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B8F7DE31139F7950092C2FD /* cAudio.h in Headers */,
|
||||
7B8F7DE41139F7950092C2FD /* cAudioDefines.h in Headers */,
|
||||
7B8F7DE51139F7950092C2FD /* cAudioPlatform.h in Headers */,
|
||||
7B8F7DE61139F7950092C2FD /* cAudioSleep.h in Headers */,
|
||||
7B8F7DE71139F7950092C2FD /* cVector3.h in Headers */,
|
||||
7B8F7DE81139F7950092C2FD /* EAudioFormats.h in Headers */,
|
||||
7B8F7DE91139F7950092C2FD /* IAudioCapture.h in Headers */,
|
||||
7B8F7DEA1139F7950092C2FD /* IAudioDecoder.h in Headers */,
|
||||
7B8F7DEB1139F7950092C2FD /* IAudioDecoderFactory.h in Headers */,
|
||||
7B8F7DEC1139F7950092C2FD /* IAudioEffects.h in Headers */,
|
||||
7B8F7DED1139F7950092C2FD /* IAudioManager.h in Headers */,
|
||||
7B8F7DEE1139F7950092C2FD /* IAudioPlugin.h in Headers */,
|
||||
7B8F7DEF1139F7950092C2FD /* IAudioSource.h in Headers */,
|
||||
7B8F7DF01139F7950092C2FD /* ICaptureEventHandler.h in Headers */,
|
||||
7B8F7DF11139F7950092C2FD /* IDataSource.h in Headers */,
|
||||
7B8F7DF21139F7950092C2FD /* IDataSourceFactory.h in Headers */,
|
||||
7B8F7DF31139F7950092C2FD /* IEffect.h in Headers */,
|
||||
7B8F7DF41139F7950092C2FD /* IEffectParameters.h in Headers */,
|
||||
7B8F7DF51139F7950092C2FD /* IFilter.h in Headers */,
|
||||
7B8F7DF61139F7950092C2FD /* IListener.h in Headers */,
|
||||
7B8F7DF71139F7950092C2FD /* ILogger.h in Headers */,
|
||||
7B8F7DF81139F7950092C2FD /* ILogReceiver.h in Headers */,
|
||||
7B8F7DF91139F7950092C2FD /* IManagerEventHandler.h in Headers */,
|
||||
7B8F7DFA1139F7950092C2FD /* IPluginManager.h in Headers */,
|
||||
7B8F7DFB1139F7950092C2FD /* IRefCounted.h in Headers */,
|
||||
7B8F7DFC1139F7950092C2FD /* ISourceEventHandler.h in Headers */,
|
||||
7B8F7E161139F8C40092C2FD /* cAudioCapture.h in Headers */,
|
||||
7B8F7E171139F8C40092C2FD /* cAudioEffects.h in Headers */,
|
||||
7B8F7E181139F8C40092C2FD /* cAudioManager.h in Headers */,
|
||||
7B8F7E191139F8C40092C2FD /* cAudioSource.h in Headers */,
|
||||
7B8F7E1A1139F8C40092C2FD /* cConsoleLogReceiver.h in Headers */,
|
||||
7B8F7E1B1139F8C40092C2FD /* cEffect.h in Headers */,
|
||||
7B8F7E1C1139F8C40092C2FD /* cEFXFunctions.h in Headers */,
|
||||
7B8F7E1D1139F8C40092C2FD /* cFileLogReceiver.h in Headers */,
|
||||
7B8F7E1E1139F8C40092C2FD /* cFileSource.h in Headers */,
|
||||
7B8F7E1F1139F8C40092C2FD /* cFileSourceFactory.h in Headers */,
|
||||
7B8F7E201139F8C40092C2FD /* cFilter.h in Headers */,
|
||||
7B8F7E211139F8C40092C2FD /* cListener.h in Headers */,
|
||||
7B8F7E221139F8C40092C2FD /* cLogger.h in Headers */,
|
||||
7B8F7E231139F8C40092C2FD /* cMemorySource.h in Headers */,
|
||||
7B8F7E241139F8C40092C2FD /* cMutex.h in Headers */,
|
||||
7B8F7E251139F8C40092C2FD /* cOggAudioDecoderFactory.h in Headers */,
|
||||
7B8F7E261139F8C40092C2FD /* cOggDecoder.h in Headers */,
|
||||
7B8F7E271139F8C40092C2FD /* cPluginManager.h in Headers */,
|
||||
7B8F7E281139F8C40092C2FD /* cRawAudioDecoderFactory.h in Headers */,
|
||||
7B8F7E291139F8C40092C2FD /* cRawDecoder.h in Headers */,
|
||||
7B8F7E2A1139F8C40092C2FD /* cThread.h in Headers */,
|
||||
7B8F7E2B1139F8C40092C2FD /* cUtils.h in Headers */,
|
||||
7B8F7E2C1139F8C40092C2FD /* cWavAudioDecoderFactory.h in Headers */,
|
||||
7B8F7E2D1139F8C40092C2FD /* cWavDecoder.h in Headers */,
|
||||
7BB2D8E31150663600F6BFBD /* cAudioMemory.h in Headers */,
|
||||
7BB2D8E51150663F00F6BFBD /* IMemoryProvider.h in Headers */,
|
||||
7BB2D8E71150664D00F6BFBD /* cMemoryOverride.h in Headers */,
|
||||
7BB2D8E91150666A00F6BFBD /* cMemoryTracker.h in Headers */,
|
||||
7BB2D8EB1150667200F6BFBD /* cStandardMemoryProvider.h in Headers */,
|
||||
7BB2D8ED1150667D00F6BFBD /* cSTLAllocator.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D2AAC07D0554694100DB518D /* cAudio-Iphone */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "cAudio-Iphone" */;
|
||||
buildPhases = (
|
||||
D2AAC07A0554694100DB518D /* Headers */,
|
||||
D2AAC07B0554694100DB518D /* Sources */,
|
||||
D2AAC07C0554694100DB518D /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "cAudio-Iphone";
|
||||
productName = "cAudio-Iphone";
|
||||
productReference = D2AAC07E0554694100DB518D /* libcAudio_Iphone_d.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
0867D690FE84028FC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "cAudio-Iphone" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 0867D691FE84028FC02AAC07 /* cAudio-Iphone */;
|
||||
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D2AAC07D0554694100DB518D /* cAudio-Iphone */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D2AAC07B0554694100DB518D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B8F7D611139F74C0092C2FD /* cAudioManager.cpp in Sources */,
|
||||
7B8F7D621139F74C0092C2FD /* cAudioEffects.cpp in Sources */,
|
||||
7B8F7D631139F74C0092C2FD /* cAudioCapture.cpp in Sources */,
|
||||
7B8F7D641139F74C0092C2FD /* cAudioSleep.cpp in Sources */,
|
||||
7B8F7D651139F74C0092C2FD /* cAudioSource.cpp in Sources */,
|
||||
7B8F7D661139F74C0092C2FD /* cConsoleLogReceiver.cpp in Sources */,
|
||||
7B8F7D671139F74C0092C2FD /* cEffect.cpp in Sources */,
|
||||
7B8F7D681139F74C0092C2FD /* cFileLogReceiver.cpp in Sources */,
|
||||
7B8F7D691139F74C0092C2FD /* cFileSource.cpp in Sources */,
|
||||
7B8F7D6A1139F74C0092C2FD /* cFilter.cpp in Sources */,
|
||||
7B8F7D6B1139F74C0092C2FD /* cListener.cpp in Sources */,
|
||||
7B8F7D6C1139F74C0092C2FD /* cLogger.cpp in Sources */,
|
||||
7B8F7D6D1139F74C0092C2FD /* cMemorySource.cpp in Sources */,
|
||||
7B8F7D6E1139F74C0092C2FD /* cMutex.cpp in Sources */,
|
||||
7B8F7D6F1139F74C0092C2FD /* cOggAudioDecoderFactory.cpp in Sources */,
|
||||
7B8F7D701139F74C0092C2FD /* cOggDecoder.cpp in Sources */,
|
||||
7B8F7D711139F74C0092C2FD /* cPluginManager.cpp in Sources */,
|
||||
7B8F7D721139F74C0092C2FD /* cRawDecoder.cpp in Sources */,
|
||||
7B8F7D731139F74C0092C2FD /* cThread.cpp in Sources */,
|
||||
7B8F7D741139F74C0092C2FD /* cWavAudioDecoderFactory.cpp in Sources */,
|
||||
7B8F7D751139F74C0092C2FD /* cWavDecoder.cpp in Sources */,
|
||||
7BB2D8EF115066C000F6BFBD /* cAudioMemory.cpp in Sources */,
|
||||
7BB2D8F1115066DC00F6BFBD /* cMemoryTracker.cpp in Sources */,
|
||||
7BB2D8F3115066F000F6BFBD /* cStandardMemoryProvider.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB921F08733DC00010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DSTROOT = /tmp/cAudio_Iphone.dst;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = "";
|
||||
GCC_PREFIX_HEADER = "";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"Headers\"",
|
||||
"\"dependencies/Headers\"",
|
||||
);
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"\"dependencies/Libs/Osx-Iphone/libvorbis.a\"",
|
||||
);
|
||||
PRODUCT_NAME = cAudio_Iphone_d;
|
||||
SYMROOT = "bin/Osx-iphone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB922008733DC00010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
DSTROOT = /tmp/cAudio_Iphone.dst;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = "";
|
||||
GCC_PREFIX_HEADER = "";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"Headers\"",
|
||||
"\"dependencies/Headers\"",
|
||||
);
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"\"dependencies/Libs/Osx-Iphone/libvorbis.a\"",
|
||||
);
|
||||
PRODUCT_NAME = cAudio_Iphone;
|
||||
SYMROOT = "bin/Osx-Iphone";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB922308733DC00010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PREBINDING = NO;
|
||||
SDKROOT = iphoneos3.1.3;
|
||||
SYMROOT = "bin/Osx-iphone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB922408733DC00010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PREBINDING = NO;
|
||||
SDKROOT = iphoneos3.1.3;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "cAudio-Iphone" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB921F08733DC00010E9CD /* Debug */,
|
||||
1DEB922008733DC00010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "cAudio-Iphone" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB922308733DC00010E9CD /* Debug */,
|
||||
1DEB922408733DC00010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
}
|
|
@ -1,837 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
7B09C5BE113A17D9008C46C9 /* cAudioCapture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5A8113A17D9008C46C9 /* cAudioCapture.cpp */; };
|
||||
7B09C5BF113A17D9008C46C9 /* cAudioEffects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5A9113A17D9008C46C9 /* cAudioEffects.cpp */; };
|
||||
7B09C5C0113A17D9008C46C9 /* cAudioManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AA113A17D9008C46C9 /* cAudioManager.cpp */; };
|
||||
7B09C5C1113A17D9008C46C9 /* cAudioSleep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AB113A17D9008C46C9 /* cAudioSleep.cpp */; };
|
||||
7B09C5C2113A17D9008C46C9 /* cAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AC113A17D9008C46C9 /* cAudioSource.cpp */; };
|
||||
7B09C5C3113A17D9008C46C9 /* cConsoleLogReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AD113A17D9008C46C9 /* cConsoleLogReceiver.cpp */; };
|
||||
7B09C5C4113A17D9008C46C9 /* cEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AE113A17D9008C46C9 /* cEffect.cpp */; };
|
||||
7B09C5C5113A17D9008C46C9 /* cFileLogReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AF113A17D9008C46C9 /* cFileLogReceiver.cpp */; };
|
||||
7B09C5C6113A17D9008C46C9 /* cFileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B0113A17D9008C46C9 /* cFileSource.cpp */; };
|
||||
7B09C5C7113A17D9008C46C9 /* cFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B1113A17D9008C46C9 /* cFilter.cpp */; };
|
||||
7B09C5C8113A17D9008C46C9 /* cListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B2113A17D9008C46C9 /* cListener.cpp */; };
|
||||
7B09C5C9113A17D9008C46C9 /* cLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B3113A17D9008C46C9 /* cLogger.cpp */; };
|
||||
7B09C5CA113A17D9008C46C9 /* cMemorySource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B4113A17D9008C46C9 /* cMemorySource.cpp */; };
|
||||
7B09C5CB113A17D9008C46C9 /* cMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B5113A17D9008C46C9 /* cMutex.cpp */; };
|
||||
7B09C5CC113A17D9008C46C9 /* cOggAudioDecoderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B6113A17D9008C46C9 /* cOggAudioDecoderFactory.cpp */; };
|
||||
7B09C5CD113A17D9008C46C9 /* cOggDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B7113A17D9008C46C9 /* cOggDecoder.cpp */; };
|
||||
7B09C5CE113A17D9008C46C9 /* cPluginManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B8113A17D9008C46C9 /* cPluginManager.cpp */; };
|
||||
7B09C5CF113A17D9008C46C9 /* cRawDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B9113A17D9008C46C9 /* cRawDecoder.cpp */; };
|
||||
7B09C5D0113A17D9008C46C9 /* cThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5BA113A17D9008C46C9 /* cThread.cpp */; };
|
||||
7B09C5D1113A17D9008C46C9 /* cWavAudioDecoderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5BB113A17D9008C46C9 /* cWavAudioDecoderFactory.cpp */; };
|
||||
7B09C5D2113A17D9008C46C9 /* cWavDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5BC113A17D9008C46C9 /* cWavDecoder.cpp */; };
|
||||
7B09C5D3113A17D9008C46C9 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5BD113A17D9008C46C9 /* Makefile */; };
|
||||
7B09C5ED113A17DD008C46C9 /* cAudioCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5D5113A17DD008C46C9 /* cAudioCapture.h */; };
|
||||
7B09C5EE113A17DD008C46C9 /* cAudioEffects.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5D6113A17DD008C46C9 /* cAudioEffects.h */; };
|
||||
7B09C5EF113A17DD008C46C9 /* cAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5D7113A17DD008C46C9 /* cAudioManager.h */; };
|
||||
7B09C5F0113A17DD008C46C9 /* cAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5D8113A17DD008C46C9 /* cAudioSource.h */; };
|
||||
7B09C5F1113A17DD008C46C9 /* cConsoleLogReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5D9113A17DD008C46C9 /* cConsoleLogReceiver.h */; };
|
||||
7B09C5F2113A17DD008C46C9 /* cEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DA113A17DD008C46C9 /* cEffect.h */; };
|
||||
7B09C5F3113A17DD008C46C9 /* cEFXFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DB113A17DD008C46C9 /* cEFXFunctions.h */; };
|
||||
7B09C5F4113A17DD008C46C9 /* cFileLogReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DC113A17DD008C46C9 /* cFileLogReceiver.h */; };
|
||||
7B09C5F5113A17DD008C46C9 /* cFileSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DD113A17DD008C46C9 /* cFileSource.h */; };
|
||||
7B09C5F6113A17DD008C46C9 /* cFileSourceFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DE113A17DD008C46C9 /* cFileSourceFactory.h */; };
|
||||
7B09C5F7113A17DD008C46C9 /* cFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DF113A17DD008C46C9 /* cFilter.h */; };
|
||||
7B09C5F8113A17DD008C46C9 /* cListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E0113A17DD008C46C9 /* cListener.h */; };
|
||||
7B09C5F9113A17DD008C46C9 /* cLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E1113A17DD008C46C9 /* cLogger.h */; };
|
||||
7B09C5FA113A17DD008C46C9 /* cMemorySource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E2113A17DD008C46C9 /* cMemorySource.h */; };
|
||||
7B09C5FB113A17DD008C46C9 /* cMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E3113A17DD008C46C9 /* cMutex.h */; };
|
||||
7B09C5FC113A17DD008C46C9 /* cOggAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E4113A17DD008C46C9 /* cOggAudioDecoderFactory.h */; };
|
||||
7B09C5FD113A17DD008C46C9 /* cOggDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E5113A17DD008C46C9 /* cOggDecoder.h */; };
|
||||
7B09C5FE113A17DD008C46C9 /* cPluginManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E6113A17DD008C46C9 /* cPluginManager.h */; };
|
||||
7B09C5FF113A17DD008C46C9 /* cRawAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E7113A17DD008C46C9 /* cRawAudioDecoderFactory.h */; };
|
||||
7B09C600113A17DD008C46C9 /* cRawDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E8113A17DD008C46C9 /* cRawDecoder.h */; };
|
||||
7B09C601113A17DD008C46C9 /* cThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E9113A17DD008C46C9 /* cThread.h */; };
|
||||
7B09C602113A17DD008C46C9 /* cUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5EA113A17DD008C46C9 /* cUtils.h */; };
|
||||
7B09C603113A17DD008C46C9 /* cWavAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5EB113A17DD008C46C9 /* cWavAudioDecoderFactory.h */; };
|
||||
7B09C604113A17DD008C46C9 /* cWavDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5EC113A17DD008C46C9 /* cWavDecoder.h */; };
|
||||
7B09C620113A17E5008C46C9 /* cAudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C606113A17E5008C46C9 /* cAudio.h */; };
|
||||
7B09C621113A17E5008C46C9 /* cAudioDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C607113A17E5008C46C9 /* cAudioDefines.h */; };
|
||||
7B09C622113A17E5008C46C9 /* cAudioPlatform.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C608113A17E5008C46C9 /* cAudioPlatform.h */; };
|
||||
7B09C623113A17E5008C46C9 /* cAudioSleep.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C609113A17E5008C46C9 /* cAudioSleep.h */; };
|
||||
7B09C624113A17E5008C46C9 /* cVector3.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60A113A17E5008C46C9 /* cVector3.h */; };
|
||||
7B09C625113A17E5008C46C9 /* EAudioFormats.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60B113A17E5008C46C9 /* EAudioFormats.h */; };
|
||||
7B09C626113A17E5008C46C9 /* IAudioCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60C113A17E5008C46C9 /* IAudioCapture.h */; };
|
||||
7B09C627113A17E5008C46C9 /* IAudioDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60D113A17E5008C46C9 /* IAudioDecoder.h */; };
|
||||
7B09C628113A17E5008C46C9 /* IAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60E113A17E5008C46C9 /* IAudioDecoderFactory.h */; };
|
||||
7B09C629113A17E5008C46C9 /* IAudioEffects.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60F113A17E5008C46C9 /* IAudioEffects.h */; };
|
||||
7B09C62A113A17E5008C46C9 /* IAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C610113A17E5008C46C9 /* IAudioManager.h */; };
|
||||
7B09C62B113A17E5008C46C9 /* IAudioPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C611113A17E5008C46C9 /* IAudioPlugin.h */; };
|
||||
7B09C62C113A17E5008C46C9 /* IAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C612113A17E5008C46C9 /* IAudioSource.h */; };
|
||||
7B09C62D113A17E5008C46C9 /* ICaptureEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C613113A17E5008C46C9 /* ICaptureEventHandler.h */; };
|
||||
7B09C62E113A17E5008C46C9 /* IDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C614113A17E5008C46C9 /* IDataSource.h */; };
|
||||
7B09C62F113A17E5008C46C9 /* IDataSourceFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C615113A17E5008C46C9 /* IDataSourceFactory.h */; };
|
||||
7B09C630113A17E5008C46C9 /* IEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C616113A17E5008C46C9 /* IEffect.h */; };
|
||||
7B09C631113A17E5008C46C9 /* IEffectParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C617113A17E5008C46C9 /* IEffectParameters.h */; };
|
||||
7B09C632113A17E5008C46C9 /* IFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C618113A17E5008C46C9 /* IFilter.h */; };
|
||||
7B09C633113A17E5008C46C9 /* IListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C619113A17E5008C46C9 /* IListener.h */; };
|
||||
7B09C634113A17E5008C46C9 /* ILogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61A113A17E5008C46C9 /* ILogger.h */; };
|
||||
7B09C635113A17E5008C46C9 /* ILogReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61B113A17E5008C46C9 /* ILogReceiver.h */; };
|
||||
7B09C636113A17E5008C46C9 /* IManagerEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61C113A17E5008C46C9 /* IManagerEventHandler.h */; };
|
||||
7B09C637113A17E5008C46C9 /* IPluginManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61D113A17E5008C46C9 /* IPluginManager.h */; };
|
||||
7B09C638113A17E5008C46C9 /* IRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61E113A17E5008C46C9 /* IRefCounted.h */; };
|
||||
7B09C639113A17E5008C46C9 /* ISourceEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61F113A17E5008C46C9 /* ISourceEventHandler.h */; };
|
||||
7B09C63B113A17F5008C46C9 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B09C63A113A17F5008C46C9 /* OpenAL.framework */; };
|
||||
7B1075AE114845AF0030E6F5 /* cStandardMemoryProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075AA114845AF0030E6F5 /* cStandardMemoryProvider.h */; };
|
||||
7B1075AF114845AF0030E6F5 /* cMemoryTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075AB114845AF0030E6F5 /* cMemoryTracker.h */; };
|
||||
7B1075B0114845AF0030E6F5 /* cMemoryOverride.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075AC114845AF0030E6F5 /* cMemoryOverride.h */; };
|
||||
7B1075B1114845AF0030E6F5 /* cSTLAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075AD114845AF0030E6F5 /* cSTLAllocator.h */; };
|
||||
7B1075B2114845AF0030E6F5 /* cStandardMemoryProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075AA114845AF0030E6F5 /* cStandardMemoryProvider.h */; };
|
||||
7B1075B3114845AF0030E6F5 /* cMemoryTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075AB114845AF0030E6F5 /* cMemoryTracker.h */; };
|
||||
7B1075B4114845AF0030E6F5 /* cMemoryOverride.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075AC114845AF0030E6F5 /* cMemoryOverride.h */; };
|
||||
7B1075B5114845AF0030E6F5 /* cSTLAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075AD114845AF0030E6F5 /* cSTLAllocator.h */; };
|
||||
7B1075B9114846CD0030E6F5 /* cAudioMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B1075B6114846CD0030E6F5 /* cAudioMemory.cpp */; };
|
||||
7B1075BA114846CD0030E6F5 /* cMemoryTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B1075B7114846CD0030E6F5 /* cMemoryTracker.cpp */; };
|
||||
7B1075BB114846CD0030E6F5 /* cStandardMemoryProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B1075B8114846CD0030E6F5 /* cStandardMemoryProvider.cpp */; };
|
||||
7B1075BC114846CD0030E6F5 /* cAudioMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B1075B6114846CD0030E6F5 /* cAudioMemory.cpp */; };
|
||||
7B1075BD114846CD0030E6F5 /* cMemoryTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B1075B7114846CD0030E6F5 /* cMemoryTracker.cpp */; };
|
||||
7B1075BE114846CD0030E6F5 /* cStandardMemoryProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B1075B8114846CD0030E6F5 /* cStandardMemoryProvider.cpp */; };
|
||||
7B1075C0114846EB0030E6F5 /* IMemoryProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075BF114846EB0030E6F5 /* IMemoryProvider.h */; };
|
||||
7B1075C1114846EB0030E6F5 /* IMemoryProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075BF114846EB0030E6F5 /* IMemoryProvider.h */; };
|
||||
7B1075C3114846F00030E6F5 /* cAudioMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075C2114846F00030E6F5 /* cAudioMemory.h */; };
|
||||
7B1075C4114846F00030E6F5 /* cAudioMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1075C2114846F00030E6F5 /* cAudioMemory.h */; };
|
||||
7B891F76113A221E001CDBC6 /* cAudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C606113A17E5008C46C9 /* cAudio.h */; };
|
||||
7B891F77113A221E001CDBC6 /* cAudioDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C607113A17E5008C46C9 /* cAudioDefines.h */; };
|
||||
7B891F78113A221E001CDBC6 /* cAudioPlatform.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C608113A17E5008C46C9 /* cAudioPlatform.h */; };
|
||||
7B891F79113A221E001CDBC6 /* cAudioSleep.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C609113A17E5008C46C9 /* cAudioSleep.h */; };
|
||||
7B891F7A113A221E001CDBC6 /* cVector3.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60A113A17E5008C46C9 /* cVector3.h */; };
|
||||
7B891F7B113A221E001CDBC6 /* EAudioFormats.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60B113A17E5008C46C9 /* EAudioFormats.h */; };
|
||||
7B891F7C113A221E001CDBC6 /* IAudioCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60C113A17E5008C46C9 /* IAudioCapture.h */; };
|
||||
7B891F7D113A221E001CDBC6 /* IAudioDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60D113A17E5008C46C9 /* IAudioDecoder.h */; };
|
||||
7B891F7E113A221E001CDBC6 /* IAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60E113A17E5008C46C9 /* IAudioDecoderFactory.h */; };
|
||||
7B891F7F113A221E001CDBC6 /* IAudioEffects.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C60F113A17E5008C46C9 /* IAudioEffects.h */; };
|
||||
7B891F80113A221E001CDBC6 /* IAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C610113A17E5008C46C9 /* IAudioManager.h */; };
|
||||
7B891F81113A221E001CDBC6 /* IAudioPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C611113A17E5008C46C9 /* IAudioPlugin.h */; };
|
||||
7B891F82113A221E001CDBC6 /* IAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C612113A17E5008C46C9 /* IAudioSource.h */; };
|
||||
7B891F83113A221E001CDBC6 /* ICaptureEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C613113A17E5008C46C9 /* ICaptureEventHandler.h */; };
|
||||
7B891F84113A221E001CDBC6 /* IDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C614113A17E5008C46C9 /* IDataSource.h */; };
|
||||
7B891F85113A221E001CDBC6 /* IDataSourceFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C615113A17E5008C46C9 /* IDataSourceFactory.h */; };
|
||||
7B891F86113A221E001CDBC6 /* IEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C616113A17E5008C46C9 /* IEffect.h */; };
|
||||
7B891F87113A221E001CDBC6 /* IEffectParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C617113A17E5008C46C9 /* IEffectParameters.h */; };
|
||||
7B891F88113A221E001CDBC6 /* IFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C618113A17E5008C46C9 /* IFilter.h */; };
|
||||
7B891F89113A221E001CDBC6 /* IListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C619113A17E5008C46C9 /* IListener.h */; };
|
||||
7B891F8A113A221E001CDBC6 /* ILogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61A113A17E5008C46C9 /* ILogger.h */; };
|
||||
7B891F8B113A221E001CDBC6 /* ILogReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61B113A17E5008C46C9 /* ILogReceiver.h */; };
|
||||
7B891F8C113A221E001CDBC6 /* IManagerEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61C113A17E5008C46C9 /* IManagerEventHandler.h */; };
|
||||
7B891F8D113A221E001CDBC6 /* IPluginManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61D113A17E5008C46C9 /* IPluginManager.h */; };
|
||||
7B891F8E113A221E001CDBC6 /* IRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61E113A17E5008C46C9 /* IRefCounted.h */; };
|
||||
7B891F8F113A221E001CDBC6 /* ISourceEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C61F113A17E5008C46C9 /* ISourceEventHandler.h */; };
|
||||
7B891F90113A2222001CDBC6 /* cAudioCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5D5113A17DD008C46C9 /* cAudioCapture.h */; };
|
||||
7B891F91113A2222001CDBC6 /* cAudioEffects.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5D6113A17DD008C46C9 /* cAudioEffects.h */; };
|
||||
7B891F92113A2222001CDBC6 /* cAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5D7113A17DD008C46C9 /* cAudioManager.h */; };
|
||||
7B891F93113A2222001CDBC6 /* cAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5D8113A17DD008C46C9 /* cAudioSource.h */; };
|
||||
7B891F94113A2222001CDBC6 /* cConsoleLogReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5D9113A17DD008C46C9 /* cConsoleLogReceiver.h */; };
|
||||
7B891F95113A2222001CDBC6 /* cEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DA113A17DD008C46C9 /* cEffect.h */; };
|
||||
7B891F96113A2222001CDBC6 /* cEFXFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DB113A17DD008C46C9 /* cEFXFunctions.h */; };
|
||||
7B891F97113A2222001CDBC6 /* cFileLogReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DC113A17DD008C46C9 /* cFileLogReceiver.h */; };
|
||||
7B891F98113A2222001CDBC6 /* cFileSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DD113A17DD008C46C9 /* cFileSource.h */; };
|
||||
7B891F99113A2222001CDBC6 /* cFileSourceFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DE113A17DD008C46C9 /* cFileSourceFactory.h */; };
|
||||
7B891F9A113A2222001CDBC6 /* cFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5DF113A17DD008C46C9 /* cFilter.h */; };
|
||||
7B891F9B113A2222001CDBC6 /* cListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E0113A17DD008C46C9 /* cListener.h */; };
|
||||
7B891F9C113A2222001CDBC6 /* cLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E1113A17DD008C46C9 /* cLogger.h */; };
|
||||
7B891F9D113A2222001CDBC6 /* cMemorySource.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E2113A17DD008C46C9 /* cMemorySource.h */; };
|
||||
7B891F9E113A2222001CDBC6 /* cMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E3113A17DD008C46C9 /* cMutex.h */; };
|
||||
7B891F9F113A2222001CDBC6 /* cOggAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E4113A17DD008C46C9 /* cOggAudioDecoderFactory.h */; };
|
||||
7B891FA0113A2222001CDBC6 /* cOggDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E5113A17DD008C46C9 /* cOggDecoder.h */; };
|
||||
7B891FA1113A2222001CDBC6 /* cPluginManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E6113A17DD008C46C9 /* cPluginManager.h */; };
|
||||
7B891FA2113A2222001CDBC6 /* cRawAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E7113A17DD008C46C9 /* cRawAudioDecoderFactory.h */; };
|
||||
7B891FA3113A2222001CDBC6 /* cRawDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E8113A17DD008C46C9 /* cRawDecoder.h */; };
|
||||
7B891FA4113A2222001CDBC6 /* cThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5E9113A17DD008C46C9 /* cThread.h */; };
|
||||
7B891FA5113A2222001CDBC6 /* cUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5EA113A17DD008C46C9 /* cUtils.h */; };
|
||||
7B891FA6113A2222001CDBC6 /* cWavAudioDecoderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5EB113A17DD008C46C9 /* cWavAudioDecoderFactory.h */; };
|
||||
7B891FA7113A2222001CDBC6 /* cWavDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B09C5EC113A17DD008C46C9 /* cWavDecoder.h */; };
|
||||
7B891FA8113A2227001CDBC6 /* cAudioCapture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5A8113A17D9008C46C9 /* cAudioCapture.cpp */; };
|
||||
7B891FA9113A2227001CDBC6 /* cAudioEffects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5A9113A17D9008C46C9 /* cAudioEffects.cpp */; };
|
||||
7B891FAA113A2227001CDBC6 /* cAudioManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AA113A17D9008C46C9 /* cAudioManager.cpp */; };
|
||||
7B891FAB113A2227001CDBC6 /* cAudioSleep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AB113A17D9008C46C9 /* cAudioSleep.cpp */; };
|
||||
7B891FAC113A2227001CDBC6 /* cAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AC113A17D9008C46C9 /* cAudioSource.cpp */; };
|
||||
7B891FAD113A2227001CDBC6 /* cConsoleLogReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AD113A17D9008C46C9 /* cConsoleLogReceiver.cpp */; };
|
||||
7B891FAE113A2227001CDBC6 /* cEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AE113A17D9008C46C9 /* cEffect.cpp */; };
|
||||
7B891FAF113A2227001CDBC6 /* cFileLogReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5AF113A17D9008C46C9 /* cFileLogReceiver.cpp */; };
|
||||
7B891FB0113A2227001CDBC6 /* cFileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B0113A17D9008C46C9 /* cFileSource.cpp */; };
|
||||
7B891FB1113A2227001CDBC6 /* cFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B1113A17D9008C46C9 /* cFilter.cpp */; };
|
||||
7B891FB2113A2227001CDBC6 /* cListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B2113A17D9008C46C9 /* cListener.cpp */; };
|
||||
7B891FB3113A2227001CDBC6 /* cLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B3113A17D9008C46C9 /* cLogger.cpp */; };
|
||||
7B891FB4113A2227001CDBC6 /* cMemorySource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B4113A17D9008C46C9 /* cMemorySource.cpp */; };
|
||||
7B891FB5113A2227001CDBC6 /* cMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B5113A17D9008C46C9 /* cMutex.cpp */; };
|
||||
7B891FB6113A2227001CDBC6 /* cOggAudioDecoderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B6113A17D9008C46C9 /* cOggAudioDecoderFactory.cpp */; };
|
||||
7B891FB7113A2227001CDBC6 /* cOggDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B7113A17D9008C46C9 /* cOggDecoder.cpp */; };
|
||||
7B891FB8113A2227001CDBC6 /* cPluginManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B8113A17D9008C46C9 /* cPluginManager.cpp */; };
|
||||
7B891FB9113A2227001CDBC6 /* cRawDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5B9113A17D9008C46C9 /* cRawDecoder.cpp */; };
|
||||
7B891FBA113A2227001CDBC6 /* cThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5BA113A17D9008C46C9 /* cThread.cpp */; };
|
||||
7B891FBB113A2227001CDBC6 /* cWavAudioDecoderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5BB113A17D9008C46C9 /* cWavAudioDecoderFactory.cpp */; };
|
||||
7B891FBC113A2227001CDBC6 /* cWavDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5BC113A17D9008C46C9 /* cWavDecoder.cpp */; };
|
||||
7B891FBD113A2227001CDBC6 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 7B09C5BD113A17D9008C46C9 /* Makefile */; };
|
||||
7B891FC2113A222C001CDBC6 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B09C63A113A17F5008C46C9 /* OpenAL.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
7B09C5A8113A17D9008C46C9 /* cAudioCapture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cAudioCapture.cpp; sourceTree = "<group>"; };
|
||||
7B09C5A9113A17D9008C46C9 /* cAudioEffects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cAudioEffects.cpp; sourceTree = "<group>"; };
|
||||
7B09C5AA113A17D9008C46C9 /* cAudioManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cAudioManager.cpp; sourceTree = "<group>"; };
|
||||
7B09C5AB113A17D9008C46C9 /* cAudioSleep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cAudioSleep.cpp; sourceTree = "<group>"; };
|
||||
7B09C5AC113A17D9008C46C9 /* cAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cAudioSource.cpp; sourceTree = "<group>"; };
|
||||
7B09C5AD113A17D9008C46C9 /* cConsoleLogReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cConsoleLogReceiver.cpp; sourceTree = "<group>"; };
|
||||
7B09C5AE113A17D9008C46C9 /* cEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cEffect.cpp; sourceTree = "<group>"; };
|
||||
7B09C5AF113A17D9008C46C9 /* cFileLogReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cFileLogReceiver.cpp; sourceTree = "<group>"; };
|
||||
7B09C5B0113A17D9008C46C9 /* cFileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cFileSource.cpp; sourceTree = "<group>"; };
|
||||
7B09C5B1113A17D9008C46C9 /* cFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cFilter.cpp; sourceTree = "<group>"; };
|
||||
7B09C5B2113A17D9008C46C9 /* cListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cListener.cpp; sourceTree = "<group>"; };
|
||||
7B09C5B3113A17D9008C46C9 /* cLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cLogger.cpp; sourceTree = "<group>"; };
|
||||
7B09C5B4113A17D9008C46C9 /* cMemorySource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cMemorySource.cpp; sourceTree = "<group>"; };
|
||||
7B09C5B5113A17D9008C46C9 /* cMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cMutex.cpp; sourceTree = "<group>"; };
|
||||
7B09C5B6113A17D9008C46C9 /* cOggAudioDecoderFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cOggAudioDecoderFactory.cpp; sourceTree = "<group>"; };
|
||||
7B09C5B7113A17D9008C46C9 /* cOggDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cOggDecoder.cpp; sourceTree = "<group>"; };
|
||||
7B09C5B8113A17D9008C46C9 /* cPluginManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cPluginManager.cpp; sourceTree = "<group>"; };
|
||||
7B09C5B9113A17D9008C46C9 /* cRawDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cRawDecoder.cpp; sourceTree = "<group>"; };
|
||||
7B09C5BA113A17D9008C46C9 /* cThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cThread.cpp; sourceTree = "<group>"; };
|
||||
7B09C5BB113A17D9008C46C9 /* cWavAudioDecoderFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cWavAudioDecoderFactory.cpp; sourceTree = "<group>"; };
|
||||
7B09C5BC113A17D9008C46C9 /* cWavDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cWavDecoder.cpp; sourceTree = "<group>"; };
|
||||
7B09C5BD113A17D9008C46C9 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
|
||||
7B09C5D5113A17DD008C46C9 /* cAudioCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAudioCapture.h; sourceTree = "<group>"; };
|
||||
7B09C5D6113A17DD008C46C9 /* cAudioEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAudioEffects.h; sourceTree = "<group>"; };
|
||||
7B09C5D7113A17DD008C46C9 /* cAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAudioManager.h; sourceTree = "<group>"; };
|
||||
7B09C5D8113A17DD008C46C9 /* cAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAudioSource.h; sourceTree = "<group>"; };
|
||||
7B09C5D9113A17DD008C46C9 /* cConsoleLogReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cConsoleLogReceiver.h; sourceTree = "<group>"; };
|
||||
7B09C5DA113A17DD008C46C9 /* cEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cEffect.h; sourceTree = "<group>"; };
|
||||
7B09C5DB113A17DD008C46C9 /* cEFXFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cEFXFunctions.h; sourceTree = "<group>"; };
|
||||
7B09C5DC113A17DD008C46C9 /* cFileLogReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cFileLogReceiver.h; sourceTree = "<group>"; };
|
||||
7B09C5DD113A17DD008C46C9 /* cFileSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cFileSource.h; sourceTree = "<group>"; };
|
||||
7B09C5DE113A17DD008C46C9 /* cFileSourceFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cFileSourceFactory.h; sourceTree = "<group>"; };
|
||||
7B09C5DF113A17DD008C46C9 /* cFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cFilter.h; sourceTree = "<group>"; };
|
||||
7B09C5E0113A17DD008C46C9 /* cListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cListener.h; sourceTree = "<group>"; };
|
||||
7B09C5E1113A17DD008C46C9 /* cLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cLogger.h; sourceTree = "<group>"; };
|
||||
7B09C5E2113A17DD008C46C9 /* cMemorySource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cMemorySource.h; sourceTree = "<group>"; };
|
||||
7B09C5E3113A17DD008C46C9 /* cMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cMutex.h; sourceTree = "<group>"; };
|
||||
7B09C5E4113A17DD008C46C9 /* cOggAudioDecoderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cOggAudioDecoderFactory.h; sourceTree = "<group>"; };
|
||||
7B09C5E5113A17DD008C46C9 /* cOggDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cOggDecoder.h; sourceTree = "<group>"; };
|
||||
7B09C5E6113A17DD008C46C9 /* cPluginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cPluginManager.h; sourceTree = "<group>"; };
|
||||
7B09C5E7113A17DD008C46C9 /* cRawAudioDecoderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cRawAudioDecoderFactory.h; sourceTree = "<group>"; };
|
||||
7B09C5E8113A17DD008C46C9 /* cRawDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cRawDecoder.h; sourceTree = "<group>"; };
|
||||
7B09C5E9113A17DD008C46C9 /* cThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cThread.h; sourceTree = "<group>"; };
|
||||
7B09C5EA113A17DD008C46C9 /* cUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cUtils.h; sourceTree = "<group>"; };
|
||||
7B09C5EB113A17DD008C46C9 /* cWavAudioDecoderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cWavAudioDecoderFactory.h; sourceTree = "<group>"; };
|
||||
7B09C5EC113A17DD008C46C9 /* cWavDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cWavDecoder.h; sourceTree = "<group>"; };
|
||||
7B09C606113A17E5008C46C9 /* cAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAudio.h; sourceTree = "<group>"; };
|
||||
7B09C607113A17E5008C46C9 /* cAudioDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAudioDefines.h; sourceTree = "<group>"; };
|
||||
7B09C608113A17E5008C46C9 /* cAudioPlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAudioPlatform.h; sourceTree = "<group>"; };
|
||||
7B09C609113A17E5008C46C9 /* cAudioSleep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAudioSleep.h; sourceTree = "<group>"; };
|
||||
7B09C60A113A17E5008C46C9 /* cVector3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cVector3.h; sourceTree = "<group>"; };
|
||||
7B09C60B113A17E5008C46C9 /* EAudioFormats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EAudioFormats.h; sourceTree = "<group>"; };
|
||||
7B09C60C113A17E5008C46C9 /* IAudioCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IAudioCapture.h; sourceTree = "<group>"; };
|
||||
7B09C60D113A17E5008C46C9 /* IAudioDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IAudioDecoder.h; sourceTree = "<group>"; };
|
||||
7B09C60E113A17E5008C46C9 /* IAudioDecoderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IAudioDecoderFactory.h; sourceTree = "<group>"; };
|
||||
7B09C60F113A17E5008C46C9 /* IAudioEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IAudioEffects.h; sourceTree = "<group>"; };
|
||||
7B09C610113A17E5008C46C9 /* IAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IAudioManager.h; sourceTree = "<group>"; };
|
||||
7B09C611113A17E5008C46C9 /* IAudioPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IAudioPlugin.h; sourceTree = "<group>"; };
|
||||
7B09C612113A17E5008C46C9 /* IAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IAudioSource.h; sourceTree = "<group>"; };
|
||||
7B09C613113A17E5008C46C9 /* ICaptureEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICaptureEventHandler.h; sourceTree = "<group>"; };
|
||||
7B09C614113A17E5008C46C9 /* IDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDataSource.h; sourceTree = "<group>"; };
|
||||
7B09C615113A17E5008C46C9 /* IDataSourceFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDataSourceFactory.h; sourceTree = "<group>"; };
|
||||
7B09C616113A17E5008C46C9 /* IEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IEffect.h; sourceTree = "<group>"; };
|
||||
7B09C617113A17E5008C46C9 /* IEffectParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IEffectParameters.h; sourceTree = "<group>"; };
|
||||
7B09C618113A17E5008C46C9 /* IFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IFilter.h; sourceTree = "<group>"; };
|
||||
7B09C619113A17E5008C46C9 /* IListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IListener.h; sourceTree = "<group>"; };
|
||||
7B09C61A113A17E5008C46C9 /* ILogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ILogger.h; sourceTree = "<group>"; };
|
||||
7B09C61B113A17E5008C46C9 /* ILogReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ILogReceiver.h; sourceTree = "<group>"; };
|
||||
7B09C61C113A17E5008C46C9 /* IManagerEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IManagerEventHandler.h; sourceTree = "<group>"; };
|
||||
7B09C61D113A17E5008C46C9 /* IPluginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IPluginManager.h; sourceTree = "<group>"; };
|
||||
7B09C61E113A17E5008C46C9 /* IRefCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRefCounted.h; sourceTree = "<group>"; };
|
||||
7B09C61F113A17E5008C46C9 /* ISourceEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISourceEventHandler.h; sourceTree = "<group>"; };
|
||||
7B09C63A113A17F5008C46C9 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = /System/Library/Frameworks/OpenAL.framework; sourceTree = "<absolute>"; };
|
||||
7B1075AA114845AF0030E6F5 /* cStandardMemoryProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cStandardMemoryProvider.h; sourceTree = "<group>"; };
|
||||
7B1075AB114845AF0030E6F5 /* cMemoryTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cMemoryTracker.h; sourceTree = "<group>"; };
|
||||
7B1075AC114845AF0030E6F5 /* cMemoryOverride.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cMemoryOverride.h; sourceTree = "<group>"; };
|
||||
7B1075AD114845AF0030E6F5 /* cSTLAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cSTLAllocator.h; sourceTree = "<group>"; };
|
||||
7B1075B6114846CD0030E6F5 /* cAudioMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cAudioMemory.cpp; sourceTree = "<group>"; };
|
||||
7B1075B7114846CD0030E6F5 /* cMemoryTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cMemoryTracker.cpp; sourceTree = "<group>"; };
|
||||
7B1075B8114846CD0030E6F5 /* cStandardMemoryProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cStandardMemoryProvider.cpp; sourceTree = "<group>"; };
|
||||
7B1075BF114846EB0030E6F5 /* IMemoryProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMemoryProvider.h; sourceTree = "<group>"; };
|
||||
7B1075C2114846F00030E6F5 /* cAudioMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAudioMemory.h; sourceTree = "<group>"; };
|
||||
7B891F72113A21C9001CDBC6 /* liblibcAudio.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblibcAudio.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D2AAC09D05546B4700DB518D /* libcAudio.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libcAudio.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
7B891F70113A21C9001CDBC6 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B891FC2113A222C001CDBC6 /* OpenAL.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D2AAC09B05546B4700DB518D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B09C63B113A17F5008C46C9 /* OpenAL.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
034768DDFF38A45A11DB9C8B /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2AAC09D05546B4700DB518D /* libcAudio.dylib */,
|
||||
7B891F72113A21C9001CDBC6 /* liblibcAudio.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0867D691FE84028FC02AAC07 /* cAudio-Osx */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B09C605113A17E5008C46C9 /* include */,
|
||||
7B09C5D4113A17DD008C46C9 /* Headers */,
|
||||
7B09C5A7113A17D9008C46C9 /* Source */,
|
||||
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
|
||||
034768DDFF38A45A11DB9C8B /* Products */,
|
||||
);
|
||||
name = "cAudio-Osx";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B09C63A113A17F5008C46C9 /* OpenAL.framework */,
|
||||
);
|
||||
name = "External Frameworks and Libraries";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B09C5A7113A17D9008C46C9 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B09C5A8113A17D9008C46C9 /* cAudioCapture.cpp */,
|
||||
7B09C5A9113A17D9008C46C9 /* cAudioEffects.cpp */,
|
||||
7B09C5AA113A17D9008C46C9 /* cAudioManager.cpp */,
|
||||
7B09C5AB113A17D9008C46C9 /* cAudioSleep.cpp */,
|
||||
7B09C5AC113A17D9008C46C9 /* cAudioSource.cpp */,
|
||||
7B09C5AD113A17D9008C46C9 /* cConsoleLogReceiver.cpp */,
|
||||
7B09C5AE113A17D9008C46C9 /* cEffect.cpp */,
|
||||
7B09C5AF113A17D9008C46C9 /* cFileLogReceiver.cpp */,
|
||||
7B09C5B0113A17D9008C46C9 /* cFileSource.cpp */,
|
||||
7B1075B6114846CD0030E6F5 /* cAudioMemory.cpp */,
|
||||
7B1075B7114846CD0030E6F5 /* cMemoryTracker.cpp */,
|
||||
7B1075B8114846CD0030E6F5 /* cStandardMemoryProvider.cpp */,
|
||||
7B09C5B1113A17D9008C46C9 /* cFilter.cpp */,
|
||||
7B09C5B2113A17D9008C46C9 /* cListener.cpp */,
|
||||
7B09C5B3113A17D9008C46C9 /* cLogger.cpp */,
|
||||
7B09C5B4113A17D9008C46C9 /* cMemorySource.cpp */,
|
||||
7B09C5B5113A17D9008C46C9 /* cMutex.cpp */,
|
||||
7B09C5B6113A17D9008C46C9 /* cOggAudioDecoderFactory.cpp */,
|
||||
7B09C5B7113A17D9008C46C9 /* cOggDecoder.cpp */,
|
||||
7B09C5B8113A17D9008C46C9 /* cPluginManager.cpp */,
|
||||
7B09C5B9113A17D9008C46C9 /* cRawDecoder.cpp */,
|
||||
7B09C5BA113A17D9008C46C9 /* cThread.cpp */,
|
||||
7B09C5BB113A17D9008C46C9 /* cWavAudioDecoderFactory.cpp */,
|
||||
7B09C5BC113A17D9008C46C9 /* cWavDecoder.cpp */,
|
||||
7B09C5BD113A17D9008C46C9 /* Makefile */,
|
||||
);
|
||||
path = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B09C5D4113A17DD008C46C9 /* Headers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B09C5D5113A17DD008C46C9 /* cAudioCapture.h */,
|
||||
7B09C5D6113A17DD008C46C9 /* cAudioEffects.h */,
|
||||
7B09C5D7113A17DD008C46C9 /* cAudioManager.h */,
|
||||
7B09C5D8113A17DD008C46C9 /* cAudioSource.h */,
|
||||
7B09C5D9113A17DD008C46C9 /* cConsoleLogReceiver.h */,
|
||||
7B1075AA114845AF0030E6F5 /* cStandardMemoryProvider.h */,
|
||||
7B1075AB114845AF0030E6F5 /* cMemoryTracker.h */,
|
||||
7B1075AC114845AF0030E6F5 /* cMemoryOverride.h */,
|
||||
7B1075AD114845AF0030E6F5 /* cSTLAllocator.h */,
|
||||
7B09C5DA113A17DD008C46C9 /* cEffect.h */,
|
||||
7B09C5DB113A17DD008C46C9 /* cEFXFunctions.h */,
|
||||
7B09C5DC113A17DD008C46C9 /* cFileLogReceiver.h */,
|
||||
7B09C5DD113A17DD008C46C9 /* cFileSource.h */,
|
||||
7B09C5DE113A17DD008C46C9 /* cFileSourceFactory.h */,
|
||||
7B09C5DF113A17DD008C46C9 /* cFilter.h */,
|
||||
7B09C5E0113A17DD008C46C9 /* cListener.h */,
|
||||
7B09C5E1113A17DD008C46C9 /* cLogger.h */,
|
||||
7B09C5E2113A17DD008C46C9 /* cMemorySource.h */,
|
||||
7B09C5E3113A17DD008C46C9 /* cMutex.h */,
|
||||
7B09C5E4113A17DD008C46C9 /* cOggAudioDecoderFactory.h */,
|
||||
7B09C5E5113A17DD008C46C9 /* cOggDecoder.h */,
|
||||
7B09C5E6113A17DD008C46C9 /* cPluginManager.h */,
|
||||
7B09C5E7113A17DD008C46C9 /* cRawAudioDecoderFactory.h */,
|
||||
7B09C5E8113A17DD008C46C9 /* cRawDecoder.h */,
|
||||
7B09C5E9113A17DD008C46C9 /* cThread.h */,
|
||||
7B09C5EA113A17DD008C46C9 /* cUtils.h */,
|
||||
7B09C5EB113A17DD008C46C9 /* cWavAudioDecoderFactory.h */,
|
||||
7B09C5EC113A17DD008C46C9 /* cWavDecoder.h */,
|
||||
);
|
||||
path = Headers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B09C605113A17E5008C46C9 /* include */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B09C606113A17E5008C46C9 /* cAudio.h */,
|
||||
7B09C607113A17E5008C46C9 /* cAudioDefines.h */,
|
||||
7B09C608113A17E5008C46C9 /* cAudioPlatform.h */,
|
||||
7B09C609113A17E5008C46C9 /* cAudioSleep.h */,
|
||||
7B09C60A113A17E5008C46C9 /* cVector3.h */,
|
||||
7B09C60B113A17E5008C46C9 /* EAudioFormats.h */,
|
||||
7B09C60C113A17E5008C46C9 /* IAudioCapture.h */,
|
||||
7B09C60D113A17E5008C46C9 /* IAudioDecoder.h */,
|
||||
7B09C60E113A17E5008C46C9 /* IAudioDecoderFactory.h */,
|
||||
7B1075BF114846EB0030E6F5 /* IMemoryProvider.h */,
|
||||
7B09C60F113A17E5008C46C9 /* IAudioEffects.h */,
|
||||
7B09C610113A17E5008C46C9 /* IAudioManager.h */,
|
||||
7B09C611113A17E5008C46C9 /* IAudioPlugin.h */,
|
||||
7B09C612113A17E5008C46C9 /* IAudioSource.h */,
|
||||
7B09C613113A17E5008C46C9 /* ICaptureEventHandler.h */,
|
||||
7B1075C2114846F00030E6F5 /* cAudioMemory.h */,
|
||||
7B09C614113A17E5008C46C9 /* IDataSource.h */,
|
||||
7B09C615113A17E5008C46C9 /* IDataSourceFactory.h */,
|
||||
7B09C616113A17E5008C46C9 /* IEffect.h */,
|
||||
7B09C617113A17E5008C46C9 /* IEffectParameters.h */,
|
||||
7B09C618113A17E5008C46C9 /* IFilter.h */,
|
||||
7B09C619113A17E5008C46C9 /* IListener.h */,
|
||||
7B09C61A113A17E5008C46C9 /* ILogger.h */,
|
||||
7B09C61B113A17E5008C46C9 /* ILogReceiver.h */,
|
||||
7B09C61C113A17E5008C46C9 /* IManagerEventHandler.h */,
|
||||
7B09C61D113A17E5008C46C9 /* IPluginManager.h */,
|
||||
7B09C61E113A17E5008C46C9 /* IRefCounted.h */,
|
||||
7B09C61F113A17E5008C46C9 /* ISourceEventHandler.h */,
|
||||
);
|
||||
path = include;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
7B891F6E113A21C9001CDBC6 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B891F76113A221E001CDBC6 /* cAudio.h in Headers */,
|
||||
7B891F77113A221E001CDBC6 /* cAudioDefines.h in Headers */,
|
||||
7B891F78113A221E001CDBC6 /* cAudioPlatform.h in Headers */,
|
||||
7B891F79113A221E001CDBC6 /* cAudioSleep.h in Headers */,
|
||||
7B891F7A113A221E001CDBC6 /* cVector3.h in Headers */,
|
||||
7B891F7B113A221E001CDBC6 /* EAudioFormats.h in Headers */,
|
||||
7B891F7C113A221E001CDBC6 /* IAudioCapture.h in Headers */,
|
||||
7B891F7D113A221E001CDBC6 /* IAudioDecoder.h in Headers */,
|
||||
7B891F7E113A221E001CDBC6 /* IAudioDecoderFactory.h in Headers */,
|
||||
7B891F7F113A221E001CDBC6 /* IAudioEffects.h in Headers */,
|
||||
7B891F80113A221E001CDBC6 /* IAudioManager.h in Headers */,
|
||||
7B891F81113A221E001CDBC6 /* IAudioPlugin.h in Headers */,
|
||||
7B891F82113A221E001CDBC6 /* IAudioSource.h in Headers */,
|
||||
7B891F83113A221E001CDBC6 /* ICaptureEventHandler.h in Headers */,
|
||||
7B891F84113A221E001CDBC6 /* IDataSource.h in Headers */,
|
||||
7B891F85113A221E001CDBC6 /* IDataSourceFactory.h in Headers */,
|
||||
7B891F86113A221E001CDBC6 /* IEffect.h in Headers */,
|
||||
7B891F87113A221E001CDBC6 /* IEffectParameters.h in Headers */,
|
||||
7B891F88113A221E001CDBC6 /* IFilter.h in Headers */,
|
||||
7B891F89113A221E001CDBC6 /* IListener.h in Headers */,
|
||||
7B891F8A113A221E001CDBC6 /* ILogger.h in Headers */,
|
||||
7B891F8B113A221E001CDBC6 /* ILogReceiver.h in Headers */,
|
||||
7B891F8C113A221E001CDBC6 /* IManagerEventHandler.h in Headers */,
|
||||
7B891F8D113A221E001CDBC6 /* IPluginManager.h in Headers */,
|
||||
7B891F8E113A221E001CDBC6 /* IRefCounted.h in Headers */,
|
||||
7B891F8F113A221E001CDBC6 /* ISourceEventHandler.h in Headers */,
|
||||
7B891F90113A2222001CDBC6 /* cAudioCapture.h in Headers */,
|
||||
7B891F91113A2222001CDBC6 /* cAudioEffects.h in Headers */,
|
||||
7B891F92113A2222001CDBC6 /* cAudioManager.h in Headers */,
|
||||
7B891F93113A2222001CDBC6 /* cAudioSource.h in Headers */,
|
||||
7B891F94113A2222001CDBC6 /* cConsoleLogReceiver.h in Headers */,
|
||||
7B891F95113A2222001CDBC6 /* cEffect.h in Headers */,
|
||||
7B891F96113A2222001CDBC6 /* cEFXFunctions.h in Headers */,
|
||||
7B891F97113A2222001CDBC6 /* cFileLogReceiver.h in Headers */,
|
||||
7B891F98113A2222001CDBC6 /* cFileSource.h in Headers */,
|
||||
7B891F99113A2222001CDBC6 /* cFileSourceFactory.h in Headers */,
|
||||
7B891F9A113A2222001CDBC6 /* cFilter.h in Headers */,
|
||||
7B891F9B113A2222001CDBC6 /* cListener.h in Headers */,
|
||||
7B891F9C113A2222001CDBC6 /* cLogger.h in Headers */,
|
||||
7B891F9D113A2222001CDBC6 /* cMemorySource.h in Headers */,
|
||||
7B891F9E113A2222001CDBC6 /* cMutex.h in Headers */,
|
||||
7B891F9F113A2222001CDBC6 /* cOggAudioDecoderFactory.h in Headers */,
|
||||
7B891FA0113A2222001CDBC6 /* cOggDecoder.h in Headers */,
|
||||
7B891FA1113A2222001CDBC6 /* cPluginManager.h in Headers */,
|
||||
7B891FA2113A2222001CDBC6 /* cRawAudioDecoderFactory.h in Headers */,
|
||||
7B891FA3113A2222001CDBC6 /* cRawDecoder.h in Headers */,
|
||||
7B891FA4113A2222001CDBC6 /* cThread.h in Headers */,
|
||||
7B891FA5113A2222001CDBC6 /* cUtils.h in Headers */,
|
||||
7B891FA6113A2222001CDBC6 /* cWavAudioDecoderFactory.h in Headers */,
|
||||
7B891FA7113A2222001CDBC6 /* cWavDecoder.h in Headers */,
|
||||
7B1075B2114845AF0030E6F5 /* cStandardMemoryProvider.h in Headers */,
|
||||
7B1075B3114845AF0030E6F5 /* cMemoryTracker.h in Headers */,
|
||||
7B1075B4114845AF0030E6F5 /* cMemoryOverride.h in Headers */,
|
||||
7B1075B5114845AF0030E6F5 /* cSTLAllocator.h in Headers */,
|
||||
7B1075C1114846EB0030E6F5 /* IMemoryProvider.h in Headers */,
|
||||
7B1075C4114846F00030E6F5 /* cAudioMemory.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D2AAC09905546B4700DB518D /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B09C5ED113A17DD008C46C9 /* cAudioCapture.h in Headers */,
|
||||
7B09C5EE113A17DD008C46C9 /* cAudioEffects.h in Headers */,
|
||||
7B09C5EF113A17DD008C46C9 /* cAudioManager.h in Headers */,
|
||||
7B09C5F0113A17DD008C46C9 /* cAudioSource.h in Headers */,
|
||||
7B09C5F1113A17DD008C46C9 /* cConsoleLogReceiver.h in Headers */,
|
||||
7B09C5F2113A17DD008C46C9 /* cEffect.h in Headers */,
|
||||
7B09C5F3113A17DD008C46C9 /* cEFXFunctions.h in Headers */,
|
||||
7B09C5F4113A17DD008C46C9 /* cFileLogReceiver.h in Headers */,
|
||||
7B09C5F5113A17DD008C46C9 /* cFileSource.h in Headers */,
|
||||
7B09C5F6113A17DD008C46C9 /* cFileSourceFactory.h in Headers */,
|
||||
7B09C5F7113A17DD008C46C9 /* cFilter.h in Headers */,
|
||||
7B09C5F8113A17DD008C46C9 /* cListener.h in Headers */,
|
||||
7B09C5F9113A17DD008C46C9 /* cLogger.h in Headers */,
|
||||
7B09C5FA113A17DD008C46C9 /* cMemorySource.h in Headers */,
|
||||
7B09C5FB113A17DD008C46C9 /* cMutex.h in Headers */,
|
||||
7B09C5FC113A17DD008C46C9 /* cOggAudioDecoderFactory.h in Headers */,
|
||||
7B09C5FD113A17DD008C46C9 /* cOggDecoder.h in Headers */,
|
||||
7B09C5FE113A17DD008C46C9 /* cPluginManager.h in Headers */,
|
||||
7B09C5FF113A17DD008C46C9 /* cRawAudioDecoderFactory.h in Headers */,
|
||||
7B09C600113A17DD008C46C9 /* cRawDecoder.h in Headers */,
|
||||
7B09C601113A17DD008C46C9 /* cThread.h in Headers */,
|
||||
7B09C602113A17DD008C46C9 /* cUtils.h in Headers */,
|
||||
7B09C603113A17DD008C46C9 /* cWavAudioDecoderFactory.h in Headers */,
|
||||
7B09C604113A17DD008C46C9 /* cWavDecoder.h in Headers */,
|
||||
7B09C620113A17E5008C46C9 /* cAudio.h in Headers */,
|
||||
7B09C621113A17E5008C46C9 /* cAudioDefines.h in Headers */,
|
||||
7B09C622113A17E5008C46C9 /* cAudioPlatform.h in Headers */,
|
||||
7B09C623113A17E5008C46C9 /* cAudioSleep.h in Headers */,
|
||||
7B09C624113A17E5008C46C9 /* cVector3.h in Headers */,
|
||||
7B09C625113A17E5008C46C9 /* EAudioFormats.h in Headers */,
|
||||
7B09C626113A17E5008C46C9 /* IAudioCapture.h in Headers */,
|
||||
7B09C627113A17E5008C46C9 /* IAudioDecoder.h in Headers */,
|
||||
7B09C628113A17E5008C46C9 /* IAudioDecoderFactory.h in Headers */,
|
||||
7B09C629113A17E5008C46C9 /* IAudioEffects.h in Headers */,
|
||||
7B09C62A113A17E5008C46C9 /* IAudioManager.h in Headers */,
|
||||
7B09C62B113A17E5008C46C9 /* IAudioPlugin.h in Headers */,
|
||||
7B09C62C113A17E5008C46C9 /* IAudioSource.h in Headers */,
|
||||
7B09C62D113A17E5008C46C9 /* ICaptureEventHandler.h in Headers */,
|
||||
7B09C62E113A17E5008C46C9 /* IDataSource.h in Headers */,
|
||||
7B09C62F113A17E5008C46C9 /* IDataSourceFactory.h in Headers */,
|
||||
7B09C630113A17E5008C46C9 /* IEffect.h in Headers */,
|
||||
7B09C631113A17E5008C46C9 /* IEffectParameters.h in Headers */,
|
||||
7B09C632113A17E5008C46C9 /* IFilter.h in Headers */,
|
||||
7B09C633113A17E5008C46C9 /* IListener.h in Headers */,
|
||||
7B09C634113A17E5008C46C9 /* ILogger.h in Headers */,
|
||||
7B09C635113A17E5008C46C9 /* ILogReceiver.h in Headers */,
|
||||
7B09C636113A17E5008C46C9 /* IManagerEventHandler.h in Headers */,
|
||||
7B09C637113A17E5008C46C9 /* IPluginManager.h in Headers */,
|
||||
7B09C638113A17E5008C46C9 /* IRefCounted.h in Headers */,
|
||||
7B09C639113A17E5008C46C9 /* ISourceEventHandler.h in Headers */,
|
||||
7B1075AE114845AF0030E6F5 /* cStandardMemoryProvider.h in Headers */,
|
||||
7B1075AF114845AF0030E6F5 /* cMemoryTracker.h in Headers */,
|
||||
7B1075B0114845AF0030E6F5 /* cMemoryOverride.h in Headers */,
|
||||
7B1075B1114845AF0030E6F5 /* cSTLAllocator.h in Headers */,
|
||||
7B1075C0114846EB0030E6F5 /* IMemoryProvider.h in Headers */,
|
||||
7B1075C3114846F00030E6F5 /* cAudioMemory.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
7B891F71113A21C9001CDBC6 /* cAudio-Osx(static) */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 7B891F75113A21EA001CDBC6 /* Build configuration list for PBXNativeTarget "cAudio-Osx(static)" */;
|
||||
buildPhases = (
|
||||
7B891F6E113A21C9001CDBC6 /* Headers */,
|
||||
7B891F6F113A21C9001CDBC6 /* Sources */,
|
||||
7B891F70113A21C9001CDBC6 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "cAudio-Osx(static)";
|
||||
productName = "cAudio-Osx(static)";
|
||||
productReference = 7B891F72113A21C9001CDBC6 /* liblibcAudio.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
D2AAC09C05546B4700DB518D /* cAudio-Osx */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB916008733D950010E9CD /* Build configuration list for PBXNativeTarget "cAudio-Osx" */;
|
||||
buildPhases = (
|
||||
D2AAC09905546B4700DB518D /* Headers */,
|
||||
D2AAC09B05546B4700DB518D /* Frameworks */,
|
||||
D2AAC09A05546B4700DB518D /* Sources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "cAudio-Osx";
|
||||
productName = "libcAudio-Osx";
|
||||
productReference = D2AAC09D05546B4700DB518D /* libcAudio.dylib */;
|
||||
productType = "com.apple.product-type.library.dynamic";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
0867D690FE84028FC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB916408733D950010E9CD /* Build configuration list for PBXProject "cAudio-Osx" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 0867D691FE84028FC02AAC07 /* cAudio-Osx */;
|
||||
productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D2AAC09C05546B4700DB518D /* cAudio-Osx */,
|
||||
7B891F71113A21C9001CDBC6 /* cAudio-Osx(static) */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
7B891F6F113A21C9001CDBC6 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B891FA8113A2227001CDBC6 /* cAudioCapture.cpp in Sources */,
|
||||
7B891FA9113A2227001CDBC6 /* cAudioEffects.cpp in Sources */,
|
||||
7B891FAA113A2227001CDBC6 /* cAudioManager.cpp in Sources */,
|
||||
7B891FAB113A2227001CDBC6 /* cAudioSleep.cpp in Sources */,
|
||||
7B891FAC113A2227001CDBC6 /* cAudioSource.cpp in Sources */,
|
||||
7B891FAD113A2227001CDBC6 /* cConsoleLogReceiver.cpp in Sources */,
|
||||
7B891FAE113A2227001CDBC6 /* cEffect.cpp in Sources */,
|
||||
7B891FAF113A2227001CDBC6 /* cFileLogReceiver.cpp in Sources */,
|
||||
7B891FB0113A2227001CDBC6 /* cFileSource.cpp in Sources */,
|
||||
7B891FB1113A2227001CDBC6 /* cFilter.cpp in Sources */,
|
||||
7B891FB2113A2227001CDBC6 /* cListener.cpp in Sources */,
|
||||
7B891FB3113A2227001CDBC6 /* cLogger.cpp in Sources */,
|
||||
7B891FB4113A2227001CDBC6 /* cMemorySource.cpp in Sources */,
|
||||
7B891FB5113A2227001CDBC6 /* cMutex.cpp in Sources */,
|
||||
7B891FB6113A2227001CDBC6 /* cOggAudioDecoderFactory.cpp in Sources */,
|
||||
7B891FB7113A2227001CDBC6 /* cOggDecoder.cpp in Sources */,
|
||||
7B891FB8113A2227001CDBC6 /* cPluginManager.cpp in Sources */,
|
||||
7B891FB9113A2227001CDBC6 /* cRawDecoder.cpp in Sources */,
|
||||
7B891FBA113A2227001CDBC6 /* cThread.cpp in Sources */,
|
||||
7B891FBB113A2227001CDBC6 /* cWavAudioDecoderFactory.cpp in Sources */,
|
||||
7B891FBC113A2227001CDBC6 /* cWavDecoder.cpp in Sources */,
|
||||
7B891FBD113A2227001CDBC6 /* Makefile in Sources */,
|
||||
7B1075BC114846CD0030E6F5 /* cAudioMemory.cpp in Sources */,
|
||||
7B1075BD114846CD0030E6F5 /* cMemoryTracker.cpp in Sources */,
|
||||
7B1075BE114846CD0030E6F5 /* cStandardMemoryProvider.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D2AAC09A05546B4700DB518D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B09C5BE113A17D9008C46C9 /* cAudioCapture.cpp in Sources */,
|
||||
7B09C5BF113A17D9008C46C9 /* cAudioEffects.cpp in Sources */,
|
||||
7B09C5C0113A17D9008C46C9 /* cAudioManager.cpp in Sources */,
|
||||
7B09C5C1113A17D9008C46C9 /* cAudioSleep.cpp in Sources */,
|
||||
7B09C5C2113A17D9008C46C9 /* cAudioSource.cpp in Sources */,
|
||||
7B09C5C3113A17D9008C46C9 /* cConsoleLogReceiver.cpp in Sources */,
|
||||
7B09C5C4113A17D9008C46C9 /* cEffect.cpp in Sources */,
|
||||
7B09C5C5113A17D9008C46C9 /* cFileLogReceiver.cpp in Sources */,
|
||||
7B09C5C6113A17D9008C46C9 /* cFileSource.cpp in Sources */,
|
||||
7B09C5C7113A17D9008C46C9 /* cFilter.cpp in Sources */,
|
||||
7B09C5C8113A17D9008C46C9 /* cListener.cpp in Sources */,
|
||||
7B09C5C9113A17D9008C46C9 /* cLogger.cpp in Sources */,
|
||||
7B09C5CA113A17D9008C46C9 /* cMemorySource.cpp in Sources */,
|
||||
7B09C5CB113A17D9008C46C9 /* cMutex.cpp in Sources */,
|
||||
7B09C5CC113A17D9008C46C9 /* cOggAudioDecoderFactory.cpp in Sources */,
|
||||
7B09C5CD113A17D9008C46C9 /* cOggDecoder.cpp in Sources */,
|
||||
7B09C5CE113A17D9008C46C9 /* cPluginManager.cpp in Sources */,
|
||||
7B09C5CF113A17D9008C46C9 /* cRawDecoder.cpp in Sources */,
|
||||
7B09C5D0113A17D9008C46C9 /* cThread.cpp in Sources */,
|
||||
7B09C5D1113A17D9008C46C9 /* cWavAudioDecoderFactory.cpp in Sources */,
|
||||
7B09C5D2113A17D9008C46C9 /* cWavDecoder.cpp in Sources */,
|
||||
7B09C5D3113A17D9008C46C9 /* Makefile in Sources */,
|
||||
7B1075B9114846CD0030E6F5 /* cAudioMemory.cpp in Sources */,
|
||||
7B1075BA114846CD0030E6F5 /* cMemoryTracker.cpp in Sources */,
|
||||
7B1075BB114846CD0030E6F5 /* cStandardMemoryProvider.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB916108733D950010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"_GLIBCXX_DEBUG=1",
|
||||
"_GLIBCXX_DEBUG_PEDANTIC=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"Headers\"",
|
||||
"\"dependencies/Headers\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = (
|
||||
"\"dependencies/Libs/Osx/libvorbisfile.a\"",
|
||||
"\"dependencies/Libs/Osx/libogg.a\"",
|
||||
"\"dependencies/Libs/Osx/libvorbis.a\"",
|
||||
);
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB916208733D950010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"Headers\"",
|
||||
"\"dependencies/Headers\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = (
|
||||
"\"dependencies/Libs/Osx/libvorbisenc.a\"",
|
||||
"\"dependencies/Libs/Osx/libvorbis.a\"",
|
||||
"\"dependencies/Libs/Osx/libvorbisfile.a\"",
|
||||
"\"dependencies/Libs/Osx/libogg.a\"",
|
||||
);
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_STYLE = "non-global";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB916508733D950010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = libcAudio_d;
|
||||
SDKROOT = macosx10.5;
|
||||
SYMROOT = bin/Osx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB916608733D950010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/";
|
||||
CONFIGURATION_TEMP_DIR = .;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = libcAudio;
|
||||
SDKROOT = macosx10.5;
|
||||
SYMROOT = bin/Osx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
7B891F73113A21CA001CDBC6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"Headers\"",
|
||||
"\"dependencies/Headers\"",
|
||||
);
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
OTHER_LDFLAGS = (
|
||||
"\"dependencies/Libs/Osx/libvorbisfile.a\"",
|
||||
"\"dependencies/Libs/Osx/libogg.a\"",
|
||||
"\"dependencies/Libs/Osx/libvorbis.a\"",
|
||||
);
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = libcAudio_d;
|
||||
STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
7B891F74113A21CA001CDBC6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"Headers\"",
|
||||
"\"dependencies/Headers\"",
|
||||
);
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
OTHER_LDFLAGS = (
|
||||
"\"dependencies/Libs/Osx/libvorbisfile.a\"",
|
||||
"\"dependencies/Libs/Osx/libogg.a\"",
|
||||
"\"dependencies/Libs/Osx/libvorbis.a\"",
|
||||
"\"dependencies/Libs/Osx/libvorbisenc.a\"",
|
||||
);
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = libcAudio;
|
||||
STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB916008733D950010E9CD /* Build configuration list for PBXNativeTarget "cAudio-Osx" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB916108733D950010E9CD /* Debug */,
|
||||
1DEB916208733D950010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB916408733D950010E9CD /* Build configuration list for PBXProject "cAudio-Osx" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB916508733D950010E9CD /* Debug */,
|
||||
1DEB916608733D950010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
7B891F75113A21EA001CDBC6 /* Build configuration list for PBXNativeTarget "cAudio-Osx(static)" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
7B891F73113A21CA001CDBC6 /* Debug */,
|
||||
7B891F74113A21CA001CDBC6 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||
}
|
155
cAudio.cbp
155
cAudio.cbp
|
@ -1,155 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="cAudio" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="bin\win32-gcc\cAudio_d" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\gcc\" />
|
||||
<Option type="3" />
|
||||
<Option compiler="gcc" />
|
||||
<Option createStaticLib="1" />
|
||||
<Compiler>
|
||||
<Add option="-O3" />
|
||||
<Add option="-g" />
|
||||
<Add option="-DHAVE_MALLOC_H" />
|
||||
<Add directory="include" />
|
||||
<Add directory="Headers" />
|
||||
<Add directory="dependencies\Headers" />
|
||||
<Add directory="dependencies\Headers\AL" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="vorbisfile" />
|
||||
<Add library="vorbis" />
|
||||
<Add library="ogg" />
|
||||
<Add library="OpenAL32" />
|
||||
<Add directory="dependencies\Libs\windows-mingw" />
|
||||
</Linker>
|
||||
<ExtraCommands>
|
||||
<Add after='cmd /c copy "$(PROJECT_DIR)\bin\win32-gcc\libcAudio_d.a" "$(PROJECT_DIR)\lib\win32-gcc\"' />
|
||||
<Mode after="always" />
|
||||
</ExtraCommands>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="bin\win32-gcc\cAudio" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj\gcc\" />
|
||||
<Option type="3" />
|
||||
<Option compiler="gcc" />
|
||||
<Option createStaticLib="1" />
|
||||
<Compiler>
|
||||
<Add option="-O3" />
|
||||
<Add option="-DHAVE_MALLOC_H" />
|
||||
<Add directory="include" />
|
||||
<Add directory="Headers" />
|
||||
<Add directory="dependencies\Headers" />
|
||||
<Add directory="dependencies\Headers\AL" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
<Add library="vorbisfile" />
|
||||
<Add library="vorbis" />
|
||||
<Add library="ogg" />
|
||||
<Add library="OpenAL32" />
|
||||
<Add directory="dependencies\Libs\windows-mingw" />
|
||||
</Linker>
|
||||
<ExtraCommands>
|
||||
<Add after='cmd /c copy "$(PROJECT_DIR)\bin\win32-gcc\libcAudio.a" "$(PROJECT_DIR)\lib\win32-gcc\"' />
|
||||
</ExtraCommands>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-DCOMPILE_FOR_WINDOWS" />
|
||||
<Add option="-DCAUDIO_EXPORTS" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add directory="dependencies\Libs\windows" />
|
||||
</Linker>
|
||||
<Unit filename="Headers\cAudioCapture.h" />
|
||||
<Unit filename="Headers\cAudioEffects.h" />
|
||||
<Unit filename="Headers\cAudioManager.h" />
|
||||
<Unit filename="Headers\cAudioSource.h" />
|
||||
<Unit filename="Headers\cConsoleLogReceiver.h" />
|
||||
<Unit filename="Headers\cEFXFunctions.h" />
|
||||
<Unit filename="Headers\cEffect.h" />
|
||||
<Unit filename="Headers\cFileLogReceiver.h" />
|
||||
<Unit filename="Headers\cFileSource.h" />
|
||||
<Unit filename="Headers\cFileSourceFactory.h" />
|
||||
<Unit filename="Headers\cFilter.h" />
|
||||
<Unit filename="Headers\cListener.h" />
|
||||
<Unit filename="Headers\cLogger.h" />
|
||||
<Unit filename="Headers\cMemoryOverride.h" />
|
||||
<Unit filename="Headers\cMemorySource.h" />
|
||||
<Unit filename="Headers\cMemoryTracker.h" />
|
||||
<Unit filename="Headers\cMutex.h" />
|
||||
<Unit filename="Headers\cOggAudioDecoderFactory.h" />
|
||||
<Unit filename="Headers\cOggDecoder.h" />
|
||||
<Unit filename="Headers\cPluginManager.h" />
|
||||
<Unit filename="Headers\cRawAudioDecoderFactory.h" />
|
||||
<Unit filename="Headers\cRawDecoder.h" />
|
||||
<Unit filename="Headers\cSTLAllocator.h" />
|
||||
<Unit filename="Headers\cStandardMemoryProvider.h" />
|
||||
<Unit filename="Headers\cThread.h" />
|
||||
<Unit filename="Headers\cUtils.h" />
|
||||
<Unit filename="Headers\cWavAudioDecoderFactory.h" />
|
||||
<Unit filename="Headers\cWavDecoder.h" />
|
||||
<Unit filename="Source\cAudioCapture.cpp" />
|
||||
<Unit filename="Source\cAudioEffects.cpp" />
|
||||
<Unit filename="Source\cAudioManager.cpp" />
|
||||
<Unit filename="Source\cAudioMemory.cpp" />
|
||||
<Unit filename="Source\cAudioSleep.cpp" />
|
||||
<Unit filename="Source\cAudioSource.cpp" />
|
||||
<Unit filename="Source\cConsoleLogReceiver.cpp" />
|
||||
<Unit filename="Source\cEffect.cpp" />
|
||||
<Unit filename="Source\cFileLogReceiver.cpp" />
|
||||
<Unit filename="Source\cFileSource.cpp" />
|
||||
<Unit filename="Source\cFilter.cpp" />
|
||||
<Unit filename="Source\cListener.cpp" />
|
||||
<Unit filename="Source\cLogger.cpp" />
|
||||
<Unit filename="Source\cMemorySource.cpp" />
|
||||
<Unit filename="Source\cMemoryTracker.cpp" />
|
||||
<Unit filename="Source\cMutex.cpp" />
|
||||
<Unit filename="Source\cOggAudioDecoderFactory.cpp" />
|
||||
<Unit filename="Source\cOggDecoder.cpp" />
|
||||
<Unit filename="Source\cPluginManager.cpp" />
|
||||
<Unit filename="Source\cRawDecoder.cpp" />
|
||||
<Unit filename="Source\cStandardMemoryProvider.cpp" />
|
||||
<Unit filename="Source\cThread.cpp" />
|
||||
<Unit filename="Source\cWavAudioDecoderFactory.cpp" />
|
||||
<Unit filename="Source\cWavDecoder.cpp" />
|
||||
<Unit filename="include\EAudioFormats.h" />
|
||||
<Unit filename="include\IAudioCapture.h" />
|
||||
<Unit filename="include\IAudioDecoder.h" />
|
||||
<Unit filename="include\IAudioDecoderFactory.h" />
|
||||
<Unit filename="include\IAudioEffects.h" />
|
||||
<Unit filename="include\IAudioManager.h" />
|
||||
<Unit filename="include\IAudioPlugin.h" />
|
||||
<Unit filename="include\IAudioSource.h" />
|
||||
<Unit filename="include\ICaptureEventHandler.h" />
|
||||
<Unit filename="include\IDataSource.h" />
|
||||
<Unit filename="include\IDataSourceFactory.h" />
|
||||
<Unit filename="include\IEffect.h" />
|
||||
<Unit filename="include\IEffectParameters.h" />
|
||||
<Unit filename="include\IFilter.h" />
|
||||
<Unit filename="include\IListener.h" />
|
||||
<Unit filename="include\ILogReceiver.h" />
|
||||
<Unit filename="include\ILogger.h" />
|
||||
<Unit filename="include\IManagerEventHandler.h" />
|
||||
<Unit filename="include\IMemoryProvider.h" />
|
||||
<Unit filename="include\IPluginManager.h" />
|
||||
<Unit filename="include\IRefCounted.h" />
|
||||
<Unit filename="include\ISourceEventHandler.h" />
|
||||
<Unit filename="include\cAudio.h" />
|
||||
<Unit filename="include\cAudioDefines.h" />
|
||||
<Unit filename="include\cAudioMemory.h" />
|
||||
<Unit filename="include\cAudioPlatform.h" />
|
||||
<Unit filename="include\cAudioSleep.h" />
|
||||
<Unit filename="include\cVector3.h" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<debugger />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
98
cAudio.sln
98
cAudio.sln
|
@ -1,98 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cAudio", "cAudio.vcproj", "{ACD6C202-85D4-44F5-83BF-6577A074F655}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial1_2DSound", "Examples\Tutorial1_2DSound\Tutorial1_2DSound.vcproj", "{D7A934F9-003B-47F7-AAD6-F360A4D41B9B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{ACD6C202-85D4-44F5-83BF-6577A074F655} = {ACD6C202-85D4-44F5-83BF-6577A074F655}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial2_3DSound", "Examples\Tutorial2_3DSound\Tutorial2_3DSound.vcproj", "{96052488-DB19-492E-88F6-D14AFD61E4F9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{ACD6C202-85D4-44F5-83BF-6577A074F655} = {ACD6C202-85D4-44F5-83BF-6577A074F655}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial3_MemoryPlayback", "Examples\Tutorial3_MemoryPlayback\Tutorial3_MemoryPlayback.vcproj", "{FEA3B340-BBB2-4AFB-AF31-3962A0F3F2C6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{ACD6C202-85D4-44F5-83BF-6577A074F655} = {ACD6C202-85D4-44F5-83BF-6577A074F655}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial4_AudioCapture", "Examples\Tutorial4_AudioCapture\Tutorial4_AudioCapture.vcproj", "{F04BE31E-E8CC-40C8-9C63-EEAE1BF84EB7}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{ACD6C202-85D4-44F5-83BF-6577A074F655} = {ACD6C202-85D4-44F5-83BF-6577A074F655}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stress_Test", "tests\Stress_Test\Stress_Test.vcproj", "{0E491D8E-6B9E-4107-B50B-EC48CBA3203D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{ACD6C202-85D4-44F5-83BF-6577A074F655} = {ACD6C202-85D4-44F5-83BF-6577A074F655}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial5_AudioEffects", "Examples\Tutorial5_AudioEffects\Tutorial5_AudioEffects.vcproj", "{EA03D1BB-6D71-4960-958A-670480A8259A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{ACD6C202-85D4-44F5-83BF-6577A074F655} = {ACD6C202-85D4-44F5-83BF-6577A074F655}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mp3Decoder", "plugins\mp3Decoder\mp3Decoder.vcproj", "{F1741962-FBBB-4BA2-AC74-A97E2DDF6B2E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial6_CustomEventHandler", "Examples\Tutorial6_CustomEventHandler\Tutorial6_CustomEventHandler.vcproj", "{21C636EF-FC36-4FC5-AFB4-0711F5C44B5D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EAXLegacyPreset", "plugins\EAXLegacyPreset\EAXLegacyPreset.vcproj", "{0C1D584C-FBE8-4F9C-BBBF-22D40E2BF421}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial7_CustomLogReceiver", "Examples\Tutorial7_CustomLogReceiver\Tutorial7_CustomLogReceiver.vcproj", "{23921DF8-FF19-4090-9240-EEE8C2A6B23F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{ACD6C202-85D4-44F5-83BF-6577A074F655}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{ACD6C202-85D4-44F5-83BF-6577A074F655}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{ACD6C202-85D4-44F5-83BF-6577A074F655}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{ACD6C202-85D4-44F5-83BF-6577A074F655}.Release|Win32.Build.0 = Release|Win32
|
||||
{D7A934F9-003B-47F7-AAD6-F360A4D41B9B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D7A934F9-003B-47F7-AAD6-F360A4D41B9B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D7A934F9-003B-47F7-AAD6-F360A4D41B9B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D7A934F9-003B-47F7-AAD6-F360A4D41B9B}.Release|Win32.Build.0 = Release|Win32
|
||||
{96052488-DB19-492E-88F6-D14AFD61E4F9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{96052488-DB19-492E-88F6-D14AFD61E4F9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{96052488-DB19-492E-88F6-D14AFD61E4F9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{96052488-DB19-492E-88F6-D14AFD61E4F9}.Release|Win32.Build.0 = Release|Win32
|
||||
{FEA3B340-BBB2-4AFB-AF31-3962A0F3F2C6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FEA3B340-BBB2-4AFB-AF31-3962A0F3F2C6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FEA3B340-BBB2-4AFB-AF31-3962A0F3F2C6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FEA3B340-BBB2-4AFB-AF31-3962A0F3F2C6}.Release|Win32.Build.0 = Release|Win32
|
||||
{F04BE31E-E8CC-40C8-9C63-EEAE1BF84EB7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F04BE31E-E8CC-40C8-9C63-EEAE1BF84EB7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F04BE31E-E8CC-40C8-9C63-EEAE1BF84EB7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F04BE31E-E8CC-40C8-9C63-EEAE1BF84EB7}.Release|Win32.Build.0 = Release|Win32
|
||||
{0E491D8E-6B9E-4107-B50B-EC48CBA3203D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0E491D8E-6B9E-4107-B50B-EC48CBA3203D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0E491D8E-6B9E-4107-B50B-EC48CBA3203D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0E491D8E-6B9E-4107-B50B-EC48CBA3203D}.Release|Win32.Build.0 = Release|Win32
|
||||
{EA03D1BB-6D71-4960-958A-670480A8259A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EA03D1BB-6D71-4960-958A-670480A8259A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EA03D1BB-6D71-4960-958A-670480A8259A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EA03D1BB-6D71-4960-958A-670480A8259A}.Release|Win32.Build.0 = Release|Win32
|
||||
{F1741962-FBBB-4BA2-AC74-A97E2DDF6B2E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F1741962-FBBB-4BA2-AC74-A97E2DDF6B2E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F1741962-FBBB-4BA2-AC74-A97E2DDF6B2E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F1741962-FBBB-4BA2-AC74-A97E2DDF6B2E}.Release|Win32.Build.0 = Release|Win32
|
||||
{21C636EF-FC36-4FC5-AFB4-0711F5C44B5D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{21C636EF-FC36-4FC5-AFB4-0711F5C44B5D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{21C636EF-FC36-4FC5-AFB4-0711F5C44B5D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{21C636EF-FC36-4FC5-AFB4-0711F5C44B5D}.Release|Win32.Build.0 = Release|Win32
|
||||
{0C1D584C-FBE8-4F9C-BBBF-22D40E2BF421}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0C1D584C-FBE8-4F9C-BBBF-22D40E2BF421}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0C1D584C-FBE8-4F9C-BBBF-22D40E2BF421}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0C1D584C-FBE8-4F9C-BBBF-22D40E2BF421}.Release|Win32.Build.0 = Release|Win32
|
||||
{23921DF8-FF19-4090-9240-EEE8C2A6B23F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{23921DF8-FF19-4090-9240-EEE8C2A6B23F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{23921DF8-FF19-4090-9240-EEE8C2A6B23F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{23921DF8-FF19-4090-9240-EEE8C2A6B23F}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue