mirror of https://github.com/axmolengine/axmol.git
Merge branch 'master' of https://github.com/minggo/cocos2d-x into minggo-master
This commit is contained in:
commit
dd979a4ed9
|
@ -2,9 +2,12 @@ LOCAL_PATH := $(call my-dir)
|
|||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := cocosdenshion
|
||||
|
||||
LOCAL_SRC_FILES := SimpleAudioEngine.cpp
|
||||
LOCAL_SRC_FILES := SimpleAudioEngine.cpp \
|
||||
jni/SimpleAudioEngineJni.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
|
@ -23,6 +23,7 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
#include "SimpleAudioEngine.h"
|
||||
#include "jni/SimpleAudioEngineJni.h"
|
||||
|
||||
namespace CocosDenshion
|
||||
{
|
||||
|
@ -50,7 +51,7 @@ namespace CocosDenshion
|
|||
|
||||
void SimpleAudioEngine::end()
|
||||
{
|
||||
|
||||
endJNI();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setResource(const char* pszResPath, const char* pszZipFileName)
|
||||
|
@ -65,81 +66,76 @@ namespace CocosDenshion
|
|||
|
||||
void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop)
|
||||
{
|
||||
|
||||
playBackgroundMusicJNI(pszFilePath, bLoop);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData)
|
||||
{
|
||||
|
||||
stopBackgroundMusicJNI();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::pauseBackgroundMusic()
|
||||
{
|
||||
|
||||
pauseBackgroundMusicJNI();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::resumeBackgroundMusic()
|
||||
{
|
||||
|
||||
resumeBackgroundMusicJNI();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::rewindBackgroundMusic()
|
||||
{
|
||||
|
||||
rewindBackgroundMusicJNI();
|
||||
}
|
||||
|
||||
bool SimpleAudioEngine::willPlayBackgroundMusic()
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SimpleAudioEngine::isBackgroundMusicPlaying()
|
||||
{
|
||||
return false;
|
||||
return isBackgroundMusicPlayingJNI();
|
||||
}
|
||||
|
||||
int SimpleAudioEngine::getBackgroundMusicVolume()
|
||||
float SimpleAudioEngine::getBackgroundMusicVolume()
|
||||
{
|
||||
return -1;
|
||||
return getBackgroundMusicVolumeJNI();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setBackgroundMusicVolume(int volume)
|
||||
void SimpleAudioEngine::setBackgroundMusicVolume(float volume)
|
||||
{
|
||||
|
||||
setBackgroundMusicVolumeJNI(volume);
|
||||
}
|
||||
|
||||
int SimpleAudioEngine::getEffectsVolume()
|
||||
float SimpleAudioEngine::getEffectsVolume()
|
||||
{
|
||||
return -1;
|
||||
getEffectsVolumeJNI();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setEffectsVolume(int volume)
|
||||
void SimpleAudioEngine::setEffectsVolume(float volume)
|
||||
{
|
||||
|
||||
setEffectsVolumeJNI(volume);
|
||||
}
|
||||
|
||||
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath)
|
||||
{
|
||||
return 0;
|
||||
return playEffectJNI(pszFilePath);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::stopEffect(unsigned int nSoundId)
|
||||
{
|
||||
|
||||
stopEffectJNI(nSoundId);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::preloadEffect(const char* pszFilePath)
|
||||
{
|
||||
|
||||
preloadEffectJNI(pszFilePath);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::unloadEffectAll()
|
||||
{
|
||||
|
||||
unloadEffectJNI(pszFilePath);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,240 @@
|
|||
#include "SimpleAudioEngineJni.h"
|
||||
#include <android/log.h>
|
||||
|
||||
#define LOG_TAG "libSimpleAudioEngine"
|
||||
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
static JavaVM *gJavaVM = 0;
|
||||
static jclass classOfCocos2dxActivity = 0;
|
||||
JNIEnv *env = 0;
|
||||
|
||||
jint JNI_OnLoad(JavaVM *vm, void *reserved)
|
||||
{
|
||||
gJavaVM = vm;
|
||||
|
||||
return JNI_VERSION_1_4;
|
||||
}
|
||||
|
||||
static jmethodID getMethodID(const char *methodName, const char *paramCode)
|
||||
{
|
||||
jmethodID ret = 0;
|
||||
|
||||
// get jni environment and java class for Cocos2dxActivity
|
||||
if (gJavaVM->GetEnv((void**)&env, JNI_VERSION_1_4) != JNI_OK)
|
||||
{
|
||||
LOGD("Failed to get the environment using GetEnv()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (gJavaVM->AttachCurrentThread(&env, 0) < 0)
|
||||
{
|
||||
LOGD("Failed to get the environment using AttachCurrentThread()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
classOfCocos2dxActivity = env->FindClass("org/cocos2dx/lib/Cocos2dxActivity");
|
||||
if (! classOfCocos2dxActivity)
|
||||
{
|
||||
LOGD("Failed to find class of org/cocos2dx/lib/Cocos2dxActivity");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (env != 0 && classOfCocos2dxActivity != 0)
|
||||
{
|
||||
ret = env->GetStaticMethodID(classOfCocos2dxActivity, methodName, paramCode);
|
||||
}
|
||||
|
||||
if (! ret)
|
||||
{
|
||||
LOGD("get method id of %s error", methodName);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void playBackgroundMusicJNI(const char *path, bool isLoop)
|
||||
{
|
||||
// void playBackgroundMusic(String,boolean)
|
||||
jmethodID playBackgroundMusicMethodID = getMethodID("playBackgroundMusic", "(Ljava/lang/String;Z)V");
|
||||
|
||||
if (playBackgroundMusicMethodID)
|
||||
{
|
||||
jstring StringArg = env->NewStringUTF(path);
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, playBackgroundMusicMethodID, StringArg, isLoop);
|
||||
//env->ReleaseStringUTFChars(StringArg, path);
|
||||
}
|
||||
}
|
||||
|
||||
void stopBackgroundMusicJNI()
|
||||
{
|
||||
// void stopBackgroundMusic()
|
||||
jmethodID stopBackgroundMusicMethodID = getMethodID("stopBackgroundMusic", "()V");
|
||||
|
||||
if (stopBackgroundMusicMethodID)
|
||||
{
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, stopBackgroundMusicMethodID);
|
||||
}
|
||||
}
|
||||
|
||||
void pauseBackgroundMusicJNI()
|
||||
{
|
||||
// void pauseBackgroundMusic()
|
||||
jmethodID pauseBackgroundMusicMethodID = getMethodID("pauseBackgroundMusic", "()V");
|
||||
|
||||
if (pauseBackgroundMusicMethodID)
|
||||
{
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, pauseBackgroundMusicMethodID);
|
||||
}
|
||||
}
|
||||
|
||||
void resumeBackgroundMusicJNI()
|
||||
{
|
||||
// void resumeBackgroundMusic()
|
||||
jmethodID resumeBackgroundMusicMethodID = getMethodID("resumeBackgroundMusic", "()V");
|
||||
|
||||
if (resumeBackgroundMusicMethodID)
|
||||
{
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, resumeBackgroundMusicMethodID);
|
||||
}
|
||||
}
|
||||
|
||||
void rewindBackgroundMusicJNI()
|
||||
{
|
||||
// void rewindBackgroundMusic()
|
||||
jmethodID rewindBackgroundMusicMethodID = getMethodID("rewindBackgroundMusic", "()V");
|
||||
|
||||
if (rewindBackgroundMusicMethodID)
|
||||
{
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, rewindBackgroundMusicMethodID);
|
||||
}
|
||||
}
|
||||
|
||||
bool isBackgroundMusicPlayingJNI()
|
||||
{
|
||||
// boolean rewindBackgroundMusic()
|
||||
jmethodID isBackgroundMusicPlayingMethodID = getMethodID("isBackgroundMusicPlaying", "()Z");
|
||||
jboolean ret = false;
|
||||
|
||||
if (isBackgroundMusicPlayingMethodID)
|
||||
{
|
||||
ret = env->CallStaticBooleanMethod(classOfCocos2dxActivity, isBackgroundMusicPlayingMethodID);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
float getBackgroundMusicVolumeJNI()
|
||||
{
|
||||
// float getBackgroundMusicVolume()
|
||||
jmethodID getBackgroundMusicVolumeID = getMethodID("getBackgroundMusicVolume", "()F");
|
||||
jfloat ret = 0.0;
|
||||
|
||||
if (getBackgroundMusicVolumeID)
|
||||
{
|
||||
ret = env->CallStaticFloatMethod(classOfCocos2dxActivity, getBackgroundMusicVolumeID);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void setBackgroundMusicVolumeJNI(float volume)
|
||||
{
|
||||
// void setBackgroundMusicVolume()
|
||||
jmethodID setBackgroundMusicVolumeMethodID = getMethodID("setBackgroundMusicVolume", "(F)V");
|
||||
|
||||
if (setBackgroundMusicVolumeMethodID)
|
||||
{
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, setBackgroundMusicVolumeMethodID, volume);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int playEffectJNI(const char* path)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
// int playEffect(String)
|
||||
jmethodID playEffectMethodID = getMethodID("playEffect", "(Ljava/lang/String;)I");
|
||||
|
||||
if (playEffectMethodID)
|
||||
{
|
||||
jstring StringArg = env->NewStringUTF(path);
|
||||
ret = env->CallStaticIntMethod(classOfCocos2dxActivity, playEffectMethodID, StringArg);
|
||||
}
|
||||
|
||||
return (unsigned int)ret;
|
||||
}
|
||||
|
||||
void stopEffectJNI(unsigned int nSoundId)
|
||||
{
|
||||
// void stopEffect(int)
|
||||
jmethodID stopEffectMethodID = getMethodID("stopEffect", "(I)V");
|
||||
|
||||
if (stopEffectMethodID)
|
||||
{
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, stopEffectMethodID, (int)nSoundId);
|
||||
}
|
||||
}
|
||||
|
||||
void endJNI()
|
||||
{
|
||||
// void end()
|
||||
jmethodID endMethodID = getMethodID("end", "()V");
|
||||
|
||||
if (endMethodID)
|
||||
{
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, endMethodID);
|
||||
}
|
||||
}
|
||||
|
||||
float getEffectsVolumeJNI()
|
||||
{
|
||||
// float getEffectsVolume()
|
||||
jmethodID getEffectsVolumeMethodID = getMethodID("getEffectsVolume", "()F");
|
||||
jfloat ret = -1.0;
|
||||
|
||||
if (getEffectsVolumeMethodID)
|
||||
{
|
||||
ret = env->CallStaticFloatMethod(classOfCocos2dxActivity, getEffectsVolumeMethodID);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void setEffectsVolumeJNI(float volume)
|
||||
{
|
||||
// void setEffectsVolume(float)
|
||||
jmethodID setEffectsVolumeMethodID = getMethodID("setEffectsVolume", "(F)V");
|
||||
|
||||
if (setEffectsVolumeMethodID)
|
||||
{
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, setEffectsVolumeMethodID, volume);
|
||||
}
|
||||
}
|
||||
|
||||
void preloadEffectJNI(const char *path)
|
||||
{
|
||||
// void preloadEffect(String)
|
||||
jmethodID preloadEffectMethodID = getMethodID("preloadEffect", "(Ljava/lang/String;)V");
|
||||
|
||||
if (preloadEffectMethodID)
|
||||
{
|
||||
jstring StringArg = env->NewStringUTF(path);
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, preloadEffectMethodID, StringArg);
|
||||
}
|
||||
}
|
||||
|
||||
void unloadEffectJNI(const char* path)
|
||||
{
|
||||
// void unloadEffect(String)
|
||||
jmethodID unloadEffectMethodID = getMethodID("unloadEffect", "(Ljava/lang/String;)V");
|
||||
|
||||
if (unloadEffectMethodID)
|
||||
{
|
||||
jstring StringArg = env->NewStringUTF(path);
|
||||
env->CallStaticVoidMethod(classOfCocos2dxActivity, unloadEffectMethodID, StringArg);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef __SIMPLE_AUDIO_ENGINE_JNI__
|
||||
#define __SIMPLE_AUDIO_ENGINE_JNI__
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern void playBackgroundMusicJNI(const char *path, bool isLoop);
|
||||
extern void stopBackgroundMusicJNI();
|
||||
extern void pauseBackgroundMusicJNI();
|
||||
extern void resumeBackgroundMusicJNI();
|
||||
extern void rewindBackgroundMusicJNI();
|
||||
extern bool isBackgroundMusicPlayingJNI();
|
||||
extern float getBackgroundMusicVolumeJNI();
|
||||
extern void setBackgroundMusicVolumeJNI(float volume);
|
||||
extern unsigned int playEffectJNI(const char* path);
|
||||
extern void stopEffectJNI(unsigned int nSoundId);
|
||||
extern void endJNI();
|
||||
extern float getEffectsVolumeJNI();
|
||||
extern void setEffectsVolumeJNI(float volume);
|
||||
extern void preloadEffectJNI(const char *path);
|
||||
extern void unloadEffectJNI(const char* path);
|
||||
}
|
||||
|
||||
#endif // __SIMPLE_AUDIO_ENGINE_JNI__
|
|
@ -101,26 +101,26 @@ public:
|
|||
|
||||
// properties
|
||||
/**
|
||||
@brief The volume of the background music max value is 100,the min value is 0
|
||||
@brief The volume of the background music max value is 1.0,the min value is 0.0
|
||||
*/
|
||||
int getBackgroundMusicVolume();
|
||||
float getBackgroundMusicVolume();
|
||||
|
||||
/**
|
||||
@brief set the volume of background music
|
||||
@param volume must be in 0~100
|
||||
@param volume must be in 0.0~1.0
|
||||
*/
|
||||
void setBackgroundMusicVolume(int volume);
|
||||
void setBackgroundMusicVolume(float volume);
|
||||
|
||||
/**
|
||||
@brief The volume of the effects max value is 100,the min value is 0
|
||||
@brief The volume of the effects max value is 1.0,the min value is 0.0
|
||||
*/
|
||||
int getEffectsVolume();
|
||||
float getEffectsVolume();
|
||||
|
||||
/**
|
||||
@brief set the volume of sound effecs
|
||||
@param volume must be in 0~100
|
||||
@param volume must be in 0.0~1.0
|
||||
*/
|
||||
void setEffectsVolume(int volume);
|
||||
void setEffectsVolume(float volume);
|
||||
|
||||
// for sound effects
|
||||
/**
|
||||
|
@ -147,11 +147,6 @@ public:
|
|||
@param[in] pszFilePath The path of the effect file,or the FileName of T_SoundResInfo
|
||||
*/
|
||||
void unloadEffect(const char* pszFilePath);
|
||||
|
||||
/**
|
||||
@brief unload all preloaded effect from internal buffer
|
||||
*/
|
||||
void unloadEffectAll();
|
||||
};
|
||||
|
||||
} // end of namespace CocosDenshion
|
||||
|
|
|
@ -70,22 +70,22 @@ static bool static_isBackgroundMusicPlaying()
|
|||
return [[SimpleAudioEngine sharedEngine] isBackgroundMusicPlaying];
|
||||
}
|
||||
|
||||
static int static_getBackgroundMusicVolume()
|
||||
static float static_getBackgroundMusicVolume()
|
||||
{
|
||||
return (int)[[SimpleAudioEngine sharedEngine] backgroundMusicVolume];
|
||||
return [[SimpleAudioEngine sharedEngine] backgroundMusicVolume];
|
||||
}
|
||||
|
||||
static void static_setBackgroundMusicVolume(int volume)
|
||||
static void static_setBackgroundMusicVolume(float volume)
|
||||
{
|
||||
[SimpleAudioEngine sharedEngine].backgroundMusicVolume = volume;
|
||||
}
|
||||
|
||||
static int static_getEffectsVolume()
|
||||
static float static_getEffectsVolume()
|
||||
{
|
||||
return (int)[[SimpleAudioEngine sharedEngine] effectsVolume];
|
||||
return [[SimpleAudioEngine sharedEngine] effectsVolume];
|
||||
}
|
||||
|
||||
static void static_setEffectsVolume(int volume)
|
||||
static void static_setEffectsVolume(float volume)
|
||||
{
|
||||
[SimpleAudioEngine sharedEngine].effectsVolume = volume;
|
||||
}
|
||||
|
@ -190,22 +190,22 @@ namespace CocosDenshion
|
|||
return static_isBackgroundMusicPlaying();
|
||||
}
|
||||
|
||||
int SimpleAudioEngine::getBackgroundMusicVolume()
|
||||
float SimpleAudioEngine::getBackgroundMusicVolume()
|
||||
{
|
||||
return (int)static_getBackgroundMusicVolume();
|
||||
return static_getBackgroundMusicVolume();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setBackgroundMusicVolume(int volume)
|
||||
void SimpleAudioEngine::setBackgroundMusicVolume(float volume)
|
||||
{
|
||||
static_setBackgroundMusicVolume(volume);
|
||||
}
|
||||
|
||||
int SimpleAudioEngine::getEffectsVolume()
|
||||
float SimpleAudioEngine::getEffectsVolume()
|
||||
{
|
||||
return (int)static_getEffectsVolume();
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setEffectsVolume(int volume)
|
||||
void SimpleAudioEngine::setEffectsVolume(float volume)
|
||||
{
|
||||
static_setEffectsVolume(volume);
|
||||
}
|
||||
|
@ -229,9 +229,4 @@ namespace CocosDenshion
|
|||
{
|
||||
static_unloadEffect(pszFilePath);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::unloadEffectAll()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -159,12 +159,12 @@ bool SimpleAudioEngine::isBackgroundMusicPlaying()
|
|||
}
|
||||
|
||||
// properties
|
||||
int SimpleAudioEngine::getBackgroundMusicVolume()
|
||||
float SimpleAudioEngine::getBackgroundMusicVolume()
|
||||
{
|
||||
return s_nBackgroundMusicVolume;
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setBackgroundMusicVolume(int volume)
|
||||
void SimpleAudioEngine::setBackgroundMusicVolume(float volume)
|
||||
{
|
||||
if (volume > 100)
|
||||
{
|
||||
|
@ -183,12 +183,12 @@ void SimpleAudioEngine::setBackgroundMusicVolume(int volume)
|
|||
s_nBackgroundMusicVolume = volume;
|
||||
}
|
||||
|
||||
int SimpleAudioEngine::getEffectsVolume()
|
||||
float SimpleAudioEngine::getEffectsVolume()
|
||||
{
|
||||
return s_nEffectsVolume;
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setEffectsVolume(int volume)
|
||||
void SimpleAudioEngine::setEffectsVolume(float volume)
|
||||
{
|
||||
if (volume > 100)
|
||||
{
|
||||
|
@ -252,9 +252,9 @@ void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
|
|||
s_pDataManager->unloadEffect(pszFilePath);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::unloadEffectAll()
|
||||
{
|
||||
s_pDataManager->removeAllEffects();
|
||||
}
|
||||
// void SimpleAudioEngine::unloadEffectAll()
|
||||
// {
|
||||
// s_pDataManager->removeAllEffects();
|
||||
// }
|
||||
|
||||
} // end of namespace CocosDenshion
|
||||
|
|
|
@ -160,30 +160,30 @@ void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
|
|||
s_List.erase(nID);
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::unloadEffectAll()
|
||||
{
|
||||
s_List.clear();
|
||||
}
|
||||
// void SimpleAudioEngine::unloadEffectAll()
|
||||
// {
|
||||
// s_List.clear();
|
||||
// }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// volume interface
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int SimpleAudioEngine::getBackgroundMusicVolume()
|
||||
float SimpleAudioEngine::getBackgroundMusicVolume()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setBackgroundMusicVolume(int volume)
|
||||
void SimpleAudioEngine::setBackgroundMusicVolume(float volume)
|
||||
{
|
||||
}
|
||||
|
||||
int SimpleAudioEngine::getEffectsVolume()
|
||||
float SimpleAudioEngine::getEffectsVolume()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
void SimpleAudioEngine::setEffectsVolume(int volume)
|
||||
void SimpleAudioEngine::setEffectsVolume(float volume)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +1,27 @@
|
|||
# set params
|
||||
ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r4-crystax
|
||||
COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x
|
||||
|
||||
# copy resources
|
||||
|
||||
HELLOWORLD_ROOT=$COCOS2DX_ROOT/HelloWorld/android
|
||||
|
||||
# make sure assets is exist
|
||||
if [ -d $HELLOWORLD_ROOT/assets ]; then
|
||||
echo "resources already exist"
|
||||
else
|
||||
mkdir $HELLOWORLD_ROOT/assets
|
||||
cp $COCOS2DX_ROOT/HelloWorld/Resource/CloseNormal.png $HELLOWORLD_ROOT/assets
|
||||
cp $COCOS2DX_ROOT/HelloWorld/Resource/CloseSelected.png $HELLOWORLD_ROOT/assets
|
||||
cp $COCOS2DX_ROOT/HelloWorld/Resource/HelloWorld.png $HELLOWORLD_ROOT/assets
|
||||
rm -rf $HELLOWORLD_ROOT/assets
|
||||
fi
|
||||
|
||||
mkdir $HELLOWORLD_ROOT/assets
|
||||
|
||||
# copy resources
|
||||
for file in $COCOS2DX_ROOT/HelloWorld/Resource/*
|
||||
do
|
||||
if [ -d $file ]; then
|
||||
cp -rf $file $HELLOWORLD_ROOT/assets
|
||||
fi
|
||||
|
||||
if [ -f $file ]; then
|
||||
cp $file $HELLOWORLD_ROOT/assets
|
||||
fi
|
||||
done
|
||||
|
||||
# build
|
||||
pushd $ANDROID_NDK_ROOT
|
||||
./ndk-build -C $HELLOWORLD_ROOT
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
//
|
||||
// TestAudioEngine_iphoneAppDelegate.h
|
||||
// TestAudioEngine.iphone
|
||||
//
|
||||
// Created by Walzer on 11-1-8.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class TestAudioEngine_iphoneViewController;
|
||||
|
||||
@interface TestAudioEngine_iphoneAppDelegate : NSObject <UIApplicationDelegate> {
|
||||
UIWindow *window;
|
||||
TestAudioEngine_iphoneViewController *viewController;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIWindow *window;
|
||||
@property (nonatomic, retain) IBOutlet TestAudioEngine_iphoneViewController *viewController;
|
||||
|
||||
@end
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
//
|
||||
// TestAudioEngine_iphoneAppDelegate.m
|
||||
// TestAudioEngine.iphone
|
||||
//
|
||||
// Created by Walzer on 11-1-8.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TestAudioEngine_iphoneAppDelegate.h"
|
||||
#import "TestAudioEngine_iphoneViewController.h"
|
||||
|
||||
@implementation TestAudioEngine_iphoneAppDelegate
|
||||
|
||||
@synthesize window;
|
||||
@synthesize viewController;
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Application lifecycle
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
|
||||
// Override point for customization after application launch
|
||||
|
||||
// Add the view controller's view to the window and display.
|
||||
[window addSubview:viewController.view];
|
||||
[window makeKeyAndVisible];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application {
|
||||
/*
|
||||
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||
/*
|
||||
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
/*
|
||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||
/*
|
||||
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
/*
|
||||
Called when the application is about to terminate.
|
||||
See also applicationDidEnterBackground:.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Memory management
|
||||
|
||||
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
|
||||
/*
|
||||
Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
- (void)dealloc {
|
||||
[viewController release];
|
||||
[window release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
@end
|
|
@ -1,28 +0,0 @@
|
|||
//
|
||||
// TestAudioEngine_iphoneViewController.h
|
||||
// TestAudioEngine.iphone
|
||||
//
|
||||
// Created by Walzer on 11-1-8.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface TestAudioEngine_iphoneViewController : UIViewController {
|
||||
|
||||
}
|
||||
|
||||
- (void) button1Click:(UIButton*)sender;
|
||||
- (void) button2Click:(UIButton*)sender;
|
||||
- (void) button3Click:(UIButton*)sender;
|
||||
- (void) button4Click:(UIButton*)sender;
|
||||
- (void) button5Click:(UIButton*)sender;
|
||||
- (void) button6Click:(UIButton*)sender;
|
||||
- (void) button7Click:(UIButton*)sender;
|
||||
- (void) button8Click:(UIButton*)sender;
|
||||
- (void) button9Click:(UIButton*)sender;
|
||||
- (void) button10Click:(UIButton*)sender;
|
||||
- (void) button11Click:(UIButton*)sender;
|
||||
- (void) button12Click:(UIButton*)sender;
|
||||
@end
|
||||
|
|
@ -1,263 +0,0 @@
|
|||
//
|
||||
// TestAudioEngine_iphoneViewController.m
|
||||
// TestAudioEngine.iphone
|
||||
//
|
||||
// Created by Walzer on 11-1-8.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TestAudioEngine_iphoneViewController.h"
|
||||
#include "SimpleAudioEngine.h"
|
||||
|
||||
@implementation TestAudioEngine_iphoneViewController
|
||||
|
||||
|
||||
|
||||
/*
|
||||
// The designated initializer. Override to perform setup that is required before the view is loaded.
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
|
||||
// Custom initialization
|
||||
}
|
||||
return self;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
// Implement loadView to create a view hierarchy programmatically, without using a nib.
|
||||
- (void)loadView {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
// preload background music and effect music
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->preloadBackgroundMusic("background.mp3");
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->preloadEffect("Effect1.wav");
|
||||
|
||||
// button1 play background music
|
||||
UIButton *button1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button1 setTitle:@"play background music" forState:UIControlStateNormal];
|
||||
CGRect button1Rect = CGRectMake(10, 30, 200, 20);
|
||||
[button1 setFrame:button1Rect];
|
||||
[button1 addTarget:self action:@selector(button1Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button2 stop background music
|
||||
UIButton *button2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button2 setTitle:@"stop background music" forState:UIControlStateNormal];
|
||||
CGRect button2Rect = CGRectMake(10, 50, 200, 20);
|
||||
[button2 setFrame:button2Rect];
|
||||
[button2 addTarget:self action:@selector(button2Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button3 pause background music
|
||||
UIButton *button3 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button3 setTitle:@"pause background music" forState:UIControlStateNormal];
|
||||
CGRect button3Rect = CGRectMake(10, 70, 200, 20);
|
||||
[button3 setFrame:button3Rect];
|
||||
[button3 addTarget:self action:@selector(button3Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button4 resume background music
|
||||
UIButton *button4 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button4 setTitle:@"resume background music" forState:UIControlStateNormal];
|
||||
CGRect button4Rect = CGRectMake(10, 90, 200, 20);
|
||||
[button4 setFrame:button4Rect];
|
||||
[button4 addTarget:self action:@selector(button4Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button5 rewind background music
|
||||
UIButton *button5 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button5 setTitle:@"rewind background music" forState:UIControlStateNormal];
|
||||
CGRect button5Rect = CGRectMake(10, 110, 200, 20);
|
||||
[button5 setFrame:button5Rect];
|
||||
[button5 addTarget:self action:@selector(button5Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button6 add background music volume
|
||||
UIButton *button6 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button6 setTitle:@"add background music volume" forState:UIControlStateNormal];
|
||||
CGRect button6Rect = CGRectMake(10, 130, 230, 20);
|
||||
[button6 setFrame:button6Rect];
|
||||
[button6 addTarget:self action:@selector(button6Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button7 sub background music volume
|
||||
UIButton *button7 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button7 setTitle:@"sub background music volume" forState:UIControlStateNormal];
|
||||
CGRect button7Rect = CGRectMake(10, 150, 230, 20);
|
||||
[button7 setFrame:button7Rect];
|
||||
[button7 addTarget:self action:@selector(button7Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button8 check if background music is playing
|
||||
UIButton *button8 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button8 setTitle:@"is background music playing" forState:UIControlStateNormal];
|
||||
CGRect button8Rect = CGRectMake(10, 170, 230, 20);
|
||||
[button8 setFrame:button8Rect];
|
||||
[button8 addTarget:self action:@selector(button8Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button9 play effect
|
||||
UIButton *button9 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button9 setTitle:@"play effect" forState:UIControlStateNormal];
|
||||
CGRect button9Rect = CGRectMake(10, 190, 200, 20);
|
||||
[button9 setFrame:button9Rect];
|
||||
[button9 addTarget:self action:@selector(button9Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button10 add effect music volume
|
||||
UIButton *button10 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button10 setTitle:@"add effect music volume" forState:UIControlStateNormal];
|
||||
CGRect button10Rect = CGRectMake(10, 210, 200, 20);
|
||||
[button10 setFrame:button10Rect];
|
||||
[button10 addTarget:self action:@selector(button10Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button11 sub effect music volume
|
||||
UIButton *button11 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button11 setTitle:@"sub effect music volume" forState:UIControlStateNormal];
|
||||
CGRect button11Rect = CGRectMake(10, 230, 200, 20);
|
||||
[button11 setFrame:button11Rect];
|
||||
[button11 addTarget:self action:@selector(button11Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// button12 reset
|
||||
UIButton *button12 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[button12 setTitle:@"reset" forState:UIControlStateNormal];
|
||||
CGRect button12Rect = CGRectMake(10, 250, 200, 20);
|
||||
[button12 setFrame:button12Rect];
|
||||
[button12 addTarget:self action:@selector(button12Click:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
[self.view addSubview:button1];
|
||||
[self.view addSubview:button2];
|
||||
[self.view addSubview:button3];
|
||||
[self.view addSubview:button4];
|
||||
[self.view addSubview:button5];
|
||||
[self.view addSubview:button6];
|
||||
[self.view addSubview:button7];
|
||||
[self.view addSubview:button8];
|
||||
[self.view addSubview:button9];
|
||||
[self.view addSubview:button10];
|
||||
[self.view addSubview:button11];
|
||||
[self.view addSubview:button12];
|
||||
}
|
||||
|
||||
// play background music
|
||||
- (void)button1Click:(UIButton*)sender{
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic("background.mp3", true);
|
||||
}
|
||||
|
||||
// stop background music
|
||||
- (void)button2Click:(UIButton*)sender{
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->stopBackgroundMusic();
|
||||
}
|
||||
|
||||
// pause background music
|
||||
- (void)button3Click:(UIButton*)sender{
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
|
||||
}
|
||||
|
||||
// resume background music
|
||||
- (void)button4Click:(UIButton*)sender{
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
|
||||
}
|
||||
|
||||
// rewind background music
|
||||
- (void)button5Click:(UIButton*)sender{
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->rewindBackgroundMusic();
|
||||
}
|
||||
|
||||
// add background music volume
|
||||
- (void)button6Click:(UIButton*)sender{
|
||||
int volume = CocosDenshion::SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume();
|
||||
NSAssert(volume <= 100 && volume >= 0, @"invalid volume");
|
||||
|
||||
volume += 1;
|
||||
if (volume > 100) {
|
||||
volume = 100;
|
||||
}
|
||||
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(volume);
|
||||
}
|
||||
|
||||
// sub background music volume
|
||||
- (void)button7Click:(UIButton*)sender{
|
||||
int volume = CocosDenshion::SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume();
|
||||
NSAssert(volume <= 100 && volume >= 0, @"invalid volume");
|
||||
|
||||
volume -= 1;
|
||||
if (volume < 0) {
|
||||
volume = 0;
|
||||
}
|
||||
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(volume);
|
||||
}
|
||||
|
||||
// is background music playing
|
||||
- (void)button8Click:(UIButton*)sender{
|
||||
if (CocosDenshion::SimpleAudioEngine::sharedEngine()->isBackgroundMusicPlaying()) {
|
||||
NSLog(@"background music is playing");
|
||||
}
|
||||
else {
|
||||
NSLog(@"background music is not playing");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// play effect
|
||||
- (void)button9Click:(UIButton*)sender{
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect("Effect1.wav");
|
||||
}
|
||||
|
||||
// add effect music volume
|
||||
- (void)button10Click:(UIButton*)sender{
|
||||
int volume = CocosDenshion::SimpleAudioEngine::sharedEngine()->getEffectsVolume();
|
||||
NSAssert(volume <= 100 && volume >= 0, @"invalid volume");
|
||||
|
||||
volume += 1;
|
||||
if (volume > 100) {
|
||||
volume = 100;
|
||||
}
|
||||
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->setEffectsVolume(volume);
|
||||
}
|
||||
|
||||
// sub effect music volume
|
||||
- (void)button11Click:(UIButton*)sender{
|
||||
int volume = CocosDenshion::SimpleAudioEngine::sharedEngine()->getEffectsVolume();
|
||||
NSAssert(volume <= 100 && volume >= 0, @"invalid volume");
|
||||
|
||||
volume -= 1;
|
||||
if (volume < 0) {
|
||||
volume = 0;
|
||||
}
|
||||
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->setEffectsVolume(volume);
|
||||
}
|
||||
|
||||
// reset
|
||||
- (void)button12Click:(UIButton*)sender{
|
||||
CocosDenshion::SimpleAudioEngine::sharedEngine()->end();
|
||||
}
|
||||
|
||||
/*
|
||||
// Override to allow orientations other than the default portrait orientation.
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
// Return YES for supported orientations
|
||||
return (interfaceOrientation == UIInterfaceOrientationPortrait);
|
||||
}
|
||||
*/
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
// Releases the view if it doesn't have a superview.
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
// Release any cached data, images, etc that aren't in use.
|
||||
}
|
||||
|
||||
- (void)viewDidUnload {
|
||||
// Release any retained subviews of the main view.
|
||||
// e.g. self.myOutlet = nil;
|
||||
}
|
||||
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,444 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1024</int>
|
||||
<string key="IBDocument.SystemVersion">10D571</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">786</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||
<string key="IBDocument.HIToolboxVersion">460.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">112</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="10"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBProxyObject" id="841351856">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="427554174">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUICustomObject" id="664661524">
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIViewController" id="943309135">
|
||||
<string key="IBUINibName">TestAudioEngine_iphoneViewController</string>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
<object class="IBUIWindow" id="117978783">
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrameSize">{320, 480}</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MSAxIDEAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIResizesToFullScreen">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="841351856"/>
|
||||
<reference key="destination" ref="664661524"/>
|
||||
</object>
|
||||
<int key="connectionID">4</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">viewController</string>
|
||||
<reference key="source" ref="664661524"/>
|
||||
<reference key="destination" ref="943309135"/>
|
||||
</object>
|
||||
<int key="connectionID">11</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">window</string>
|
||||
<reference key="source" ref="664661524"/>
|
||||
<reference key="destination" ref="117978783"/>
|
||||
</object>
|
||||
<int key="connectionID">14</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="841351856"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">3</int>
|
||||
<reference key="object" ref="664661524"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">TestAudioEngine_iphone App Delegate</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="427554174"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">10</int>
|
||||
<reference key="object" ref="943309135"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">12</int>
|
||||
<reference key="object" ref="117978783"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.CustomClassName</string>
|
||||
<string>-2.CustomClassName</string>
|
||||
<string>10.CustomClassName</string>
|
||||
<string>10.IBEditorWindowLastContentRect</string>
|
||||
<string>10.IBPluginDependency</string>
|
||||
<string>12.IBEditorWindowLastContentRect</string>
|
||||
<string>12.IBPluginDependency</string>
|
||||
<string>3.CustomClassName</string>
|
||||
<string>3.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIApplication</string>
|
||||
<string>UIResponder</string>
|
||||
<string>TestAudioEngine_iphoneViewController</string>
|
||||
<string>{{234, 376}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>{{525, 346}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>TestAudioEngine_iphoneAppDelegate</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">15</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIWindow</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">TestAudioEngine_iphoneAppDelegate</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>viewController</string>
|
||||
<string>window</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>TestAudioEngine_iphoneViewController</string>
|
||||
<string>UIWindow</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>viewController</string>
|
||||
<string>window</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">viewController</string>
|
||||
<string key="candidateClassName">TestAudioEngine_iphoneViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">window</string>
|
||||
<string key="candidateClassName">UIWindow</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/TestAudioEngine_iphoneAppDelegate.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">TestAudioEngine_iphoneAppDelegate</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">TestAudioEngine_iphoneViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/TestAudioEngine_iphoneViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="356479594">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIApplication</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIResponder</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<reference key="sourceIdentifier" ref="356479594"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISearchBar</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISearchDisplayController</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIView</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIWindow</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<integer value="1024" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3100" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<string key="IBDocument.LastKnownRelativeProjectPath">TestAudioEngine.iphone.xcodeproj</string>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">112</string>
|
||||
</data>
|
||||
</archive>
|
|
@ -1,467 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1D3623260D0F684500981E51 /* TestAudioEngine_iphoneAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* TestAudioEngine_iphoneAppDelegate.m */; };
|
||||
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
|
||||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
|
||||
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
|
||||
2899E5220DE3E06400AC0155 /* TestAudioEngine_iphoneViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* TestAudioEngine_iphoneViewController.xib */; };
|
||||
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
|
||||
BF5A4C7712D85DE200F0209F /* TestAudioEngine_iphoneViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF5A4C7612D85DE200F0209F /* TestAudioEngine_iphoneViewController.mm */; };
|
||||
BF5A4CB212D85EEC00F0209F /* Export.h in Headers */ = {isa = PBXBuildFile; fileRef = BF5A4C8912D85EEC00F0209F /* Export.h */; };
|
||||
BF5A4CB312D85EEC00F0209F /* SimpleAudioEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = BF5A4C8A12D85EEC00F0209F /* SimpleAudioEngine.h */; };
|
||||
BF5A4CB412D85EEC00F0209F /* CDAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = BF5A4C8C12D85EEC00F0209F /* CDAudioManager.h */; };
|
||||
BF5A4CB512D85EEC00F0209F /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BF5A4C8D12D85EEC00F0209F /* CDAudioManager.m */; };
|
||||
BF5A4CB612D85EEC00F0209F /* CDConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = BF5A4C8E12D85EEC00F0209F /* CDConfig.h */; };
|
||||
BF5A4CB712D85EEC00F0209F /* CDOpenALSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = BF5A4C8F12D85EEC00F0209F /* CDOpenALSupport.h */; };
|
||||
BF5A4CB812D85EEC00F0209F /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = BF5A4C9012D85EEC00F0209F /* CDOpenALSupport.m */; };
|
||||
BF5A4CB912D85EEC00F0209F /* CocosDenshion.h in Headers */ = {isa = PBXBuildFile; fileRef = BF5A4C9112D85EEC00F0209F /* CocosDenshion.h */; };
|
||||
BF5A4CBA12D85EEC00F0209F /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = BF5A4C9212D85EEC00F0209F /* CocosDenshion.m */; };
|
||||
BF5A4CBB12D85EEC00F0209F /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF5A4C9312D85EEC00F0209F /* SimpleAudioEngine.mm */; };
|
||||
BF5A4CBC12D85EEC00F0209F /* SimpleAudioEngine_objc.h in Headers */ = {isa = PBXBuildFile; fileRef = BF5A4C9412D85EEC00F0209F /* SimpleAudioEngine_objc.h */; };
|
||||
BF5A4CBD12D85EEC00F0209F /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = BF5A4C9512D85EEC00F0209F /* SimpleAudioEngine_objc.m */; };
|
||||
BF5A4CD212D85F1400F0209F /* libCocosDenshion.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BF5A4C8412D85EDE00F0209F /* libCocosDenshion.a */; };
|
||||
BF5A4D7B12D8654200F0209F /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF5A4D7A12D8654200F0209F /* OpenAL.framework */; };
|
||||
BF5A4D8212D8655F00F0209F /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF5A4D8112D8655F00F0209F /* AVFoundation.framework */; };
|
||||
BF5A4D8912D8657800F0209F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF5A4D8812D8657800F0209F /* AudioToolbox.framework */; };
|
||||
BF5A4DAE12D86B7B00F0209F /* background.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BF5A4DAB12D86B7B00F0209F /* background.mp3 */; };
|
||||
BF5A4DAF12D86B7B00F0209F /* Effect1.wav in Resources */ = {isa = PBXBuildFile; fileRef = BF5A4DAC12D86B7B00F0209F /* Effect1.wav */; };
|
||||
BF5A4DB012D86B7B00F0209F /* Effect2.wav in Resources */ = {isa = PBXBuildFile; fileRef = BF5A4DAD12D86B7B00F0209F /* Effect2.wav */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
BF5A4CD012D85F0E00F0209F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = BF5A4C8312D85EDE00F0209F;
|
||||
remoteInfo = CocosDenshion;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
1D3623240D0F684500981E51 /* TestAudioEngine_iphoneAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestAudioEngine_iphoneAppDelegate.h; sourceTree = "<group>"; };
|
||||
1D3623250D0F684500981E51 /* TestAudioEngine_iphoneAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestAudioEngine_iphoneAppDelegate.m; sourceTree = "<group>"; };
|
||||
1D6058910D05DD3D006BFB54 /* TestAudioEngine.iphone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestAudioEngine.iphone.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
2899E5210DE3E06400AC0155 /* TestAudioEngine_iphoneViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TestAudioEngine_iphoneViewController.xib; sourceTree = "<group>"; };
|
||||
28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
|
||||
28D7ACF60DDB3853001CB0EB /* TestAudioEngine_iphoneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestAudioEngine_iphoneViewController.h; sourceTree = "<group>"; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
32CA4F630368D1EE00C91783 /* TestAudioEngine_iphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestAudioEngine_iphone_Prefix.pch; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* TestAudioEngine_iphone-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TestAudioEngine_iphone-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
|
||||
BF5A4C7612D85DE200F0209F /* TestAudioEngine_iphoneViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestAudioEngine_iphoneViewController.mm; sourceTree = "<group>"; };
|
||||
BF5A4C8412D85EDE00F0209F /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCocosDenshion.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BF5A4C8912D85EEC00F0209F /* Export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = "<group>"; };
|
||||
BF5A4C8A12D85EEC00F0209F /* SimpleAudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine.h; sourceTree = "<group>"; };
|
||||
BF5A4C8C12D85EEC00F0209F /* CDAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = "<group>"; };
|
||||
BF5A4C8D12D85EEC00F0209F /* CDAudioManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDAudioManager.m; sourceTree = "<group>"; };
|
||||
BF5A4C8E12D85EEC00F0209F /* CDConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDConfig.h; sourceTree = "<group>"; };
|
||||
BF5A4C8F12D85EEC00F0209F /* CDOpenALSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDOpenALSupport.h; sourceTree = "<group>"; };
|
||||
BF5A4C9012D85EEC00F0209F /* CDOpenALSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDOpenALSupport.m; sourceTree = "<group>"; };
|
||||
BF5A4C9112D85EEC00F0209F /* CocosDenshion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosDenshion.h; sourceTree = "<group>"; };
|
||||
BF5A4C9212D85EEC00F0209F /* CocosDenshion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocosDenshion.m; sourceTree = "<group>"; };
|
||||
BF5A4C9312D85EEC00F0209F /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = "<group>"; };
|
||||
BF5A4C9412D85EEC00F0209F /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = "<group>"; };
|
||||
BF5A4C9512D85EEC00F0209F /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = "<group>"; };
|
||||
BF5A4D7A12D8654200F0209F /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
|
||||
BF5A4D8112D8655F00F0209F /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
BF5A4D8812D8657800F0209F /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
BF5A4DAB12D86B7B00F0209F /* background.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = background.mp3; sourceTree = "<group>"; };
|
||||
BF5A4DAC12D86B7B00F0209F /* Effect1.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = Effect1.wav; sourceTree = "<group>"; };
|
||||
BF5A4DAD12D86B7B00F0209F /* Effect2.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = Effect2.wav; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
|
||||
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */,
|
||||
BF5A4CD212D85F1400F0209F /* libCocosDenshion.a in Frameworks */,
|
||||
BF5A4D7B12D8654200F0209F /* OpenAL.framework in Frameworks */,
|
||||
BF5A4D8212D8655F00F0209F /* AVFoundation.framework in Frameworks */,
|
||||
BF5A4D8912D8657800F0209F /* AudioToolbox.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
BF5A4C8212D85EDE00F0209F /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BF5A4C7612D85DE200F0209F /* TestAudioEngine_iphoneViewController.mm */,
|
||||
1D3623240D0F684500981E51 /* TestAudioEngine_iphoneAppDelegate.h */,
|
||||
1D3623250D0F684500981E51 /* TestAudioEngine_iphoneAppDelegate.m */,
|
||||
28D7ACF60DDB3853001CB0EB /* TestAudioEngine_iphoneViewController.h */,
|
||||
);
|
||||
path = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1D6058910D05DD3D006BFB54 /* TestAudioEngine.iphone.app */,
|
||||
BF5A4C8412D85EDE00F0209F /* libCocosDenshion.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BF5A4DAA12D86B7B00F0209F /* Sounds */,
|
||||
BF5A4C8712D85EEC00F0209F /* CocosDenshion */,
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
BF5A4D7A12D8654200F0209F /* OpenAL.framework */,
|
||||
BF5A4D8112D8655F00F0209F /* AVFoundation.framework */,
|
||||
BF5A4D8812D8657800F0209F /* AudioToolbox.framework */,
|
||||
);
|
||||
name = CustomTemplate;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
32CA4F630368D1EE00C91783 /* TestAudioEngine_iphone_Prefix.pch */,
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2899E5210DE3E06400AC0155 /* TestAudioEngine_iphoneViewController.xib */,
|
||||
28AD733E0D9D9553002E5188 /* MainWindow.xib */,
|
||||
8D1107310486CEB800E47090 /* TestAudioEngine_iphone-Info.plist */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
|
||||
1D30AB110D05D00D00671497 /* Foundation.framework */,
|
||||
288765A40DF7441C002DB57D /* CoreGraphics.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BF5A4C8712D85EEC00F0209F /* CocosDenshion */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BF5A4C8812D85EEC00F0209F /* include */,
|
||||
BF5A4C8B12D85EEC00F0209F /* iphone */,
|
||||
);
|
||||
name = CocosDenshion;
|
||||
path = ../CocosDenshion;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
BF5A4C8812D85EEC00F0209F /* include */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BF5A4C8912D85EEC00F0209F /* Export.h */,
|
||||
BF5A4C8A12D85EEC00F0209F /* SimpleAudioEngine.h */,
|
||||
);
|
||||
path = include;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BF5A4C8B12D85EEC00F0209F /* iphone */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BF5A4C8C12D85EEC00F0209F /* CDAudioManager.h */,
|
||||
BF5A4C8D12D85EEC00F0209F /* CDAudioManager.m */,
|
||||
BF5A4C8E12D85EEC00F0209F /* CDConfig.h */,
|
||||
BF5A4C8F12D85EEC00F0209F /* CDOpenALSupport.h */,
|
||||
BF5A4C9012D85EEC00F0209F /* CDOpenALSupport.m */,
|
||||
BF5A4C9112D85EEC00F0209F /* CocosDenshion.h */,
|
||||
BF5A4C9212D85EEC00F0209F /* CocosDenshion.m */,
|
||||
BF5A4C9312D85EEC00F0209F /* SimpleAudioEngine.mm */,
|
||||
BF5A4C9412D85EEC00F0209F /* SimpleAudioEngine_objc.h */,
|
||||
BF5A4C9512D85EEC00F0209F /* SimpleAudioEngine_objc.m */,
|
||||
);
|
||||
path = iphone;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BF5A4DAA12D86B7B00F0209F /* Sounds */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BF5A4DAB12D86B7B00F0209F /* background.mp3 */,
|
||||
BF5A4DAC12D86B7B00F0209F /* Effect1.wav */,
|
||||
BF5A4DAD12D86B7B00F0209F /* Effect2.wav */,
|
||||
);
|
||||
path = Sounds;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
BF5A4C8012D85EDE00F0209F /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BF5A4CB212D85EEC00F0209F /* Export.h in Headers */,
|
||||
BF5A4CB312D85EEC00F0209F /* SimpleAudioEngine.h in Headers */,
|
||||
BF5A4CB412D85EEC00F0209F /* CDAudioManager.h in Headers */,
|
||||
BF5A4CB612D85EEC00F0209F /* CDConfig.h in Headers */,
|
||||
BF5A4CB712D85EEC00F0209F /* CDOpenALSupport.h in Headers */,
|
||||
BF5A4CB912D85EEC00F0209F /* CocosDenshion.h in Headers */,
|
||||
BF5A4CBC12D85EEC00F0209F /* SimpleAudioEngine_objc.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
1D6058900D05DD3D006BFB54 /* TestAudioEngine.iphone */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TestAudioEngine.iphone" */;
|
||||
buildPhases = (
|
||||
1D60588D0D05DD3D006BFB54 /* Resources */,
|
||||
1D60588E0D05DD3D006BFB54 /* Sources */,
|
||||
1D60588F0D05DD3D006BFB54 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
BF5A4CD112D85F0E00F0209F /* PBXTargetDependency */,
|
||||
);
|
||||
name = TestAudioEngine.iphone;
|
||||
productName = TestAudioEngine.iphone;
|
||||
productReference = 1D6058910D05DD3D006BFB54 /* TestAudioEngine.iphone.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
BF5A4C8312D85EDE00F0209F /* CocosDenshion */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = BF5A4CCF12D85EEC00F0209F /* Build configuration list for PBXNativeTarget "CocosDenshion" */;
|
||||
buildPhases = (
|
||||
BF5A4C8012D85EDE00F0209F /* Headers */,
|
||||
BF5A4C8112D85EDE00F0209F /* Sources */,
|
||||
BF5A4C8212D85EDE00F0209F /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = CocosDenshion;
|
||||
productName = CocosDenshion;
|
||||
productReference = BF5A4C8412D85EDE00F0209F /* libCocosDenshion.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TestAudioEngine.iphone" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
1D6058900D05DD3D006BFB54 /* TestAudioEngine.iphone */,
|
||||
BF5A4C8312D85EDE00F0209F /* CocosDenshion */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
1D60588D0D05DD3D006BFB54 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
|
||||
2899E5220DE3E06400AC0155 /* TestAudioEngine_iphoneViewController.xib in Resources */,
|
||||
BF5A4DAE12D86B7B00F0209F /* background.mp3 in Resources */,
|
||||
BF5A4DAF12D86B7B00F0209F /* Effect1.wav in Resources */,
|
||||
BF5A4DB012D86B7B00F0209F /* Effect2.wav in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
1D60588E0D05DD3D006BFB54 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
|
||||
1D3623260D0F684500981E51 /* TestAudioEngine_iphoneAppDelegate.m in Sources */,
|
||||
BF5A4C7712D85DE200F0209F /* TestAudioEngine_iphoneViewController.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
BF5A4C8112D85EDE00F0209F /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BF5A4CB512D85EEC00F0209F /* CDAudioManager.m in Sources */,
|
||||
BF5A4CB812D85EEC00F0209F /* CDOpenALSupport.m in Sources */,
|
||||
BF5A4CBA12D85EEC00F0209F /* CocosDenshion.m in Sources */,
|
||||
BF5A4CBB12D85EEC00F0209F /* SimpleAudioEngine.mm in Sources */,
|
||||
BF5A4CBD12D85EEC00F0209F /* SimpleAudioEngine_objc.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
BF5A4CD112D85F0E00F0209F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = BF5A4C8312D85EDE00F0209F /* CocosDenshion */;
|
||||
targetProxy = BF5A4CD012D85F0E00F0209F /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1D6058940D05DD3E006BFB54 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = TestAudioEngine_iphone_Prefix.pch;
|
||||
INFOPLIST_FILE = "TestAudioEngine_iphone-Info.plist";
|
||||
PRODUCT_NAME = TestAudioEngine.iphone;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1D6058950D05DD3E006BFB54 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = TestAudioEngine_iphone_Prefix.pch;
|
||||
INFOPLIST_FILE = "TestAudioEngine_iphone-Info.plist";
|
||||
PRODUCT_NAME = TestAudioEngine.iphone;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
BF5A4C8512D85EDE00F0209F /* 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;
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = CocosDenshion;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
BF5A4C8612D85EDE00F0209F /* 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;
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = CocosDenshion;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
|
||||
PREBINDING = NO;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TestAudioEngine.iphone" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1D6058940D05DD3E006BFB54 /* Debug */,
|
||||
1D6058950D05DD3E006BFB54 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
BF5A4CCF12D85EEC00F0209F /* Build configuration list for PBXNativeTarget "CocosDenshion" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
BF5A4C8512D85EDE00F0209F /* Debug */,
|
||||
BF5A4C8612D85EDE00F0209F /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TestAudioEngine.iphone" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4F08A954540054247B /* Debug */,
|
||||
C01FCF5008A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
|
@ -1,156 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">800</int>
|
||||
<string key="IBDocument.SystemVersion">10C540</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">759</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.25</string>
|
||||
<string key="IBDocument.HIToolboxVersion">458.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">77</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="6"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="843779117">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="774585933">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC43NQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="774585933"/>
|
||||
</object>
|
||||
<int key="connectionID">7</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="843779117"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="774585933"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.CustomClassName</string>
|
||||
<string>-2.CustomClassName</string>
|
||||
<string>6.IBEditorWindowLastContentRect</string>
|
||||
<string>6.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>TestAudioEngine_iphoneViewController</string>
|
||||
<string>UIResponder</string>
|
||||
<string>{{239, 654}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">7</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">TestAudioEngine_iphoneViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/TestAudioEngine_iphoneViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3100" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<string key="IBDocument.LastKnownRelativeProjectPath">TestAudioEngine.iphone.xcodeproj</string>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">77</string>
|
||||
<nil key="IBCocoaTouchSimulationTargetRuntimeIdentifier"/>
|
||||
</data>
|
||||
</archive>
|
|
@ -1,8 +0,0 @@
|
|||
//
|
||||
// Prefix header for all source files of the 'TestAudioEngine.iphone' target in the 'TestAudioEngine.iphone' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#endif
|
|
@ -1,17 +0,0 @@
|
|||
//
|
||||
// main.m
|
||||
// TestAudioEngine.iphone
|
||||
//
|
||||
// Created by Walzer on 11-1-8.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||
int retVal = UIApplicationMain(argc, argv, nil, nil);
|
||||
[pool release];
|
||||
return retVal;
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
|
||||
############################################################################
|
||||
#
|
||||
# Makefile for building : TestAudioEngine_Arm.TMK3
|
||||
# Created by TMK3_V2.3, please do not modify.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
TO_PROJECT_ROOT = ../../PRJ_TG3
|
||||
OUTPUT_FILENAME = libTestAudioEngine.so
|
||||
|
||||
include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_Base_DynamicLib.ARM
|
||||
include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_TOPS_Def.ARM
|
||||
|
||||
DEFINES += -DUNDER_UPHONE
|
||||
INCLUDE_PATH += -I. -I./Res \
|
||||
-I../CocosDenshion/include
|
||||
LIBS += -lCocosDenshionStatic -lTSoundPlayer -lz
|
||||
|
||||
OBJECTS_DIR = ./Debug-ARM
|
||||
DESTDIR = $(TO_PROJECT_ROOT)/$(BIN_OUTPUT_DIR)
|
||||
TARGET = $(DESTDIR)/$(OUTPUT_FILENAME)
|
||||
|
||||
DEL_FILE = rm -f
|
||||
MKDIR = mkdir -p
|
||||
|
||||
first: all
|
||||
|
||||
OBJECTS = \
|
||||
$(OBJECTS_DIR)/TestAudioEngineApp.o \
|
||||
$(OBJECTS_DIR)/TestAudioEngineEntry.o \
|
||||
$(OBJECTS_DIR)/TestAudioEngineMainForm.o \
|
||||
$(OBJECTS_DIR)/TG3AppDllEntry.o
|
||||
|
||||
ADD_OBJECTS +=
|
||||
|
||||
$(OBJECTS_DIR) :
|
||||
$(MKDIR) $(OBJECTS_DIR)
|
||||
|
||||
$(DESTDIR) :
|
||||
$(MKDIR) $(DESTDIR)
|
||||
|
||||
all : $(OBJECTS_DIR) $(DESTDIR) $(TARGET)
|
||||
|
||||
$(TARGET) : $(OBJECTS)
|
||||
$(LINK) $(LINK_FLAGS) -o $(TARGET) $(SYS_OBJECTS) $(OBJECTS) $(ADD_OBJECTS) $(LIBS) $(SYS_LIBS)
|
||||
|
||||
clean :
|
||||
-$(DEL_FILE) $(OBJECTS)
|
||||
-$(DEL_FILE) $(TARGET)
|
||||
|
||||
$(OBJECTS_DIR)/TestAudioEngineApp.o : ./TestAudioEngineApp.cpp
|
||||
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/TestAudioEngineApp.o ./TestAudioEngineApp.cpp
|
||||
|
||||
$(OBJECTS_DIR)/TestAudioEngineEntry.o : ./TestAudioEngineEntry.cpp
|
||||
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/TestAudioEngineEntry.o ./TestAudioEngineEntry.cpp
|
||||
|
||||
$(OBJECTS_DIR)/TestAudioEngineMainForm.o : ./TestAudioEngineMainForm.cpp
|
||||
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/TestAudioEngineMainForm.o ./TestAudioEngineMainForm.cpp
|
||||
|
||||
$(OBJECTS_DIR)/TG3AppDllEntry.o : ./TG3AppDllEntry.cpp
|
||||
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/TG3AppDllEntry.o ./TG3AppDllEntry.cpp
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
|
||||
/*!
|
||||
* @file NewDeleteOp.cpp
|
||||
* @author 全智达
|
||||
* @brief
|
||||
*
|
||||
* @section Copyright
|
||||
* =======================================================================<br>
|
||||
* <br>
|
||||
* Copyright (c) 2005-2010 Tranzda Technologies Co.,Ltd. <br>
|
||||
* 深圳市全智达科技有限公司 版权所有2005-2010<br>
|
||||
* <br>
|
||||
* PROPRIETARY RIGHTS of Tranzda Technologies Co.,Ltd. are involved in <br>
|
||||
* the subject matter of this material. All manufacturing, reproduction, <br>
|
||||
* use, and sales rights pertaining to this subject matter are governed <br>
|
||||
* by the license agreement. The recipient of this software implicitly <br>
|
||||
* accepts the terms of the license. <br>
|
||||
* 本软件文档资料是深圳市全智达科技有限公司的合法资产,任何人士阅读和使<br>
|
||||
* 用本资料必须获得相应的书面授权,承担保密责任和接受相应的法律约束。<br>
|
||||
* <br>
|
||||
* 公司网址:<a href="http://www.tranzda.com"> http://www.tranzda.com </a> <br>
|
||||
* 公司邮箱:<a mailto="support@tranzda.com">support@tranzda.com</a> <br>
|
||||
* =======================================================================<br>
|
||||
*/
|
||||
|
||||
#include "ssTypes.h"
|
||||
#include "TG3_Type.h"
|
||||
#include "TG3_Memory.h"
|
||||
|
||||
#ifdef new
|
||||
#undef new
|
||||
#endif
|
||||
|
||||
#ifdef delete
|
||||
#undef delete
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#define __cdecl
|
||||
#endif
|
||||
|
||||
void * __cdecl operator new(unsigned int size)
|
||||
{
|
||||
return TMalloc(size);
|
||||
}
|
||||
|
||||
void * __cdecl operator new[](unsigned int size)
|
||||
{
|
||||
return TMalloc(size);
|
||||
}
|
||||
|
||||
void * __cdecl operator new(unsigned int size, const unsigned short * fileName, int lineNo)
|
||||
{
|
||||
return TMallocEx(size, fileName, lineNo);
|
||||
}
|
||||
|
||||
void * __cdecl operator new[](unsigned int size, const unsigned short * fileName, int lineNo)
|
||||
{
|
||||
return TMallocEx(size, fileName, lineNo);
|
||||
}
|
||||
|
||||
void __cdecl operator delete(void *p)
|
||||
{
|
||||
TFree(p);
|
||||
}
|
||||
|
||||
void __cdecl operator delete[](void *p)
|
||||
{
|
||||
TFree(p);
|
||||
}
|
||||
|
||||
void __cdecl operator delete(void *p, const unsigned short * fileName, int lineNo)
|
||||
{
|
||||
TFreeEx(p, fileName, lineNo);
|
||||
}
|
||||
|
||||
void __cdecl operator delete[](void *p, const unsigned short * fileName, int lineNo)
|
||||
{
|
||||
TFreeEx(p, fileName, lineNo);
|
||||
}
|
||||
|
||||
|
|
@ -1,215 +0,0 @@
|
|||
|
||||
// Original file name: TestAudioEngine_Res.ENU.tr3
|
||||
// Generated by TOPS Builder 1.2.4.249 Date:2011-1-14
|
||||
|
||||
|
||||
//$VERSION 60006
|
||||
//$SETTINGS
|
||||
//$Begin
|
||||
//$VCPRJFILE=$002E$002E$005C$0054$0065$0073$0074$0041$0075$0064$0069$006F$0045$006E$0067$0069$006E$0065$002E$0076$0063$0070$0072$006F$006A
|
||||
//$End
|
||||
LANGUAGE = 1033
|
||||
// ImageLists
|
||||
|
||||
// Project
|
||||
PROJECT
|
||||
BEGIN
|
||||
ScreenWidth 320
|
||||
ScreenHeight 480
|
||||
ScreenDPI 16500
|
||||
END
|
||||
|
||||
|
||||
// TComObject
|
||||
|
||||
// Forms
|
||||
|
||||
FORM ID Form1002 AT(0,0,320,480)
|
||||
FRAME
|
||||
NOSAVEBEHIND
|
||||
BIClose
|
||||
DisableSystemStatusBar
|
||||
FullScreen
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
BEGIN
|
||||
TITLE $0054$0065$0073$0074$0041$0075$0064$0069$006F$0045$006E$0067$0069$006E$0065
|
||||
|
||||
BUTTON $0050$006C$0061$0079$0042$0061$0063$006B$0067$0072$006F$0075$006E$0064$004D$0075$0073$0069$0063 ID PlayBack AT(5,60,200,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 1
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0053$0074$006F$0070$0042$0061$0063$006B$0067$0072$006F$0075$006E$0064$004D$0075$0073$0069$0063 ID StopBack AT(5,95,200,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 2
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $004C$006F$0061$0064$0045$0066$0066$0065$0063$0074 ID LoadEffect AT(5,250,107,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 3
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0050$006C$0061$0079$0045$0066$0066$0065$0063$0074 ID PlayEffect AT(5,288,107,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 4
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0055$006E$004C$006F$0061$0064$0045$0066$0066$0065$0063$0074 ID UnLoadBtn AT(125,250,120,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 5
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0050$0061$0075$0073$0065 ID PauseBack AT(209,60,100,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 6
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0042$0061$0063$006B$0056$006F$006C$0075$006D$0065$0055$0070 ID BackVolumeUp AT(5,135,170,40) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 7
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0042$0061$0063$006B$0056$006F$006C$0075$006D$0065$0044$006F$0077$006E ID BackVolumeDown AT(5,180,170,40) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 8
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0045$0066$0066$0065$0063$0074$0056$006F$006C$0075$006D$0065$0055$0070 ID EffectVolumeUp AT(5,330,170,40) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 9
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0045$0066$0066$0065$0063$0074$0056$006F$006C$0075$006D$0065$0044$006F$0077$006E ID EffectVolumeDown AT(5,380,170,40) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 10
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
END
|
||||
|
||||
// Menus
|
||||
|
||||
// Alerts ¾¯¸æÏûÏ¢
|
||||
|
||||
// Strings
|
||||
|
||||
// Fonts
|
||||
|
||||
// Bitmaps
|
||||
|
||||
IMAGEFOLDER ID ResFolder1001 FOLDERNAME $0052$006F$006F$0074$0028$0041$006C$006C$0029
|
||||
// Îļþ¼Ð: Root(All)
|
||||
BEGIN
|
||||
END
|
||||
// raw data
|
||||
|
||||
// Application
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
|
||||
// Tranzda Translation File.
|
||||
// TOPS Builder use infomation contained by this file to
|
||||
// update the controls' trnaslation status.
|
||||
|
||||
// Original file name: TestAudioEngine_Res.ENU.tr3.tts
|
||||
// Generated by TOPS Builder 1.2.4.249 Date:2011-1-14
|
||||
|
||||
|
|
@ -1,217 +0,0 @@
|
|||
|
||||
// Original file name: TestAudioEngine_Res.TR3
|
||||
// Generated by TOPS Builder 1.2.4.249 Date:2011-1-14
|
||||
|
||||
|
||||
#include "TestAudioEngine_Res.h"
|
||||
|
||||
//$VERSION 60006
|
||||
//$SETTINGS
|
||||
//$Begin
|
||||
//$VCPRJFILE=$002E$002E$005C$0054$0065$0073$0074$0041$0075$0064$0069$006F$0045$006E$0067$0069$006E$0065$002E$0076$0063$0070$0072$006F$006A
|
||||
//$End
|
||||
LANGUAGE = 2052
|
||||
// ImageLists
|
||||
|
||||
// Project
|
||||
PROJECT
|
||||
BEGIN
|
||||
ScreenWidth 320
|
||||
ScreenHeight 480
|
||||
ScreenDPI 16500
|
||||
END
|
||||
|
||||
|
||||
// TComObject
|
||||
|
||||
// Forms
|
||||
|
||||
FORM ID Form1002 AT(0,0,320,480)
|
||||
FRAME
|
||||
NOSAVEBEHIND
|
||||
BIClose
|
||||
DisableSystemStatusBar
|
||||
FullScreen
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
BEGIN
|
||||
TITLE $0054$0065$0073$0074$0041$0075$0064$0069$006F$0045$006E$0067$0069$006E$0065
|
||||
|
||||
BUTTON $0050$006C$0061$0079$0042$0061$0063$006B$0067$0072$006F$0075$006E$0064$004D$0075$0073$0069$0063 ID PlayBack AT(5,60,200,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 1
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0053$0074$006F$0070$0042$0061$0063$006B$0067$0072$006F$0075$006E$0064$004D$0075$0073$0069$0063 ID StopBack AT(5,95,200,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 2
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $004C$006F$0061$0064$0045$0066$0066$0065$0063$0074 ID LoadEffect AT(5,250,107,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 3
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0050$006C$0061$0079$0045$0066$0066$0065$0063$0074 ID PlayEffect AT(5,288,107,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 4
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0055$006E$004C$006F$0061$0064$0045$0066$0066$0065$0063$0074 ID UnLoadBtn AT(125,250,120,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 5
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0050$0061$0075$0073$0065 ID PauseBack AT(209,60,100,30) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 6
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0042$0061$0063$006B$0056$006F$006C$0075$006D$0065$0055$0070 ID BackVolumeUp AT(5,135,170,40) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 7
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0042$0061$0063$006B$0056$006F$006C$0075$006D$0065$0044$006F$0077$006E ID BackVolumeDown AT(5,180,170,40) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 8
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0045$0066$0066$0065$0063$0074$0056$006F$006C$0075$006D$0065$0055$0070 ID EffectVolumeUp AT(5,330,170,40) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 9
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
|
||||
BUTTON $0045$0066$0066$0065$0063$0074$0056$006F$006C$0075$006D$0065$0044$006F$0077$006E ID EffectVolumeDown AT(5,380,170,40) LEFTANCHOR FRAME FONT 0 STYLE 0
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
TABSTOP
|
||||
TABORDER 10
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
END
|
||||
|
||||
// Menus
|
||||
|
||||
// Alerts ¾¯¸æÏûÏ¢
|
||||
|
||||
// Strings
|
||||
|
||||
// Fonts
|
||||
|
||||
// Bitmaps
|
||||
|
||||
IMAGEFOLDER ID ResFolder1001 FOLDERNAME $0052$006F$006F$0074$0028$0041$006C$006C$0029
|
||||
// Îļþ¼Ð: Root(All)
|
||||
BEGIN
|
||||
END
|
||||
// raw data
|
||||
|
||||
// Application
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
// Application resource group file.
|
||||
|
||||
// Original file name: TestAudioEngine_Res.TRG
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-9-29
|
||||
|
||||
|
||||
|
||||
VERSION 60001
|
||||
PROJECT
|
||||
Begin
|
||||
IsLangBase
|
||||
FileName = ".\TestAudioEngine_Res.TR3"
|
||||
End
|
||||
|
||||
PROJECT
|
||||
Begin
|
||||
FileName = ".\TestAudioEngine_Res.ENU.tr3"
|
||||
End
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
// Original file name: TestAudioEngine_Res.h
|
||||
// Generated by TOPS Builder 1.2.4.249 Date:2011-1-14
|
||||
|
||||
#define ResFolder1001 1001
|
||||
#define Form1002 1002
|
||||
#define PlayBack 1003
|
||||
#define StopBack 1004
|
||||
#define LoadEffect 1005
|
||||
#define PlayEffect 1007
|
||||
#define UnLoadBtn 1008
|
||||
#define PauseBack 1012
|
||||
#define BackVolumeUp 1013
|
||||
#define BackVolumeDown 1014
|
||||
#define EffectVolumeUp 1015
|
||||
#define EffectVolumeDown 1016
|
|
@ -1 +0,0 @@
|
|||
aec1c0a8c8068377fddca5ddd32084d8c3c3c419
|
File diff suppressed because it is too large
Load Diff
|
@ -1,41 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// TestAudioEngine_Res_def.h
|
||||
// 资源编译器转换文件ID宏声明文件
|
||||
//
|
||||
//
|
||||
// Copyright (C) Tranzda CORPORATION
|
||||
//
|
||||
//---┤编译器信息├---
|
||||
// 编译器名称: TR3C.exe
|
||||
// 编译器版本: TG3 资源编译器 版本V1.5 Build 94
|
||||
//
|
||||
//---┤注意├---
|
||||
// 警告:未经允许,任何人不准擅自修改此文件!!!否则后果自负!
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
#ifndef __TESTAUDIOENGINE_RES_DEF_H__
|
||||
#define __TESTAUDIOENGINE_RES_DEF_H__
|
||||
|
||||
#define TESTAU_ID_Form1002 1073742826 /*"TestAudioEngine"*/
|
||||
|
||||
#define TESTAU_ID_Form1002_PlayBack 1073742827/*"PlayBackgroundMusic"*/
|
||||
|
||||
#define TESTAU_ID_Form1002_StopBack 1073742828/*"StopBackgroundMusic"*/
|
||||
|
||||
#define TESTAU_ID_Form1002_LoadEffect 1073742829/*"LoadEffect"*/
|
||||
|
||||
#define TESTAU_ID_Form1002_PlayEffect 1073742831/*"PlayEffect"*/
|
||||
|
||||
#define TESTAU_ID_Form1002_UnLoadBtn 1073742832/*"UnLoadEffect"*/
|
||||
|
||||
#define TESTAU_ID_Form1002_PauseBack 1073742836/*"Pause"*/
|
||||
|
||||
#define TESTAU_ID_Form1002_BackVolumeUp 1073742837/*"BackVolumeUp"*/
|
||||
|
||||
#define TESTAU_ID_Form1002_BackVolumeDown 1073742838/*"BackVolumeDown"*/
|
||||
|
||||
#define TESTAU_ID_Form1002_EffectVolumeUp 1073742839/*"EffectVolumeUp"*/
|
||||
|
||||
#define TESTAU_ID_Form1002_EffectVolumeDown 1073742840/*"EffectVolumeDown"*/
|
||||
|
||||
#endif
|
|
@ -1,23 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// TestAudioEngine_Res_h.h
|
||||
// 资源编译器转换文件数据结构声明文件
|
||||
//
|
||||
//
|
||||
// Copyright (C) Tranzda CORPORATION
|
||||
//
|
||||
//---┤编译器信息├---
|
||||
// 编译器名称: TR3C.exe
|
||||
// 编译器版本: TG3 资源编译器 版本V1.5 Build 94
|
||||
//
|
||||
//---┤注意├---
|
||||
// 警告:未经允许,任何人不准擅自修改此文件!!!否则后果自负!
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
#ifndef __TESTAUDIOENGINE_RES_H_H__
|
||||
#define __TESTAUDIOENGINE_RES_H_H__
|
||||
|
||||
#include "ResTypes.h"
|
||||
|
||||
#include "testaudioengine_res_def.h"
|
||||
|
||||
#endif
|
|
@ -1,231 +0,0 @@
|
|||
|
||||
#include "ssGlobal.h"
|
||||
#include "ssTsd.h"
|
||||
#include "TG3_Type.h"
|
||||
#include <stdio.h>
|
||||
#include "TCOM.h"
|
||||
#include "ssAppMgr.h"
|
||||
#include "TG3AppDllEntry.h"
|
||||
|
||||
#ifdef __TCOM_SUPPORT__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//实现TCOM所需要的DLL函数
|
||||
|
||||
//DLL提供的获取指定CLSID的指定接口
|
||||
SS_EXPORT HRESULT TDllGetClassObject(TREFCLSID rclsid, TREFIID riid, LPVOID * ppv);
|
||||
|
||||
//DLL提供的查询DLL能否被Unload
|
||||
SS_EXPORT HRESULT TDllCanUnloadNow(void);
|
||||
|
||||
//DLL提供的把DLL的TCOM信息加入到注册表
|
||||
SS_EXPORT HRESULT TDllRegisterServer(void);
|
||||
|
||||
//DLL提供的把DLL的TCOM信息从注册表中删除
|
||||
SS_EXPORT HRESULT TDllUnregisterServer(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
//TCOM实现中需要用到的函数和数据
|
||||
|
||||
//实例对象被引用的次数
|
||||
static Int32 __TCOM_ClsidInstanceRefCount;
|
||||
|
||||
//ClassFactory被Locked的次数
|
||||
static Int32 __TCOM_CalssFactoryLockedCount;
|
||||
|
||||
//做必要的初始化
|
||||
static Int32 __TCOM_Init()
|
||||
{
|
||||
__TCOM_ClsidInstanceRefCount = 0;
|
||||
__TCOM_CalssFactoryLockedCount = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//做必要的清除工作
|
||||
static Int32 __TCOM_DeInit()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//DLL全局使用:增加对象实例被引用次数
|
||||
Int32 TCOM_AddClsidInstanceRefCount()
|
||||
{
|
||||
__TCOM_ClsidInstanceRefCount++;
|
||||
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
|
||||
SS_printf("[TCOM_SYSTEM] TCOM_AddClsidInstanceRefCount: address: %p, value: %d.\n",
|
||||
&__TCOM_ClsidInstanceRefCount, __TCOM_ClsidInstanceRefCount);
|
||||
#endif
|
||||
if(__TCOM_ClsidInstanceRefCount <= 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return __TCOM_ClsidInstanceRefCount;
|
||||
}
|
||||
|
||||
//DLL全局使用:减少对象实例被引用次数
|
||||
Int32 TCOM_DecClsidInstanceRefCount()
|
||||
{
|
||||
__TCOM_ClsidInstanceRefCount--;
|
||||
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
|
||||
SS_printf("[TCOM_SYSTEM] TCOM_DecClsidInstanceRefCount: address: %p, value: %d.\n",
|
||||
&__TCOM_ClsidInstanceRefCount, __TCOM_ClsidInstanceRefCount);
|
||||
#endif
|
||||
if(__TCOM_ClsidInstanceRefCount <= 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return __TCOM_ClsidInstanceRefCount;
|
||||
}
|
||||
|
||||
//DLL全局使用:增加ClassFactory被Locked的次数
|
||||
Int32 TCOM_AddCalssFactoryLockedCount()
|
||||
{
|
||||
__TCOM_CalssFactoryLockedCount++;
|
||||
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
|
||||
SS_printf("[TCOM_SYSTEM] TCOM_AddCalssFactoryLockedCount: address: %p, value: %d.\n",
|
||||
&__TCOM_CalssFactoryLockedCount, __TCOM_CalssFactoryLockedCount);
|
||||
#endif
|
||||
if(__TCOM_CalssFactoryLockedCount <= 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return __TCOM_CalssFactoryLockedCount;
|
||||
}
|
||||
|
||||
//DLL全局使用:减少ClassFactory被Locked的次数
|
||||
Int32 TCOM_DecCalssFactoryLockedCount()
|
||||
{
|
||||
__TCOM_CalssFactoryLockedCount--;
|
||||
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
|
||||
SS_printf("[TCOM_SYSTEM] TCOM_DecCalssFactoryLockedCount: address: %p, value: %d.\n",
|
||||
&__TCOM_CalssFactoryLockedCount, __TCOM_CalssFactoryLockedCount);
|
||||
#endif
|
||||
if(__TCOM_CalssFactoryLockedCount <= 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return __TCOM_CalssFactoryLockedCount;
|
||||
}
|
||||
|
||||
//实现TCOM所需要的DLL函数
|
||||
|
||||
//DLL提供的获取指定CLSID的指定接口
|
||||
SS_EXPORT HRESULT TDllGetClassObject(TREFCLSID rclsid, TREFIID riid, LPVOID * ppv)
|
||||
{
|
||||
return TCOM_Srv_GetClassObject(rclsid, riid, ppv);
|
||||
}
|
||||
|
||||
//DLL提供的查询DLL能否被Unload
|
||||
SS_EXPORT HRESULT TDllCanUnloadNow(void)
|
||||
{
|
||||
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
|
||||
SS_printf("[TCOM_SYSTEM] TDllCanUnloadNow: address1: %p, address2: %p, value1: %d, value2: %d.\n",
|
||||
&__TCOM_ClsidInstanceRefCount, &__TCOM_CalssFactoryLockedCount, __TCOM_ClsidInstanceRefCount,
|
||||
__TCOM_CalssFactoryLockedCount);
|
||||
#endif
|
||||
if((__TCOM_ClsidInstanceRefCount <= 0) && (__TCOM_CalssFactoryLockedCount <= 0))
|
||||
return TCOM_S_TRUE;
|
||||
return TCOM_S_FALSE;
|
||||
}
|
||||
|
||||
//DLL提供的把DLL的TCOM信息加入到注册表
|
||||
SS_EXPORT HRESULT TDllRegisterServer(void)
|
||||
{
|
||||
return TCOM_Srv_RegisterServer();
|
||||
}
|
||||
|
||||
//DLL提供的把DLL的TCOM信息从注册表中删除
|
||||
SS_EXPORT HRESULT TDllUnregisterServer(void)
|
||||
{
|
||||
return TCOM_Srv_UnregisterServer();
|
||||
}
|
||||
|
||||
#endif //__TCOM_SUPPORT__
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#ifndef SS_MAKEDLL
|
||||
#error Error!!! SS_MAKEDLL Must defined!
|
||||
#endif
|
||||
|
||||
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
||||
{
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
//进程加载动态库进行的操作
|
||||
#ifdef __TCOM_SUPPORT__
|
||||
__TCOM_Init();
|
||||
#endif
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
//线程加载动态库进行的操作
|
||||
break;
|
||||
case DLL_THREAD_DETACH:
|
||||
//线程卸载动态库进行的操作
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
//进程卸载动态库进行的操作
|
||||
#ifdef __TCOM_SUPPORT__
|
||||
__TCOM_DeInit();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
#else //linux
|
||||
|
||||
#ifndef SS_SHARED
|
||||
#error Error!!! SS_SHARED Must defined!
|
||||
#endif
|
||||
|
||||
void __attribute((constructor)) TG3_Dll_Attach()
|
||||
{
|
||||
//进程加载动态库进行的操作
|
||||
#ifdef __TCOM_SUPPORT__
|
||||
__TCOM_Init();
|
||||
#endif
|
||||
}
|
||||
|
||||
void __attribute((destructor)) TG3_Dll_Detach()
|
||||
{
|
||||
//进程卸载动态库进行的操作
|
||||
#ifdef __TCOM_SUPPORT__
|
||||
__TCOM_DeInit();
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//如果不是作为TG3的动态库应用,请在VC项目中和TMK3文件中定义 __TG3_PURE_DLL__ 宏
|
||||
#ifndef __TG3_PURE_DLL__
|
||||
|
||||
//动态库应用使用的统一导出名字的入口函数
|
||||
SS_EXPORT Int32 TDllTG3AppMain(const TUChar * pAppID, UInt32 nCmd, void * pCmdParam)
|
||||
{
|
||||
Int32 retValue;
|
||||
|
||||
//初始化TCOM
|
||||
TCoInitialize(NULL);
|
||||
|
||||
retValue = TG3AppMain(pAppID, nCmd, pCmdParam);
|
||||
|
||||
//释放TCOM
|
||||
TCoUninitialize();
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
|
||||
#ifndef __TG3_APP_DLL_ENTRY_H__
|
||||
#define __TG3_APP_DLL_ENTRY_H__
|
||||
|
||||
#ifndef __cplusplus
|
||||
#error This file need C++ support
|
||||
#endif
|
||||
|
||||
#if TG3_APP_ENTRY_MINIMUM_VERSION > 200
|
||||
#error Please replace TG3AppDllEntry.h and TG3AppDllEntry.cpp to newest version!
|
||||
#endif
|
||||
|
||||
#ifdef __TCOM_SUPPORT__
|
||||
|
||||
#include "TCOM.h"
|
||||
|
||||
//提供给DLL实现者调用的函数,用于在全局记录实例和ClassFactory被引用的次数,
|
||||
//这两个计数影响DLL是否可能被从内存中卸载,请大家在实例中内部实现计数的同时更新全局计数,
|
||||
//否则DLL很有可能会在实例还存在的时候被系统自动强制卸载
|
||||
|
||||
//DLL全局使用:增加对象实例被引用次数
|
||||
Int32 TCOM_AddClsidInstanceRefCount();
|
||||
|
||||
//DLL全局使用:减少对象实例被引用次数
|
||||
Int32 TCOM_DecClsidInstanceRefCount();
|
||||
|
||||
//DLL全局使用:增加ClassFactory被Locked的次数
|
||||
Int32 TCOM_AddCalssFactoryLockedCount();
|
||||
|
||||
//DLL全局使用:减少ClassFactory被Locked的次数
|
||||
Int32 TCOM_DecCalssFactoryLockedCount();
|
||||
|
||||
|
||||
//应用DLL在支持TCOM的时候提供给导出函数使用的函数
|
||||
|
||||
//应用根据给出的CLSID和ClassFactory接口IID返回ClassFactory的接口
|
||||
//返回值:参考TCOM_S_系列宏定义
|
||||
HRESULT TCOM_Srv_GetClassObject(TREFCLSID rclsid, TREFIID riid, LPVOID * ppv);
|
||||
|
||||
//应用提供的把TCOM信息加入到注册表
|
||||
//返回值:参考TCOM_S_系列宏定义
|
||||
HRESULT TCOM_Srv_RegisterServer(void);
|
||||
|
||||
//应用提供的把TCOM信息从注册表中删除
|
||||
//返回值:参考TCOM_S_系列宏定义
|
||||
HRESULT TCOM_Srv_UnregisterServer(void);
|
||||
|
||||
#endif //__TCOM_SUPPORT__
|
||||
|
||||
#endif //__TG3_APP_DLL_ENTRY_H__
|
||||
|
||||
|
||||
|
|
@ -1,317 +0,0 @@
|
|||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="TestAudioEngine"
|
||||
ProjectGUID="{93D51450-73EC-48FA-9CFB-2095757678B1}"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../PRJ_TG3/LIB/Win32Lib"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\Res;..\..\PRJ_TG3\Include;..\..\PRJ_TG3\Include\MTAPI;..\..\PRJ_TG3\Include\ThirdParty;..\..\PRJ_TG3\Include\TCOM;..\..\PRJ_TG3\TG3\Include;..\..\PRJ_TG3\TG3\TG3_Implement;..\..\PRJ_TG3\EOS_SYS;..\..\PRJ_TG3\Common\SoftSupport;..\..\PRJ_TG3\Common\ICU\Include;..\CocosDenshion\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_TRANZDA_VM_;SS_MAKEDLL"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
StructMemberAlignment="3"
|
||||
TreatWChar_tAsBuiltInType="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="WS2_32.Lib ..\..\PRJ_TG3\Common\SoftSupport\EosConfig.lib ..\..\PRJ_TG3\Common\SoftSupport\SoftSupport.lib ..\..\PRJ_TG3\Common\SoftSupport\TG3_DLL.lib"
|
||||
OutputFile="$(OutDir)/TestAudioEngine.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../../PRJ_TG3/Common/ICU/lib;../../PRJ_TG3/Mtapi/Win32/lib;../../PRJ_TG3/LIB/Win32Lib;../../PRJ_TG3/Common/SoftSupport"
|
||||
GenerateDebugInformation="true"
|
||||
GenerateMapFile="true"
|
||||
MapExports="true"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary="$(OutDir)/$(TargetName).lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="mkdir D:\Work7\NEWPLUS\TG3\APP
copy .\Res\sounds\*.* D:\Work7\NEWPLUS\TG3\APP
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../PRJ_TG3/LIB/Win32Lib"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=".\Res;..\..\PRJ_TG3\Include;..\..\PRJ_TG3\Include\MTAPI;..\..\PRJ_TG3\Include\ThirdParty;..\..\PRJ_TG3\Include\TCOM;..\..\PRJ_TG3\TG3\Include;..\..\PRJ_TG3\TG3\TG3_Implement;..\..\PRJ_TG3\EOS_SYS;..\..\PRJ_TG3\Common\SoftSupport;..\..\PRJ_TG3\Common\ICU\Include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_TRANZDA_VM_;SS_MAKEDLL"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/TestAudioEngine.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
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"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngineEntry.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngineEntry.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="app"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngineApp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngineApp.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="forms"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngineMainForm.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngineMainForm.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Res"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Res\sounds\background.mp3"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\sounds\Effect1.wav"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\sounds\Effect2.wav"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\TestAudioEngine_Res.ENU.tr3"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\TestAudioEngine_Res.ENU.tr3.tts"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\TestAudioEngine_Res.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\TestAudioEngine_Res.TR3"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\TestAudioEngine_Res.TRG"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\testaudioengine_res_c.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\testaudioengine_res_def.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\testaudioengine_res_h.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Makefiles"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Makefile.ARM"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngine_Arm.TMK3"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Framework"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\NewDeleteOp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TG3AppDllEntry.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TG3AppDllEntry.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngineUnicodeScript.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="..\..\PRJ_TG3\Common\StrConv\TzdStrConv_V1.exe $(InputPath) $(InputDir)$(InputName)_str.h
"
|
||||
AdditionalDependencies="..\..\PRJ_TG3\Common\StrConv\TzdStrConv_V1.exe"
|
||||
Outputs="$(InputDir)$(InputName)_str.h"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngineUnicodeScript_str.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,63 +0,0 @@
|
|||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioUserFile
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
ShowAllFiles="false"
|
||||
>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<DebugSettings
|
||||
Command="tg3_rundll.exe"
|
||||
WorkingDirectory=""
|
||||
CommandArguments="$(TargetPath)"
|
||||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor="0"
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<DebugSettings
|
||||
Command="$(TargetPath)"
|
||||
WorkingDirectory=""
|
||||
CommandArguments=""
|
||||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioUserFile>
|
|
@ -1,53 +0,0 @@
|
|||
// Application application cpp file.
|
||||
|
||||
// Original file name: TestAudioEngineApp.cpp
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-9-29
|
||||
|
||||
|
||||
#include "TestAudioEngineApp.h"
|
||||
#include "TestAudioEngineMainForm.h"
|
||||
TTestAudioEngineApp::TTestAudioEngineApp()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
TTestAudioEngineApp::~TTestAudioEngineApp()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Boolean TTestAudioEngineApp::EventHandler(EventType* pEvent)
|
||||
{
|
||||
Boolean bHandled = FALSE;
|
||||
|
||||
switch(pEvent->eType)
|
||||
{
|
||||
case EVENT_AppLoad:
|
||||
{
|
||||
TMainForm *pWin = new TMainForm(this);
|
||||
if (pWin)
|
||||
{
|
||||
SetActiveWindow(pWin);
|
||||
}
|
||||
else
|
||||
{ // 窗口创建失败,退出应用。
|
||||
SendStopEvent();
|
||||
}
|
||||
}
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
|
||||
case EVENT_AppStopNotify:
|
||||
{
|
||||
|
||||
}
|
||||
bHandled = FALSE;
|
||||
break;
|
||||
}
|
||||
if (FALSE == bHandled)
|
||||
{
|
||||
return TApplication::EventHandler(pEvent);
|
||||
}
|
||||
|
||||
return bHandled;
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
// Application application header file.
|
||||
|
||||
// Original file name: TestAudioEngineApp.h
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-9-29
|
||||
|
||||
|
||||
#ifndef __TestAudioEngine_App_H__
|
||||
#define __TestAudioEngine_App_H__
|
||||
#include "TG3.h"
|
||||
|
||||
class TTestAudioEngineApp : public TApplication
|
||||
{
|
||||
public:
|
||||
TTestAudioEngineApp();
|
||||
~TTestAudioEngineApp();
|
||||
public:
|
||||
virtual Boolean EventHandler(EventType * pEvent);
|
||||
protected:
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
// Application main file.
|
||||
|
||||
// Original file name: TestAudioEngineEntry.cpp
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-9-29
|
||||
|
||||
|
||||
|
||||
#include "TestAudioEngineEntry.h"
|
||||
#include "TestAudioEngineApp.h"
|
||||
#include "testaudioengine_res_c.h"
|
||||
|
||||
const ResourceRegisterEntry ResRegList_TestAudioEngine[] =
|
||||
{
|
||||
TG_RESOURCE_DEFINE
|
||||
};
|
||||
|
||||
const AppResourceEntry TestAudioEngineResourceEntry =
|
||||
{
|
||||
(ResourceRegisterEntry*)ResRegList_TestAudioEngine, // res list in this app
|
||||
sizeof(ResRegList_TestAudioEngine) / sizeof(ResourceRegisterEntry), //number of item in res
|
||||
};
|
||||
|
||||
Int32 TG3AppMain(const TUChar * pAppID, UInt32 nCmd, void * pCmdParam)
|
||||
{
|
||||
switch(nCmd)
|
||||
{
|
||||
case 0: // Ö÷Èë¿Ú
|
||||
{
|
||||
// UIÓ¦ÓóÌÐòÀý×Ó£º
|
||||
TTestAudioEngineApp * pApp= new TTestAudioEngineApp();
|
||||
pApp->WM_SetResourceEntry(&TestAudioEngineResourceEntry);
|
||||
pApp->Run();
|
||||
|
||||
delete pApp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
// Application main header file.
|
||||
|
||||
// Original file name: TestAudioEngineEntry.h
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-9-29
|
||||
|
||||
|
||||
|
||||
#ifndef __TestAudioEngine_Main_H__
|
||||
#define __TestAudioEngine_Main_H__
|
||||
#include "TG3.h"
|
||||
|
||||
#endif
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
// Application main form file.
|
||||
|
||||
// Original file name: TestAudioEngineMainForm.cpp
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-9-29
|
||||
|
||||
|
||||
|
||||
#include "TestAudioEngineMainForm.h"
|
||||
#include "testaudioengine_res_def.h"
|
||||
#include "TestAudioEngineUnicodeScript_str.h"
|
||||
#include "SimpleAudioEngine.h"
|
||||
#include <cassert>
|
||||
|
||||
using namespace CocosDenshion;
|
||||
|
||||
TMainForm::TMainForm(TApplication * pApp):TWindow(pApp)
|
||||
, m_nEffect2ID(0)
|
||||
{
|
||||
Create(TESTAU_ID_Form1002);
|
||||
}
|
||||
|
||||
TMainForm::~TMainForm()
|
||||
{
|
||||
SimpleAudioEngine::sharedEngine()->end();
|
||||
}
|
||||
|
||||
Boolean TMainForm::EventHandler(TApplication * pApp, EventType * pEvent)
|
||||
{
|
||||
Boolean bHandled = FALSE;
|
||||
|
||||
switch(pEvent->eType)
|
||||
{
|
||||
case EVENT_WinInit:
|
||||
{
|
||||
SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(30);
|
||||
SimpleAudioEngine::sharedEngine()->setEffectsVolume(30);
|
||||
bHandled = TRUE;
|
||||
}
|
||||
break;
|
||||
case EVENT_WinPaint:
|
||||
{
|
||||
DrawWindow();
|
||||
bHandled = TRUE;
|
||||
}
|
||||
break;
|
||||
case EVENT_CtrlSelect:
|
||||
{
|
||||
//switch(pEvent->sParam1)
|
||||
//{
|
||||
//case RES_SYSTEM_WINDOW_TITLE_BUTTON_ID:
|
||||
// bHandled = TRUE;
|
||||
// break;
|
||||
//}
|
||||
bHandled = CtrlSelected(pApp, pEvent);
|
||||
}
|
||||
break;
|
||||
case EVENT_WinClose:
|
||||
{
|
||||
// Stop the application since the main form has been closed
|
||||
pApp->SendStopEvent();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (FALSE == bHandled)
|
||||
{
|
||||
return TWindow::EventHandler(pApp,pEvent);
|
||||
}
|
||||
return bHandled;
|
||||
}
|
||||
|
||||
Boolean TMainForm::CtrlSelected(TApplication * pApp, EventType * pEvent)
|
||||
{
|
||||
Boolean bHandled = FALSE;
|
||||
SimpleAudioEngine* pAudioEngine = SimpleAudioEngine::sharedEngine();
|
||||
|
||||
switch (pEvent->sParam1)
|
||||
{
|
||||
case TESTAU_ID_Form1002_PlayBack:
|
||||
// play background music
|
||||
pAudioEngine->playBackgroundMusic("background.mp3", true);
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
|
||||
case TESTAU_ID_Form1002_PauseBack:
|
||||
// pause background music
|
||||
pAudioEngine->pauseBackgroundMusic();
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
|
||||
case TESTAU_ID_Form1002_StopBack:
|
||||
// stop background music
|
||||
pAudioEngine->stopBackgroundMusic();
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
|
||||
case TESTAU_ID_Form1002_BackVolumeUp:
|
||||
{
|
||||
int nCurVolume = pAudioEngine->getBackgroundMusicVolume();
|
||||
pAudioEngine->setBackgroundMusicVolume(nCurVolume + 5);
|
||||
bHandled = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case TESTAU_ID_Form1002_BackVolumeDown:
|
||||
{
|
||||
int nCurVolume = pAudioEngine->getBackgroundMusicVolume();
|
||||
pAudioEngine->setBackgroundMusicVolume(nCurVolume - 5);
|
||||
bHandled = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case TESTAU_ID_Form1002_LoadEffect:
|
||||
// load effect1
|
||||
pAudioEngine->preloadEffect("Effect1.wav");
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
|
||||
case TESTAU_ID_Form1002_UnLoadBtn:
|
||||
// unload effect1
|
||||
pAudioEngine->unloadEffect("Effect1.wav");
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
|
||||
case TESTAU_ID_Form1002_PlayEffect:
|
||||
// play effect2
|
||||
m_nEffect2ID = pAudioEngine->playEffect("Effect2.wav");
|
||||
/* assert(m_nEffect2ID >= 0);*/
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
|
||||
case TESTAU_ID_Form1002_EffectVolumeUp:
|
||||
{
|
||||
int nCurVolume = pAudioEngine->getEffectsVolume();
|
||||
pAudioEngine->setEffectsVolume(nCurVolume + 5);
|
||||
bHandled = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case TESTAU_ID_Form1002_EffectVolumeDown:
|
||||
{
|
||||
int nCurVolume = pAudioEngine->getEffectsVolume();
|
||||
pAudioEngine->setEffectsVolume(nCurVolume - 5);
|
||||
bHandled = TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return bHandled;
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
// Application main form file.
|
||||
|
||||
// Original file name: TestAudioEngineMainForm.h
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-9-29
|
||||
|
||||
|
||||
|
||||
#ifndef __TestAudioEngine_MainForm_H__
|
||||
#define __TestAudioEngine_MainForm_H__
|
||||
#include "TG3.h"
|
||||
|
||||
class TMainForm : public TWindow
|
||||
{
|
||||
public:
|
||||
|
||||
TMainForm(TApplication * pApp);
|
||||
|
||||
~TMainForm(void);
|
||||
|
||||
public:
|
||||
virtual Boolean EventHandler(TApplication * pApp, EventType * pEvent);
|
||||
Boolean CtrlSelected(TApplication * pApp, EventType * pEvent);
|
||||
protected:
|
||||
int m_nEffect2ID;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
// Unicode string resource scrip file,DOT NOT include it.
|
||||
|
||||
// Original file name: TestAudioEngineUnicodeScript.h
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-9-29
|
||||
|
||||
|
||||
|
||||
#define TZD_CONV(x, y)
|
||||
TZD_CONV(AppName_TestAudioEngine, "TestAudioEngine")
|
||||
TZD_CONV(UnloadedTip, "音频文件尚未载入!")
|
||||
TZD_CONV(FailedTitle, "失败")
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
;
|
||||
; TG3 Makefile Auto Create Script
|
||||
;
|
||||
; 说明:
|
||||
; 1.在等号左边不要有空格
|
||||
; 2.所有的路径请使用"/"来分隔
|
||||
; 3.所有的文件名不可以有空格
|
||||
; 4.只能对当前目录及其子目录下的.c、.cpp生成Makefile
|
||||
;
|
||||
|
||||
;本TMK3文件目录位置到项目根目录之间的转换,不支持多个串,如果有多个,以最后一个为准
|
||||
;即 ./$(TO_PROJECT_ROOT)/ 就是项目的根目录
|
||||
TO_PROJECT_ROOT=../../PRJ_TG3
|
||||
|
||||
;输出目标的名字,不支持多个串,如果有多个,以最后一个为准
|
||||
OUTPUT_FILENAME=libTestAudioEngine.so
|
||||
|
||||
;包含的其他的TMK3文件,此文件和本文件一起构成MakeFile的内容
|
||||
;此项可以出现在TMK3文件内的任意地方,与已经存在的项依次组合
|
||||
;注意:此项不支持绝对路径,但是可以使用$(TO_PROJECT_ROOT)构成文件名
|
||||
INCLUDE_TMK3=$(TO_PROJECT_ROOT)/MakeInclude/TG3_APP_Arm.TMK3 ;TOPS标准应用,包括动态库等
|
||||
|
||||
;预定义串,生成MakeFile的时候直接放在MakeFile的前面
|
||||
;格式:PRE_DEFINE=STRING,生成MakeFile的时候,"PRE_DEFINE="后面的所有非注释非续行字符都会放在MakeFile前面
|
||||
;例如:PRE_DEFINE=AAA=BBB,会放入AAA=BBB到MakeFile中
|
||||
;可以使用多个PRE_DEFINE串,也可以使用PRE_DEFINE1、PRE_DEFINE2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
;PRE_DEFINE=USE_IMAGEKIT=1 ;使用 ImageToolKit 库,此时生成的 Makefile 会自动连接有关的LIB
|
||||
;PRE_DEFINE=USE_ICU=1 ;使用 ICU 库,此时生成的 Makefile 会自动连接有关的LIB
|
||||
;PRE_DEFINE=USE_MTAPI=1 ;使用 MTAPI 库,此时生成的 Makefile 会自动连接有关的LIB
|
||||
|
||||
;C、C++预定义宏,可以使用多个DEFINES串,也可以使用DEFINES1、DEFINES2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
DEFINES=-DUNDER_UPHONE ;这里填入应用的自定义宏。注意:ITOPS自己的所需定义会自动包含,故此这里仅仅包含应用自己特有的定义即可
|
||||
;DEFINES=-D__TG3_PURE_DLL__ ;生成的是纯动态库(意思是:不是TOPS应用,但可以是TCOM组件)
|
||||
;DEFINES=-D__TCOM_SUPPORT__ ;生成的是TCOM组件(注意:TOPS应用也可以同时是TCOM组件)
|
||||
|
||||
;包含路径,可以使用多个INCLUDE_PATH串,也可以使用INCLUDE_PATH1、INCLUDE_PATH2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
INCLUDE_PATH=-I../CocosDenshion/include ;应用额外的包含路径。注意:ITOPS自己的所有路径都会自动包含,故此这里仅仅包含应用自己特有的路径即可
|
||||
|
||||
;连接的库文件,可以使用多个LIBS串,也可以使用LIBS1、LIBS2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
LIBS=-lCocosDenshionStatic -lTSoundPlayer -lz ;应用额外的连接库。注意:ITOPS自己的所需库自动包含,而且库包含路径也已经包含,故此这里仅仅包含应用自己特有的库的名字即可
|
||||
|
||||
;强制包含文件的名字,不能使用通配符,一定要使用相对或者绝对路径
|
||||
;极力要求使用相对路径,多个文件之间使用“|”分隔
|
||||
;强制包含文件指的是不在本文件夹及其子文件夹下的.c、.cpp、.o文件
|
||||
;可以使用多个INCLUDEFILE串,也可以使用INCLUDEFILE1、INCLUDEFILE2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
INCLUDEFILE=
|
||||
|
||||
;强制排除文件,不能使用通配符,一定要使用相对路径
|
||||
;多个文件之间使用“|”分隔,路径必须以"./","../"开始
|
||||
;只能对.c、.cpp文件进行排除
|
||||
;如果要排除本目录的文件也要加入"./"
|
||||
;可以使用多个EXCLUDEFILE串,也可以使用EXCLUDEFILE1、EXCLUDEFILE2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
EXCLUDEFILE=
|
|
@ -1,67 +0,0 @@
|
|||
|
||||
// TestAudioEngine-win32.cpp : Defines the class behaviors for the application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "TestAudioEngine.win32.h"
|
||||
#include "TestAudioEngine.win32Dlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CTestAudioEnginewin32App
|
||||
|
||||
BEGIN_MESSAGE_MAP(CTestAudioEnginewin32App, CWinAppEx)
|
||||
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CTestAudioEnginewin32App construction
|
||||
|
||||
CTestAudioEnginewin32App::CTestAudioEnginewin32App()
|
||||
{
|
||||
// TODO: add construction code here,
|
||||
// Place all significant initialization in InitInstance
|
||||
}
|
||||
|
||||
|
||||
// The one and only CTestAudioEnginewin32App object
|
||||
|
||||
CTestAudioEnginewin32App theApp;
|
||||
|
||||
|
||||
// CTestAudioEnginewin32App initialization
|
||||
|
||||
BOOL CTestAudioEnginewin32App::InitInstance()
|
||||
{
|
||||
CWinAppEx::InitInstance();
|
||||
|
||||
// Standard initialization
|
||||
// If you are not using these features and wish to reduce the size
|
||||
// of your final executable, you should remove from the following
|
||||
// the specific initialization routines you do not need
|
||||
// Change the registry key under which our settings are stored
|
||||
// TODO: You should modify this string to be something appropriate
|
||||
// such as the name of your company or organization
|
||||
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
|
||||
|
||||
CTestAudioEnginewin32Dlg dlg;
|
||||
m_pMainWnd = &dlg;
|
||||
INT_PTR nResponse = dlg.DoModal();
|
||||
if (nResponse == IDOK)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with OK
|
||||
}
|
||||
else if (nResponse == IDCANCEL)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with Cancel
|
||||
}
|
||||
|
||||
// Since the dialog has been closed, return FALSE so that we exit the
|
||||
// application, rather than start the application's message pump.
|
||||
return FALSE;
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
// TestAudioEngine-win32.h : main header file for the PROJECT_NAME application
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error "include 'stdafx.h' before including this file for PCH"
|
||||
#endif
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
|
||||
// CTestAudioEnginewin32App:
|
||||
// See TestAudioEngine-win32.cpp for the implementation of this class
|
||||
//
|
||||
|
||||
class CTestAudioEnginewin32App : public CWinAppEx
|
||||
{
|
||||
public:
|
||||
CTestAudioEnginewin32App();
|
||||
|
||||
// Overrides
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
|
||||
// Implementation
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
extern CTestAudioEnginewin32App theApp;
|
|
@ -1,188 +0,0 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
#include "targetver.h"
|
||||
#endif
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Chinese (P.R.C.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||
#pragma code_page(936)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#ifndef APSTUDIO_INVOKED\r\n"
|
||||
"#include ""targetver.h""\r\n"
|
||||
"#endif\r\n"
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
||||
"LANGUAGE 9, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#include ""res\\TestAudioEnginewin32.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
|
||||
"#include ""afxres.rc"" // Standard components\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON "res\\TestAudioEngine-win32.ico"
|
||||
#endif // Chinese (P.R.C.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_TESTAUDIOENGINEWIN32_DIALOG DIALOGEX 0, 0, 320, 200
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "TestAudioEngine-win32"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,209,179,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,263,179,50,14
|
||||
PUSHBUTTON "music",IDC_MUSIC,24,22,50,14
|
||||
PUSHBUTTON "effect 1",IDC_EFFECT1,24,49,50,14
|
||||
PUSHBUTTON "effect 2",IDC_EFFECT2,89,49,50,14
|
||||
PUSHBUTTON "stop music",IDC_MUSIC_STOP,88,23,50,14
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904e4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "TODO: <Company name>"
|
||||
VALUE "FileDescription", "TODO: <File description>"
|
||||
VALUE "FileVersion", "1.0.0.1"
|
||||
VALUE "InternalName", "TestAudioEngine-win32.exe"
|
||||
VALUE "LegalCopyright", "TODO: (c) <Company name>. All rights reserved."
|
||||
VALUE "OriginalFilename", "TestAudioEngine-win32.exe"
|
||||
VALUE "ProductName", "TODO: <Product name>"
|
||||
VALUE "ProductVersion", "1.0.0.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_TESTAUDIOENGINEWIN32_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 313
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 193
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
#include "res\TestAudioEnginewin32.rc2" // non-Microsoft Visual C++ edited resources
|
||||
#include "afxres.rc" // Standard components
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
|
@ -1,276 +0,0 @@
|
|||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="TestAudioEngine"
|
||||
ProjectGUID="{3A08EAB1-1042-4085-BACA-03A5BDD0F214}"
|
||||
RootNamespace="TestAudioEnginewin32"
|
||||
Keyword="MFCProj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName).win32"
|
||||
IntermediateDirectory="$(ConfigurationName).win32"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="2"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
ValidateParameters="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\CocosDenshion\Include"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libCocosDenshion.lib"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(OutDir)""
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy /Y "$(ProjectDir)Res\*.mid" "$(OutDir)"
copy /Y "$(ProjectDir)Res\*.wav" "$(OutDir)"
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName).win32"
|
||||
IntermediateDirectory="$(ConfigurationName).win32"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="2"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
ValidateParameters="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="..\CocosDenshion\Include"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
|
||||
MinimalRebuild="false"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libCocosDenshion.lib"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(OutDir)""
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
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"
|
||||
CommandLine="copy /Y "$(ProjectDir)Res\*.mid" "$(OutDir)"
copy /Y "$(ProjectDir)Res\*.wav" "$(OutDir)"
"
|
||||
/>
|
||||
</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=".\stdafx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngine.win32.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngine.win32Dlg.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\targetver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngine.win32.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngine.win32Dlg.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}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\res\TestAudioEngine-win32.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TestAudioEngine.win32.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\TestAudioEnginewin32.rc2"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="TestAudioEngine-win32.rc"
|
||||
/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,132 +0,0 @@
|
|||
|
||||
// TestAudioEngine-win32Dlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "TestAudioEngine.win32.h"
|
||||
#include "TestAudioEngine.win32Dlg.h"
|
||||
|
||||
#include "SimpleAudioEngine.h"
|
||||
|
||||
using namespace CocosDenshion;
|
||||
|
||||
const static char kszMusic[] = "music.mid";
|
||||
const static char kszEffect1[] = "effect1.wav";
|
||||
const static char kszEffect2[] = "effect2.wav";
|
||||
|
||||
static int s_nEffect1;
|
||||
static int s_nEffect2;
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CTestAudioEnginewin32Dlg dialog
|
||||
|
||||
|
||||
|
||||
|
||||
CTestAudioEnginewin32Dlg::CTestAudioEnginewin32Dlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CTestAudioEnginewin32Dlg::IDD, pParent)
|
||||
{
|
||||
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
|
||||
}
|
||||
|
||||
void CTestAudioEnginewin32Dlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CTestAudioEnginewin32Dlg, CDialog)
|
||||
ON_WM_PAINT()
|
||||
ON_WM_QUERYDRAGICON()
|
||||
//}}AFX_MSG_MAP
|
||||
ON_BN_CLICKED(IDC_MUSIC, &CTestAudioEnginewin32Dlg::OnBnClickedMusic)
|
||||
ON_BN_CLICKED(IDC_MUSIC_STOP, &CTestAudioEnginewin32Dlg::OnBnClickedMusicStop)
|
||||
ON_BN_CLICKED(IDC_EFFECT1, &CTestAudioEnginewin32Dlg::OnBnClickedEffect1)
|
||||
ON_BN_CLICKED(IDC_EFFECT2, &CTestAudioEnginewin32Dlg::OnBnClickedEffect2)
|
||||
// ON_WM_CLOSE()
|
||||
ON_WM_DESTROY()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CTestAudioEnginewin32Dlg message handlers
|
||||
|
||||
BOOL CTestAudioEnginewin32Dlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// Set the icon for this dialog. The framework does this automatically
|
||||
// when the application's main window is not a dialog
|
||||
SetIcon(m_hIcon, TRUE); // Set big icon
|
||||
SetIcon(m_hIcon, FALSE); // Set small icon
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
}
|
||||
|
||||
// If you add a minimize button to your dialog, you will need the code below
|
||||
// to draw the icon. For MFC applications using the document/view model,
|
||||
// this is automatically done for you by the framework.
|
||||
|
||||
void CTestAudioEnginewin32Dlg::OnPaint()
|
||||
{
|
||||
if (IsIconic())
|
||||
{
|
||||
CPaintDC dc(this); // device context for painting
|
||||
|
||||
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
|
||||
|
||||
// Center icon in client rectangle
|
||||
int cxIcon = GetSystemMetrics(SM_CXICON);
|
||||
int cyIcon = GetSystemMetrics(SM_CYICON);
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
int x = (rect.Width() - cxIcon + 1) / 2;
|
||||
int y = (rect.Height() - cyIcon + 1) / 2;
|
||||
|
||||
// Draw the icon
|
||||
dc.DrawIcon(x, y, m_hIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnPaint();
|
||||
}
|
||||
}
|
||||
|
||||
// The system calls this function to obtain the cursor to display while the user drags
|
||||
// the minimized window.
|
||||
HCURSOR CTestAudioEnginewin32Dlg::OnQueryDragIcon()
|
||||
{
|
||||
return static_cast<HCURSOR>(m_hIcon);
|
||||
}
|
||||
|
||||
void CTestAudioEnginewin32Dlg::OnBnClickedMusic()
|
||||
{
|
||||
SimpleAudioEngine::sharedEngine()->playBackgroundMusic(kszMusic, true);
|
||||
}
|
||||
|
||||
void CTestAudioEnginewin32Dlg::OnBnClickedMusicStop()
|
||||
{
|
||||
SimpleAudioEngine::sharedEngine()->stopBackgroundMusic();
|
||||
}
|
||||
|
||||
void CTestAudioEnginewin32Dlg::OnBnClickedEffect1()
|
||||
{
|
||||
s_nEffect1 = SimpleAudioEngine::sharedEngine()->playEffect(kszEffect1);
|
||||
}
|
||||
|
||||
void CTestAudioEnginewin32Dlg::OnBnClickedEffect2()
|
||||
{
|
||||
s_nEffect2 = SimpleAudioEngine::sharedEngine()->playEffect(kszEffect2);
|
||||
}
|
||||
|
||||
void CTestAudioEnginewin32Dlg::OnDestroy()
|
||||
{
|
||||
CDialog::OnDestroy();
|
||||
|
||||
SimpleAudioEngine::sharedEngine()->stopBackgroundMusic(true);
|
||||
SimpleAudioEngine::sharedEngine()->unloadEffectAll();
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
// TestAudioEngine-win32Dlg.h : header file
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
// CTestAudioEnginewin32Dlg dialog
|
||||
class CTestAudioEnginewin32Dlg : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CTestAudioEnginewin32Dlg(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_TESTAUDIOENGINEWIN32_DIALOG };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
HICON m_hIcon;
|
||||
|
||||
// Generated message map functions
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnBnClickedMusic();
|
||||
afx_msg void OnBnClickedMusicStop();
|
||||
afx_msg void OnBnClickedEffect1();
|
||||
afx_msg void OnBnClickedEffect2();
|
||||
// afx_msg void OnClose();
|
||||
afx_msg void OnDestroy();
|
||||
};
|
Binary file not shown.
Before Width: | Height: | Size: 66 KiB |
|
@ -1,13 +0,0 @@
|
|||
//
|
||||
// TestAudioEnginewin32.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Add manually edited resources here...
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
|
@ -1,22 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by TestAudioEngine-win32.rc
|
||||
//
|
||||
#define IDD_TESTAUDIOENGINEWIN32_DIALOG 102
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDC_MUSIC 1000
|
||||
#define IDC_EFFECT1 1001
|
||||
#define IDC_EFFECT2 1002
|
||||
#define IDC_BUTTON4 1003
|
||||
#define IDC_MUSIC_STOP 1003
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1004
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// TestAudioEngine-win32.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _SECURE_ATL
|
||||
#define _SECURE_ATL 1
|
||||
#endif
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
#endif
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
|
||||
|
||||
// turns off MFC's hiding of some common and often safely ignored warning messages
|
||||
#define _AFX_ALL_WARNINGS
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _AFX_NO_OLE_SUPPORT
|
||||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
|
||||
#endif
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
#include <afxcontrolbars.h> // MFC support for ribbons and control bars
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
// The following macros define the minimum required platform. The minimum required platform
|
||||
// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
|
||||
// your application. The macros work by enabling all features available on platform versions up to and
|
||||
// including the version specified.
|
||||
|
||||
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
|
||||
#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
|
||||
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
|
||||
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
|
||||
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
|
||||
#endif
|
||||
|
|
@ -24,6 +24,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests\test.win32\t
|
|||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
|
||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
|
||||
{929480E7-23C0-4DF6-8456-096D71547116} = {929480E7-23C0-4DF6-8456-096D71547116}
|
||||
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
package="org.cocos2dx.tests"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<application android:label="@string/app_name" android:debuggable="true">
|
||||
<application android:label="@string/app_name">
|
||||
<activity android:name=".TestsDemo"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="portrait"
|
||||
|
|
|
@ -1,21 +1,27 @@
|
|||
# set params
|
||||
ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r4-crystax
|
||||
COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x
|
||||
|
||||
# copy resources
|
||||
|
||||
TESTS_ROOT=$COCOS2DX_ROOT/tests/test.android
|
||||
|
||||
# make sure assets is exist
|
||||
if [ -d $TESTS_ROOT/assets ]; then
|
||||
echo "resources already exist"
|
||||
else
|
||||
mkdir $TESTS_ROOT/assets
|
||||
cp -R $COCOS2DX_ROOT/tests/Res/animations $TESTS_ROOT/assets
|
||||
cp -R $COCOS2DX_ROOT/tests/Res/fonts $TESTS_ROOT/assets
|
||||
cp -R $COCOS2DX_ROOT/tests/Res/Images $TESTS_ROOT/assets
|
||||
cp -R $COCOS2DX_ROOT/tests/Res/TileMaps $TESTS_ROOT/assets
|
||||
rm -rf $TESTS_ROOT/assets
|
||||
fi
|
||||
|
||||
mkdir $TESTS_ROOT/assets
|
||||
|
||||
# copy resources
|
||||
for file in $COCOS2DX_ROOT/tests/Res/*
|
||||
do
|
||||
if [ -d $file ]; then
|
||||
cp -rf $file $TESTS_ROOT/assets
|
||||
fi
|
||||
|
||||
if [ -f $file ]; then
|
||||
cp $file $TESTS_ROOT/assets
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# build
|
||||
pushd $ANDROID_NDK_ROOT
|
||||
|
|
|
@ -4,7 +4,8 @@ include $(CLEAR_VARS)
|
|||
subdirs := $(addprefix $(LOCAL_PATH)/../../../,$(addsuffix /Android.mk, \
|
||||
Box2D \
|
||||
chipmunk \
|
||||
cocos2dx \
|
||||
cocos2dx \
|
||||
CocosDenshion/Android \
|
||||
))
|
||||
|
||||
subdirs += $(LOCAL_PATH)/tests/Android.mk
|
||||
|
|
|
@ -59,19 +59,21 @@ LOCAL_SRC_FILES := tests.cpp \
|
|||
../../../tests/TransitionsTest/TransitionsTest.cpp \
|
||||
../../../tests/controller.cpp \
|
||||
../../../tests/testBasic.cpp \
|
||||
../../../AppDelegate.cpp
|
||||
../../../AppDelegate.cpp \
|
||||
../../../tests/CocosDenshionTest/CocosDenshionTest.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \
|
||||
$(LOCAL_PATH)/../../../../cocos2dx/include \
|
||||
$(LOCAL_PATH)/../../../tests \
|
||||
$(LOCAL_PATH)/../../../.. \
|
||||
$(LOCAL_PATH)/../../.. \
|
||||
$(LOCAL_PATH)/../../../../chipmunk/include/chipmunk
|
||||
$(LOCAL_PATH)/../../../../chipmunk/include/chipmunk \
|
||||
$(LOCAL_PATH)/../../../../CocosDenshion/include
|
||||
|
||||
# it is used for ndk-r4
|
||||
LOCAL_LDLIBS := -L$(LOCAL_PATH)/../../libs/armeabi \
|
||||
-lGLESv1_CM \
|
||||
-lcocos2d -llog \
|
||||
-lcocos2d -lcocosdenshion -llog \
|
||||
-lbox2d -lchipmunk
|
||||
|
||||
# it is used for ndk-r5
|
||||
|
@ -79,7 +81,7 @@ LOCAL_LDLIBS := -L$(LOCAL_PATH)/../../libs/armeabi \
|
|||
# mapping (i.e /cygdrive/c/ instead of C:/)
|
||||
#LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/armeabi) \
|
||||
# -lGLESv1_CM \
|
||||
# -lcocos2d -llog \
|
||||
# -lcocos2d -llog -lcocosdenshion \
|
||||
# -lbox2d -lchipmunk
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
|
|
@ -51,6 +51,11 @@ import android.util.DisplayMetrics;
|
|||
import android.util.Log;
|
||||
|
||||
public class Cocos2dxActivity extends Activity{
|
||||
public static int screenWidth;
|
||||
public static int screenHeight;
|
||||
private static Cocos2dxMusic backgroundMusicPlayer;
|
||||
private static Cocos2dxSound soundPlayer;
|
||||
private static native void nativeSetPaths(String apkPath);
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -61,6 +66,71 @@ public class Cocos2dxActivity extends Activity{
|
|||
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||
screenWidth = dm.widthPixels;
|
||||
screenHeight = dm.heightPixels;
|
||||
|
||||
// init media player and sound player
|
||||
backgroundMusicPlayer = new Cocos2dxMusic(getApplicationContext());
|
||||
soundPlayer = new Cocos2dxSound(getApplicationContext());
|
||||
}
|
||||
|
||||
public static void playBackgroundMusic(String path, boolean isLoop){
|
||||
backgroundMusicPlayer.playBackgroundMusic(path, isLoop);
|
||||
}
|
||||
|
||||
public static void stopBackgroundMusic(){
|
||||
backgroundMusicPlayer.stopBackgroundMusic();
|
||||
}
|
||||
|
||||
public static void pauseBackgroundMusic(){
|
||||
backgroundMusicPlayer.pauseBackgroundMusic();
|
||||
}
|
||||
|
||||
public static void resumeBackgroundMusic(){
|
||||
backgroundMusicPlayer.resumeBackgroundMusic();
|
||||
}
|
||||
|
||||
public static void rewindBackgroundMusic(){
|
||||
backgroundMusicPlayer.rewindBackgroundMusic();
|
||||
}
|
||||
|
||||
public static boolean isBackgroundMusicPlaying(){
|
||||
return backgroundMusicPlayer.isBackgroundMusicPlaying();
|
||||
}
|
||||
|
||||
public static float getBackgroundMusicVolume(){
|
||||
return backgroundMusicPlayer.getBackgroundVolume();
|
||||
}
|
||||
|
||||
public static void setBackgroundMusicVolume(float volume){
|
||||
backgroundMusicPlayer.setBackgroundVolume(volume);
|
||||
}
|
||||
|
||||
public static int playEffect(String path){
|
||||
return soundPlayer.playEffect(path);
|
||||
}
|
||||
|
||||
public static void stopEffect(int soundId){
|
||||
soundPlayer.stopEffect(soundId);
|
||||
}
|
||||
|
||||
public static float getEffectsVolume(){
|
||||
return soundPlayer.getEffectsVolume();
|
||||
}
|
||||
|
||||
public static void setEffectsVolume(float volume){
|
||||
soundPlayer.setEffectsVolume(volume);
|
||||
}
|
||||
|
||||
public static void preloadEffect(String path){
|
||||
soundPlayer.playEffect(path);
|
||||
}
|
||||
|
||||
public static void unloadEffect(String path){
|
||||
soundPlayer.unloadEffect(path);
|
||||
}
|
||||
|
||||
public static void end(){
|
||||
backgroundMusicPlayer.end();
|
||||
soundPlayer.end();
|
||||
}
|
||||
|
||||
protected void setPackgeName(String packageName) {
|
||||
|
@ -79,8 +149,4 @@ public class Cocos2dxActivity extends Activity{
|
|||
// add this link at the renderer class
|
||||
nativeSetPaths(apkFilePath);
|
||||
}
|
||||
|
||||
public static int screenWidth;
|
||||
public static int screenHeight;
|
||||
private static native void nativeSetPaths(String apkPath);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,148 @@
|
|||
package org.cocos2dx.lib;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetFileDescriptor;
|
||||
import android.media.MediaPlayer;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
*
|
||||
* This class is used for controlling background music
|
||||
*
|
||||
*/
|
||||
public class Cocos2dxMusic {
|
||||
|
||||
private static final String TAG = "Cocos2dxMusic";
|
||||
private float mLeftVolume;
|
||||
private float mRightVolume;
|
||||
private Context mContext;
|
||||
private MediaPlayer mBackgroundMediaPlayer;
|
||||
private boolean mIsPaused;
|
||||
|
||||
public Cocos2dxMusic(Context context){
|
||||
this.mContext = context;
|
||||
initData();
|
||||
}
|
||||
|
||||
public void playBackgroundMusic(String path, boolean isLoop){
|
||||
if (mBackgroundMediaPlayer == null){
|
||||
mBackgroundMediaPlayer = createMediaplayerFromAssets(path);
|
||||
}
|
||||
|
||||
if (mBackgroundMediaPlayer == null){
|
||||
Log.e(TAG, "playBackgroundMusic: background media player is null");
|
||||
} else{
|
||||
// if the music is playing or paused, stop it
|
||||
mBackgroundMediaPlayer.stop();
|
||||
|
||||
mBackgroundMediaPlayer.setLooping(isLoop);
|
||||
|
||||
try {
|
||||
mBackgroundMediaPlayer.prepare();
|
||||
mBackgroundMediaPlayer.start();
|
||||
} catch (Exception e){
|
||||
Log.e(TAG, "playBackgroundMusic: error state");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void stopBackgroundMusic(){
|
||||
if (mBackgroundMediaPlayer != null){
|
||||
mBackgroundMediaPlayer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void pauseBackgroundMusic(){
|
||||
if (mBackgroundMediaPlayer != null && mBackgroundMediaPlayer.isPlaying()){
|
||||
mBackgroundMediaPlayer.pause();
|
||||
this.mIsPaused = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void resumeBackgroundMusic(){
|
||||
if (mBackgroundMediaPlayer != null && this.mIsPaused){
|
||||
mBackgroundMediaPlayer.start();
|
||||
}
|
||||
}
|
||||
|
||||
public void rewindBackgroundMusic(){
|
||||
if (mBackgroundMediaPlayer != null){
|
||||
mBackgroundMediaPlayer.stop();
|
||||
|
||||
try {
|
||||
mBackgroundMediaPlayer.prepare();
|
||||
mBackgroundMediaPlayer.start();
|
||||
} catch (Exception e){
|
||||
Log.e(TAG, "rewindBackgroundMusic: error state");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isBackgroundMusicPlaying(){
|
||||
boolean ret = false;
|
||||
|
||||
if (mBackgroundMediaPlayer == null){
|
||||
ret = false;
|
||||
} else {
|
||||
ret = mBackgroundMediaPlayer.isPlaying();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void end(){
|
||||
if (mBackgroundMediaPlayer != null)
|
||||
{
|
||||
mBackgroundMediaPlayer.release();
|
||||
}
|
||||
|
||||
initData();
|
||||
}
|
||||
|
||||
|
||||
public float getBackgroundVolume(){
|
||||
if (this.mBackgroundMediaPlayer != null){
|
||||
return (this.mLeftVolume + this.mRightVolume) / 2;
|
||||
} else {
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
public void setBackgroundVolume(float volume){
|
||||
if (this.mBackgroundMediaPlayer != null){
|
||||
this.mLeftVolume = this.mRightVolume = volume;
|
||||
this.mBackgroundMediaPlayer.setVolume(this.mLeftVolume, this.mRightVolume);
|
||||
}
|
||||
}
|
||||
|
||||
private void initData(){
|
||||
mLeftVolume =1.0f;
|
||||
mRightVolume = 1.0f;
|
||||
mBackgroundMediaPlayer = null;
|
||||
mIsPaused = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* create mediaplayer for music
|
||||
* @param path the path relative to assets
|
||||
* @return
|
||||
*/
|
||||
private MediaPlayer createMediaplayerFromAssets(String path){
|
||||
MediaPlayer mediaPlayer = null;
|
||||
|
||||
try{
|
||||
AssetFileDescriptor assetFileDescritor = mContext.getAssets().openFd(path);
|
||||
|
||||
mediaPlayer = new MediaPlayer();
|
||||
mediaPlayer.setDataSource(assetFileDescritor.getFileDescriptor(),
|
||||
assetFileDescritor.getStartOffset(), assetFileDescritor.getLength());
|
||||
mediaPlayer.prepare();
|
||||
|
||||
mediaPlayer.setVolume(mLeftVolume, mRightVolume);
|
||||
}catch (Exception e) {
|
||||
Log.e(TAG, "error: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
return mediaPlayer;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
package org.cocos2dx.lib;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.AudioManager;
|
||||
import android.media.SoundPool;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
*
|
||||
* This class is used for controlling effect
|
||||
*
|
||||
*/
|
||||
|
||||
public class Cocos2dxSound {
|
||||
private Context mContext;
|
||||
private SoundPool mSoundPool;
|
||||
private float mLeftVolume;
|
||||
private float mRightVolume;
|
||||
|
||||
// sound id and stream id map
|
||||
private HashMap<Integer,Integer> mSoundIdStreamIdMap;
|
||||
// sound path and sound id map
|
||||
private HashMap<String,Integer> mPathSoundIDMap;
|
||||
|
||||
private static final String TAG = "Cocos2dxSound";
|
||||
private static final int MAX_SIMULTANEOUS_STREAMS_DEFAULT = 5;
|
||||
private static final float SOUND_RATE = 1.0f;
|
||||
private static final int SOUND_PRIORITY = 1;
|
||||
private static final int SOUND_LOOP_TIME = 0;
|
||||
private static final int SOUND_QUALITY = 5;
|
||||
|
||||
private final int INVALID_SOUND_ID = -1;
|
||||
private final int INVALID_STREAM_ID = -1;
|
||||
|
||||
public Cocos2dxSound(Context context){
|
||||
this.mContext = context;
|
||||
initData();
|
||||
}
|
||||
|
||||
public int preloadEffect(String path){
|
||||
int soundId = createSoundIdFromAsset(path);
|
||||
|
||||
if (soundId != INVALID_SOUND_ID){
|
||||
// the sound is loaded but has not been played
|
||||
this.mSoundIdStreamIdMap.put(soundId, INVALID_STREAM_ID);
|
||||
|
||||
// record path and sound id map
|
||||
this.mPathSoundIDMap.put(path, soundId);
|
||||
}
|
||||
|
||||
return soundId;
|
||||
}
|
||||
|
||||
public void unloadEffect(String path){
|
||||
// get sound id and remove from mPathSoundIDMap
|
||||
Integer soundId = this.mPathSoundIDMap.remove(path);
|
||||
|
||||
if (soundId != null){
|
||||
// unload effect
|
||||
this.mSoundPool.unload(soundId.intValue());
|
||||
|
||||
// remove record from mSoundIdStreamIdMap
|
||||
this.mSoundIdStreamIdMap.remove(soundId);
|
||||
}
|
||||
}
|
||||
|
||||
public int playEffect(String path){
|
||||
Integer soundId = this.mPathSoundIDMap.get(path);
|
||||
|
||||
if (soundId != null){
|
||||
// the sound is preloaded
|
||||
|
||||
// play sound
|
||||
int streamId = this.mSoundPool.play(soundId.intValue(), this.mLeftVolume,
|
||||
this.mRightVolume, SOUND_PRIORITY, SOUND_LOOP_TIME, SOUND_RATE);
|
||||
|
||||
// record sound id and stream id map
|
||||
this.mSoundIdStreamIdMap.put(soundId, streamId);
|
||||
} else {
|
||||
// the effect is not prepared
|
||||
soundId = preloadEffect(path);
|
||||
playEffect(path);
|
||||
}
|
||||
|
||||
return soundId.intValue();
|
||||
}
|
||||
|
||||
public void stopEffect(int soundId){
|
||||
Integer streamId = this.mSoundIdStreamIdMap.get(soundId);
|
||||
|
||||
if (streamId != null){
|
||||
this.mSoundPool.stop(streamId.intValue());
|
||||
}
|
||||
}
|
||||
|
||||
public float getEffectsVolume(){
|
||||
return (this.mLeftVolume + this.mRightVolume) / 2;
|
||||
}
|
||||
|
||||
public void setEffectsVolume(float volume){
|
||||
this.mLeftVolume = this.mRightVolume = volume;
|
||||
}
|
||||
|
||||
public void end(){
|
||||
this.mSoundPool.release();
|
||||
this.mPathSoundIDMap.clear();
|
||||
this.mSoundIdStreamIdMap.clear();
|
||||
|
||||
initData();
|
||||
}
|
||||
|
||||
public int createSoundIdFromAsset(String path){
|
||||
int soundId = INVALID_SOUND_ID;
|
||||
|
||||
try {
|
||||
soundId = mSoundPool.load(mContext.getAssets().openFd(path), 0);
|
||||
} catch(Exception e){
|
||||
Log.e(TAG, "error: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
return soundId;
|
||||
}
|
||||
|
||||
private void initData(){
|
||||
this.mSoundIdStreamIdMap = new HashMap<Integer,Integer>();
|
||||
mSoundPool = new SoundPool(MAX_SIMULTANEOUS_STREAMS_DEFAULT, AudioManager.STREAM_MUSIC, SOUND_QUALITY);
|
||||
mPathSoundIDMap = new HashMap<String,Integer>();
|
||||
|
||||
this.mLeftVolume = 0.5f;
|
||||
this.mRightVolume = 0.5f;
|
||||
}
|
||||
}
|
|
@ -22,18 +22,24 @@ public class TestsDemo extends Cocos2dxActivity{
|
|||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
mGLView.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
mGLView.onResume();
|
||||
}
|
||||
|
||||
protected void onDestroy()
|
||||
{
|
||||
super.onDestroy();
|
||||
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
}
|
||||
|
||||
private GLSurfaceView mGLView;
|
||||
|
||||
static {
|
||||
System.loadLibrary("cocosdenshion");
|
||||
System.loadLibrary("chipmunk");
|
||||
System.loadLibrary("box2d");
|
||||
System.loadLibrary("cocos2d");
|
||||
|
|
|
@ -1 +1 @@
|
|||
799b8dc3d35409585198b14143c621a7c25bea01
|
||||
ec06c9185ab0388a65363f16742b75a344f3eb2f
|
|
@ -92,7 +92,8 @@ OBJECTS = \
|
|||
$(OBJECTS_DIR)/Ball.o \
|
||||
$(OBJECTS_DIR)/Paddle.o \
|
||||
$(OBJECTS_DIR)/TouchesTest.o \
|
||||
$(OBJECTS_DIR)/TransitionsTest.o
|
||||
$(OBJECTS_DIR)/TransitionsTest.o \
|
||||
$(OBJECTS_DIR)/CocosDenshionTest.o
|
||||
|
||||
ADD_OBJECTS +=
|
||||
|
||||
|
@ -291,3 +292,7 @@ $(OBJECTS_DIR)/TouchesTest.o : ../tests/TouchesTest/TouchesTest.cpp
|
|||
$(OBJECTS_DIR)/TransitionsTest.o : ../tests/TransitionsTest/TransitionsTest.cpp
|
||||
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/TransitionsTest.o ../tests/TransitionsTest/TransitionsTest.cpp
|
||||
|
||||
|
||||
$(OBJECTS_DIR)/CocosDenshionTest.o : ../tests/CocosDenshionTest/CocosDenshionTest.cpp
|
||||
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/CocosDenshionTest.o ../tests/CocosDenshionTest/CocosDenshionTest.cpp
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="WS2_32.Lib EosConfig.lib SoftSupport.lib TG3_DLL.lib libcocos2d.lib libEGL.lib libgles_cm.lib libBox2d.lib"
|
||||
AdditionalDependencies="WS2_32.Lib EosConfig.lib SoftSupport.lib TG3_DLL.lib libcocos2d.lib libEGL.lib libgles_cm.lib libBox2d.lib libCocosDenshion.lib"
|
||||
OutputFile="$(OutDir)/libCocos2dTests.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../../../PRJ_TG3/Common/ICU/lib;../../../PRJ_TG3/Mtapi/Win32/lib;../../../PRJ_TG3/LIB/Win32Lib;../../../PRJ_TG3/Common/SoftSupport;"$(OutDir)""
|
||||
|
@ -887,6 +887,22 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="CocosDenshionTest"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\tests\CocosDenshionTest\CocosDenshionTest.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\CocosDenshionTest\CocosDenshionTest.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="CocosDenshonTest"
|
||||
>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\cocos2dx;..\..\cocos2dx\include;..\..\;..\..\chipmunk\include\chipmunk;..\tests;..\..\cocos2dx\platform\win32\third_party\OGLES\"
|
||||
AdditionalIncludeDirectories="..\..\cocos2dx;..\..\cocos2dx\include;..\..\CocosDenshion\include;..\..\;..\..\chipmunk\include\chipmunk;..\tests;..\..\cocos2dx\platform\win32\third_party\OGLES\"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
|
@ -62,7 +62,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libcocos2d.lib libgles_cm.lib libBox2d.lib libchipmunk.lib"
|
||||
AdditionalDependencies="libcocos2d.lib libgles_cm.lib libBox2d.lib libchipmunk.lib libCocosDenshion.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName).exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(OutDir)""
|
||||
|
@ -848,6 +848,18 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="CocosDenshionTest"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\tests\CocosDenshionTest\CocosDenshionTest.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\CocosDenshionTest\CocosDenshionTest.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
|
|
@ -0,0 +1,195 @@
|
|||
#include "CocosDenshionTest.h"
|
||||
#include "cocos2d.h"
|
||||
#include "SimpleAudioEngine.h"
|
||||
|
||||
// android effect only support ogg
|
||||
#ifdef CCX_PLATFORM_ANDROID
|
||||
#define EFFECT_FILE "effect2.ogg"
|
||||
#else
|
||||
#define EFFECT_FILE "effect1.wav"
|
||||
#endif // CCX_PLATFORM_ANDROID
|
||||
|
||||
#ifdef CCX_PLATFORM_WIN32
|
||||
#define MUSIC_FILE "music.mid"
|
||||
#else
|
||||
#define MUSIC_FILE "background.mp3"
|
||||
#endif // CCX_PLATFORM_WIN32
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace CocosDenshion;
|
||||
|
||||
#define LINE_SPACE 40
|
||||
|
||||
CocosDenshionTest::CocosDenshionTest()
|
||||
: m_pItmeMenu(NULL),
|
||||
m_tBeginPos(CGPointZero),
|
||||
m_nSoundId(0)
|
||||
{
|
||||
std::string testItems[] = {
|
||||
"play background music",
|
||||
"stop background music",
|
||||
"pause background music",
|
||||
"resume background music",
|
||||
"rewind background music",
|
||||
"is background music playing",
|
||||
"play effect",
|
||||
"stop effect",
|
||||
"unload effect",
|
||||
"add background music volume",
|
||||
"sub background music volume",
|
||||
"add effects volume",
|
||||
"sub effects volume"
|
||||
};
|
||||
|
||||
// add menu items for tests
|
||||
m_pItmeMenu = CCMenu::menuWithItems(NULL);
|
||||
CGSize s = CCDirector::sharedDirector()->getWinSize();
|
||||
m_nTestCount = sizeof(testItems) / sizeof(testItems[0]);
|
||||
|
||||
for (int i = 0; i < m_nTestCount; ++i)
|
||||
{
|
||||
CCLabelTTF* label = CCLabelTTF::labelWithString(testItems[i].c_str(), "Arial", 24);
|
||||
CCMenuItemLabel* pMenuItem = CCMenuItemLabel::itemWithLabel(label, this, menu_selector(CocosDenshionTest::menuCallback));
|
||||
|
||||
m_pItmeMenu->addChild(pMenuItem, i + 10000);
|
||||
pMenuItem->setPosition( CGPointMake( s.width / 2, (s.height - (i + 1) * LINE_SPACE) ));
|
||||
}
|
||||
|
||||
m_pItmeMenu->setContentSize(CGSizeMake(s.width, (m_nTestCount + 1) * LINE_SPACE));
|
||||
m_pItmeMenu->setPosition(CGPointZero);
|
||||
addChild(m_pItmeMenu);
|
||||
|
||||
setIsTouchEnabled(true);
|
||||
|
||||
// preload background music and effect
|
||||
SimpleAudioEngine::sharedEngine()->preloadBackgroundMusic(MUSIC_FILE);
|
||||
SimpleAudioEngine::sharedEngine()->preloadEffect(EFFECT_FILE);
|
||||
}
|
||||
|
||||
CocosDenshionTest::~CocosDenshionTest()
|
||||
{
|
||||
}
|
||||
|
||||
void CocosDenshionTest::onExit()
|
||||
{
|
||||
CCLayer::onExit();
|
||||
|
||||
SimpleAudioEngine::sharedEngine()->end();
|
||||
}
|
||||
|
||||
void CocosDenshionTest::menuCallback(NSObject * pSender)
|
||||
{
|
||||
// get the userdata, it's the index of the menu item clicked
|
||||
CCMenuItem* pMenuItem = (CCMenuItem *)(pSender);
|
||||
int nIdx = pMenuItem->getZOrder() - 10000;
|
||||
|
||||
switch(nIdx)
|
||||
{
|
||||
// play background music
|
||||
case 0:
|
||||
SimpleAudioEngine::sharedEngine()->playBackgroundMusic(MUSIC_FILE, true);
|
||||
break;
|
||||
// stop background music
|
||||
case 1:
|
||||
SimpleAudioEngine::sharedEngine()->stopBackgroundMusic();
|
||||
break;
|
||||
// pause background music
|
||||
case 2:
|
||||
SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
|
||||
break;
|
||||
// resume background music
|
||||
case 3:
|
||||
SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
|
||||
break;
|
||||
// rewind background music
|
||||
case 4:
|
||||
SimpleAudioEngine::sharedEngine()->rewindBackgroundMusic();
|
||||
break;
|
||||
// is background music playing
|
||||
case 5:
|
||||
if (SimpleAudioEngine::sharedEngine()->isBackgroundMusicPlaying())
|
||||
{
|
||||
CCLOG("background music is playing");
|
||||
}
|
||||
else
|
||||
{
|
||||
CCLOG("background music is not playing");
|
||||
}
|
||||
break;
|
||||
// play effect
|
||||
case 6:
|
||||
m_nSoundId = SimpleAudioEngine::sharedEngine()->playEffect(EFFECT_FILE);
|
||||
break;
|
||||
// stop effect
|
||||
case 7:
|
||||
SimpleAudioEngine::sharedEngine()->stopEffect(m_nSoundId);
|
||||
break;
|
||||
// unload effect
|
||||
case 8:
|
||||
SimpleAudioEngine::sharedEngine()->unloadEffect(EFFECT_FILE);
|
||||
break;
|
||||
// add bakcground music volume
|
||||
case 9:
|
||||
SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume() + 0.1);
|
||||
break;
|
||||
// sub backgroud music volume
|
||||
case 10:
|
||||
SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume() - 0.1);
|
||||
break;
|
||||
// add effects volume
|
||||
case 11:
|
||||
SimpleAudioEngine::sharedEngine()->setEffectsVolume(SimpleAudioEngine::sharedEngine()->getEffectsVolume() + 0.1);
|
||||
break;
|
||||
// sub effects volume
|
||||
case 12:
|
||||
SimpleAudioEngine::sharedEngine()->setEffectsVolume(SimpleAudioEngine::sharedEngine()->getEffectsVolume() - 0.1);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CocosDenshionTest::ccTouchesBegan(NSSet *pTouches, UIEvent *pEvent)
|
||||
{
|
||||
NSSetIterator it = pTouches->begin();
|
||||
CCTouch* touch = (CCTouch*)(*it);
|
||||
|
||||
m_tBeginPos = touch->locationInView( touch->view() );
|
||||
m_tBeginPos = CCDirector::sharedDirector()->convertToGL( m_tBeginPos );
|
||||
}
|
||||
|
||||
void CocosDenshionTest::ccTouchesMoved(NSSet *pTouches, UIEvent *pEvent)
|
||||
{
|
||||
NSSetIterator it = pTouches->begin();
|
||||
CCTouch* touch = (CCTouch*)(*it);
|
||||
|
||||
CGPoint touchLocation = touch->locationInView( touch->view() );
|
||||
touchLocation = CCDirector::sharedDirector()->convertToGL( touchLocation );
|
||||
float nMoveY = touchLocation.y - m_tBeginPos.y;
|
||||
|
||||
CGPoint curPos = m_pItmeMenu->getPosition();
|
||||
CGPoint nextPos = ccp(curPos.x, curPos.y + nMoveY);
|
||||
CGSize winSize = CCDirector::sharedDirector()->getWinSize();
|
||||
if (nextPos.y < 0.0f)
|
||||
{
|
||||
m_pItmeMenu->setPosition(CGPointZero);
|
||||
return;
|
||||
}
|
||||
|
||||
if (nextPos.y > ((m_nTestCount + 1)* LINE_SPACE - winSize.height))
|
||||
{
|
||||
m_pItmeMenu->setPosition(ccp(0, ((m_nTestCount + 1)* LINE_SPACE - winSize.height)));
|
||||
return;
|
||||
}
|
||||
|
||||
m_pItmeMenu->setPosition(nextPos);
|
||||
m_tBeginPos = touchLocation;
|
||||
}
|
||||
|
||||
void CocosDenshionTestScene::runThisTest()
|
||||
{
|
||||
CCLayer* pLayer = new CocosDenshionTest();
|
||||
addChild(pLayer);
|
||||
pLayer->autorelease();
|
||||
|
||||
CCDirector::sharedDirector()->replaceScene(this);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef __COCOS_DENSHION_TEST__
|
||||
#define __COCOS_DENSHION_TEST__
|
||||
|
||||
#include "../testBasic.h"
|
||||
|
||||
class CocosDenshionTest : public CCLayer
|
||||
{
|
||||
public:
|
||||
CocosDenshionTest(void);
|
||||
~CocosDenshionTest(void);
|
||||
|
||||
void menuCallback(NSObject * pSender);
|
||||
virtual void ccTouchesMoved(NSSet *pTouches, UIEvent *pEvent);
|
||||
virtual void ccTouchesBegan(NSSet *pTouches, UIEvent *pEvent);
|
||||
virtual void onExit();
|
||||
|
||||
private:
|
||||
CCMenu* m_pItmeMenu;
|
||||
CGPoint m_tBeginPos;
|
||||
int m_nTestCount;
|
||||
unsigned int m_nSoundId;
|
||||
};
|
||||
|
||||
class CocosDenshionTestScene : public TestScene
|
||||
{
|
||||
public:
|
||||
virtual void runThisTest();
|
||||
};
|
||||
|
||||
#endif //__COCOS_DENSHION_TEST__
|
|
@ -75,6 +75,8 @@ static TestScene* CreateTestScene(int nIdx)
|
|||
#endif
|
||||
case TEST_KEYPAD:
|
||||
pScene = new KeypadTestScene(); break;
|
||||
case TEST_COCOSDENSHION:
|
||||
pScene = new CocosDenshionTestScene(); break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "HiResTest/HiResTest.h"
|
||||
#include "AccelerometerTest/AccelerometerTest.h"
|
||||
#include "KeypadTest/KeypadTest.h"
|
||||
#include "CocosDenshionTest/CocosDenshionTest.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -64,6 +65,7 @@ enum
|
|||
TEST_HIRES,
|
||||
TEST_ACCELEROMRTER,
|
||||
TEST_KEYPAD,
|
||||
TEST_COCOSDENSHION,
|
||||
|
||||
TESTS_COUNT,
|
||||
};
|
||||
|
@ -99,6 +101,7 @@ const std::string g_aTestNames[TESTS_COUNT] = {
|
|||
"HiResTest",
|
||||
"Accelerometer",
|
||||
"KeypadTest",
|
||||
"CocosDenshionTest"
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue