Skip to content

Commit 7837791

Browse files
author
natural-law
committed
implement SimpleAudioEngine and add a test project about SimpleAudioEngine
1 parent f65adb5 commit 7837791

36 files changed

+4619
-0
lines changed

CocosDenshion/CocosDenshion.vcproj

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
<?xml version="1.0" encoding="gb2312"?>
2+
<VisualStudioProject
3+
ProjectType="Visual C++"
4+
Version="9.00"
5+
Name="CocosDenshion"
6+
ProjectGUID="{AB17438B-7848-4FD6-AF6E-A6A91F82C6F0}"
7+
RootNamespace="CocosDenshion"
8+
Keyword="Win32Proj"
9+
TargetFrameworkVersion="196613"
10+
>
11+
<Platforms>
12+
<Platform
13+
Name="Win32"
14+
/>
15+
</Platforms>
16+
<ToolFiles>
17+
</ToolFiles>
18+
<Configurations>
19+
<Configuration
20+
Name="Debug|Win32"
21+
OutputDirectory="../../PRJ_TG3/LIB/Win32Lib"
22+
IntermediateDirectory="$(ConfigurationName)"
23+
ConfigurationType="2"
24+
CharacterSet="1"
25+
>
26+
<Tool
27+
Name="VCPreBuildEventTool"
28+
/>
29+
<Tool
30+
Name="VCCustomBuildTool"
31+
/>
32+
<Tool
33+
Name="VCXMLDataGeneratorTool"
34+
/>
35+
<Tool
36+
Name="VCWebServiceProxyGeneratorTool"
37+
/>
38+
<Tool
39+
Name="VCMIDLTool"
40+
/>
41+
<Tool
42+
Name="VCCLCompilerTool"
43+
Optimization="0"
44+
AdditionalIncludeDirectories="..\..\PRJ_TG3\Include;..\..\PRJ_TG3\Include\MTAPI;..\..\PRJ_TG3\Include\TCOM;..\..\PRJ_TG3\Common\SoftSupport;..\..\PRJ_TG3\Common\ICU\Include"
45+
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOSDENSHION_EXPORTS;_TRANZDA_VM_;_EXPORT_DLL_"
46+
MinimalRebuild="true"
47+
BasicRuntimeChecks="3"
48+
RuntimeLibrary="3"
49+
UsePrecompiledHeader="0"
50+
WarningLevel="3"
51+
DebugInformationFormat="4"
52+
DisableSpecificWarnings="4251"
53+
/>
54+
<Tool
55+
Name="VCManagedResourceCompilerTool"
56+
/>
57+
<Tool
58+
Name="VCResourceCompilerTool"
59+
/>
60+
<Tool
61+
Name="VCPreLinkEventTool"
62+
/>
63+
<Tool
64+
Name="VCLinkerTool"
65+
AdditionalDependencies="WS2_32.Lib ..\..\PRJ_TG3\Common\SoftSupport\EosConfig.lib ..\..\PRJ_TG3\Common\SoftSupport\SoftSupport.lib ..\..\PRJ_TG3\Common\SoftSupport\TG3_DLL.lib"
66+
OutputFile="$(OutDir)\libCocosDenishion.dll"
67+
LinkIncremental="2"
68+
GenerateDebugInformation="true"
69+
SubSystem="2"
70+
TargetMachine="1"
71+
/>
72+
<Tool
73+
Name="VCALinkTool"
74+
/>
75+
<Tool
76+
Name="VCManifestTool"
77+
/>
78+
<Tool
79+
Name="VCXDCMakeTool"
80+
/>
81+
<Tool
82+
Name="VCBscMakeTool"
83+
/>
84+
<Tool
85+
Name="VCFxCopTool"
86+
/>
87+
<Tool
88+
Name="VCAppVerifierTool"
89+
/>
90+
<Tool
91+
Name="VCPostBuildEventTool"
92+
/>
93+
</Configuration>
94+
<Configuration
95+
Name="Release|Win32"
96+
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
97+
IntermediateDirectory="$(ConfigurationName)"
98+
ConfigurationType="2"
99+
CharacterSet="1"
100+
WholeProgramOptimization="1"
101+
>
102+
<Tool
103+
Name="VCPreBuildEventTool"
104+
/>
105+
<Tool
106+
Name="VCCustomBuildTool"
107+
/>
108+
<Tool
109+
Name="VCXMLDataGeneratorTool"
110+
/>
111+
<Tool
112+
Name="VCWebServiceProxyGeneratorTool"
113+
/>
114+
<Tool
115+
Name="VCMIDLTool"
116+
/>
117+
<Tool
118+
Name="VCCLCompilerTool"
119+
Optimization="2"
120+
EnableIntrinsicFunctions="true"
121+
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;COCOSDENSHION_EXPORTS"
122+
RuntimeLibrary="2"
123+
EnableFunctionLevelLinking="true"
124+
UsePrecompiledHeader="0"
125+
WarningLevel="3"
126+
DebugInformationFormat="3"
127+
/>
128+
<Tool
129+
Name="VCManagedResourceCompilerTool"
130+
/>
131+
<Tool
132+
Name="VCResourceCompilerTool"
133+
/>
134+
<Tool
135+
Name="VCPreLinkEventTool"
136+
/>
137+
<Tool
138+
Name="VCLinkerTool"
139+
LinkIncremental="1"
140+
GenerateDebugInformation="true"
141+
SubSystem="2"
142+
OptimizeReferences="2"
143+
EnableCOMDATFolding="2"
144+
TargetMachine="1"
145+
/>
146+
<Tool
147+
Name="VCALinkTool"
148+
/>
149+
<Tool
150+
Name="VCManifestTool"
151+
/>
152+
<Tool
153+
Name="VCXDCMakeTool"
154+
/>
155+
<Tool
156+
Name="VCBscMakeTool"
157+
/>
158+
<Tool
159+
Name="VCFxCopTool"
160+
/>
161+
<Tool
162+
Name="VCAppVerifierTool"
163+
/>
164+
<Tool
165+
Name="VCPostBuildEventTool"
166+
/>
167+
</Configuration>
168+
</Configurations>
169+
<References>
170+
</References>
171+
<Files>
172+
<Filter
173+
Name="SimpleAudioEngine"
174+
>
175+
<File
176+
RelativePath=".\SimpleAudioEngine\SimpleAudioEngine.cpp"
177+
>
178+
</File>
179+
<File
180+
RelativePath=".\SimpleAudioEngine\SimpleAudioEngine.h"
181+
>
182+
</File>
183+
<File
184+
RelativePath=".\SimpleAudioEngine\uthash.h"
185+
>
186+
</File>
187+
</Filter>
188+
<Filter
189+
Name="Platform"
190+
>
191+
<File
192+
RelativePath=".\Platform\platform.h"
193+
>
194+
</File>
195+
<Filter
196+
Name="uPhone"
197+
>
198+
<File
199+
RelativePath=".\Platform\uPhone\SoundPlayer.cpp"
200+
>
201+
</File>
202+
<File
203+
RelativePath=".\Platform\uPhone\SoundPlayer.h"
204+
>
205+
</File>
206+
</Filter>
207+
</Filter>
208+
<File
209+
RelativePath=".\Export.h"
210+
>
211+
</File>
212+
</Files>
213+
<Globals>
214+
</Globals>
215+
</VisualStudioProject>

CocosDenshion/Export.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#ifndef __EXPORT_COMMON__
2+
#define __EXPORT_COMMON__
3+
4+
#if defined(_WIN32)
5+
#if defined(_EXPORT_DLL_)
6+
#define EXPORT_DLL __declspec(dllexport)
7+
#elif defined(IGNORE_EXPORT)
8+
#define EXPORT_DLL
9+
#else /* use a DLL library */
10+
#define EXPORT_DLL __declspec(dllimport)
11+
#endif
12+
#else
13+
#if defined(_SHARED_)
14+
#define EXPORT_DLL __attribute__((visibility("default")))
15+
#elif defined(IGNORE_EXPORT)
16+
#define EXPORT_DLL
17+
#else
18+
#define EXPORT_DLL
19+
#endif
20+
#endif
21+
22+
#endif // end of __EXPORT_COMMON__

CocosDenshion/Makefile.ARM

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
############################################################################
3+
#
4+
# Makefile for building : TestAudioEngine_Arm.TMK3
5+
# Created by TMK3_V2.3, please do not modify.
6+
#
7+
#############################################################################
8+
9+
TO_PROJECT_ROOT = ../../PRJ_TG3
10+
OUTPUT_FILENAME = libCocosDenshion.so
11+
12+
include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_Base_DynamicLib.ARM
13+
include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_TOPS_Def.ARM
14+
15+
DEFINES += -DUNDER_UPHONE \
16+
-D__TG3_PURE_DLL__
17+
INCLUDE_PATH += -I. -I./Res
18+
19+
OBJECTS_DIR = ./Debug-ARM
20+
DESTDIR = $(TO_PROJECT_ROOT)/$(BIN_OUTPUT_DIR)
21+
TARGET = $(DESTDIR)/$(OUTPUT_FILENAME)
22+
23+
DEL_FILE = rm -f
24+
MKDIR = mkdir -p
25+
26+
first: all
27+
28+
OBJECTS = \
29+
$(OBJECTS_DIR)/SoundPlayer.o \
30+
$(OBJECTS_DIR)/SimpleAudioEngine.o
31+
32+
ADD_OBJECTS +=
33+
34+
$(OBJECTS_DIR) :
35+
$(MKDIR) $(OBJECTS_DIR)
36+
37+
$(DESTDIR) :
38+
$(MKDIR) $(DESTDIR)
39+
40+
all : $(OBJECTS_DIR) $(DESTDIR) $(TARGET)
41+
42+
$(TARGET) : $(OBJECTS)
43+
$(LINK) $(LINK_FLAGS) -o $(TARGET) $(SYS_OBJECTS) $(OBJECTS) $(ADD_OBJECTS) $(LIBS) $(SYS_LIBS)
44+
45+
clean :
46+
-$(DEL_FILE) $(OBJECTS)
47+
-$(DEL_FILE) $(TARGET)
48+
49+
$(OBJECTS_DIR)/SoundPlayer.o : ./Platform/uPhone/SoundPlayer.cpp
50+
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/SoundPlayer.o ./Platform/uPhone/SoundPlayer.cpp
51+
52+
$(OBJECTS_DIR)/SimpleAudioEngine.o : ./SimpleAudioEngine/SimpleAudioEngine.cpp
53+
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/SimpleAudioEngine.o ./SimpleAudioEngine/SimpleAudioEngine.cpp
54+

CocosDenshion/Platform/platform.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef __DENSHION_PLATFORM_H__
2+
#define __DENSHION_PLATFORM_H__
3+
4+
#if defined(_TRANZDA_VM_) || defined(UNDER_UPHONE)
5+
#define _PLATFORM_UPHONE
6+
#endif
7+
8+
#ifdef _PLATFORM_UPHONE
9+
#include "uPhone/SoundPlayer.h"
10+
#endif
11+
12+
#endif

0 commit comments

Comments
 (0)