Commit Graph

390 Commits

Author SHA1 Message Date
minggo 295a23e535 Fix build with -Werror=format-security (default in Android NDK r9) 2013-07-27 07:57:28 +08:00
Sergii Rudchenko 3ea77ec933 Fix build with -Werror=format-security (default in Android NDK r9) 2013-07-27 01:17:13 +03:00
James Chen 00c2173009 Warning fix in CocosDenshion.vcxproj 2013-07-26 14:16:26 +08:00
minggo f6cfe3007f issue #2412:fix merging conflict 2013-07-23 10:41:11 +08:00
James Chen 382fe1a54d Formatting codes with cocos2d-x code style in SimpleAudioEngineOpenAL.cpp. 2013-07-22 11:36:20 +08:00
James Chen 8c182d257d issue #2415: Formating codes in SimpleAudioEngineOpenAL.cpp. 2013-07-22 10:43:23 +08:00
James Chen a60c3eaa20 closed #2415: [OpenAL] Adding one line to delete SimpleAudioEngine singleton in SimpleAudioEngine::end(). 2013-07-22 10:32:48 +08:00
James Chen 604c30f102 Merge branch 'openal-deletebuffers' of https://github.com/rafaelx/cocos2d-x into rafaelx-openal-deletebuffers
Conflicts:
	CocosDenshion/include/SimpleAudioEngine.h
	samples/Cpp/TestCpp/Classes/CocosDenshionTest/CocosDenshionTest.cpp
2013-07-22 10:06:14 +08:00
James Chen 4043ca7e23 Merge pull request #3197 from dumganhar/ricardoquesada-more_more_best_practices_fixes
Merge PR https://github.com/cocos2d/cocos2d-x/pull/3192
2013-07-19 08:15:39 -07:00
Lee, Jae-Hong 980a053e50 [Tizen] Fix compile error.
- Tizen SDK doesn't support override keyword yet.
- add class keyword before friend keyword.
2013-07-19 15:16:05 +09:00
minggo 687c088b51 issue #2412:remove blackberry and marmalade port because they don't support c++11 2013-07-19 13:55:03 +08:00
James Chen 8078e8eff7 issue #2407: SimpleAudioEngine::sharedEngine --> SimpleAudioEngine::getInstance(). 2013-07-19 13:40:45 +08:00
Ricardo Quesada ba6ab126c6 More best practices fixes
- class order fixes
  - static methods (creators) at the beginning
  - then constructors / destructors
  - then init
- more `const` fixes
  - adds some const getters
  - some getters have 2 versions: `const` and no-const version
- renamed CocosDenshion::sharedEngine -> getInstance()
2013-07-18 16:30:19 -07:00
rafael.x c4ef2c9250 Added to various functions a check whether an OpenAL source exists on which OpenAL functions can be called.
Playback of background music starts now with the previously set volume, independent of the OpenAL source state.
Added a delete on the SimpleSoundEngine object within CocosDenshionTest::onExit() so that alutExit() gets called to release allocated resources by OpenAL.
2013-07-19 01:00:24 +02:00
minggo c6c50eb55a Merge pull request #3110 from sergey-shambir/opensl_fix
CocosDenshion: fixed wrong assertion in android OpenSL engine
2013-07-16 01:39:01 -07:00
rafael.x 3d23b65ad9 Changed the order of function calls within CocosDenshion::SimpleAudioEngine::end()
to first detach the OpenAL source from the buffers so that sound buffers can be successfully deleted afterwards.

Additionally, improved the documentation within the header file a little bit.
2013-07-14 17:27:00 +02:00
James Chen a678d12615 issue #2397: FileUtils::sharedFileUtils --> FileUtils::getInstance() for all platforms 2013-07-12 12:03:39 +08:00
Ricardo Quesada cf262c28e2 getInstance() / destroyInstance() are used...
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.

common files + Mac files + iOS files + tests/samples files were updated.

The old methods are deprecated now.
2013-07-11 15:24:23 -07:00
Lee, Jae-Hong 9322e5594b Support Tizen 2.2 SDK.
- Update project files.
- based on develop branch.
- HelloCpp, SimpleGame, HelloLua, TestLua available to build.
2013-07-10 13:04:08 +09:00
Éloi Rivard d853934f1b Added -std=c++0x flag in C++ eclipse projects 2013-07-09 15:23:19 +02:00
Sergey Shambir 3d3a628fb5 CocosDenshion: fixed wrong assertion in android OpenSL engine
Playback rate interface cannot be initialized for some players in
android 4.x, it's not cocos2d bug.
2013-07-09 08:49:02 +04:00
minggo e5a80eed91 fixed conflict 2013-07-09 10:39:16 +08:00
Éloi Rivard 6354b7e9c3 Fixed linux compilation bug in eclipse 2013-07-05 10:28:06 +02:00
Sergey Shambir 0a2207f531 Fixed coding style, rearranged CocosDenshionTest UI, changed
rewindBackgroundMusic to work with paused music.
2013-06-29 13:46:19 +04:00
Sergey Shambir 1c52517770 CocosDenshion: added effects customization for 7 platforms.
1. Pitch/pan/gain support on iOS, Mac, Linux+FMOD, Android+SoundPool;
2. Unified OpenAL code with pitch/pan/gain on Linux, Tizen, Blackberry,
Native Client;
3. Bug fixed: rewindBackgroundMusic() no longer stops music on unified
OpenAL engine.
4. Optional mp3 support for Linux+OpenAL (OPENAL_MP3 make option);
5. Pan/gain (not pitch) support for Android+OpenES.
6. Reorganized CocosDenshion tests in TestCpp.

Known issues:
1. No support for windows, emscrippten, marmalade.
2. No pitch effect on Android+OpenES. It requires backend redesign:
http://code.google.com/p/android/issues/detail?id=24592
2013-06-29 13:44:16 +04:00
Sergey Shambir b9b36d7b56 CocosDenshion: (pitch/pan/gain) added Linux code for OpenAL and FMOD. 2013-06-29 13:44:08 +04:00
Sergey Shambir ab1038a540 pitch/pan/gain: added iOS/OSX impl, fixed compilation for all platforms. 2013-06-29 13:44:03 +04:00
Ricardo Quesada b846a3060e cocos2d-x in Mac:
Works as expected. All the projects defines CC_KEYBOARD_SUPPORT.
Either all of them should define them, or none, otherwise the vtable
will be broken
2013-06-28 19:02:10 -07:00
James Chen ad7d606b48 Merge pull request #2703 from sergey-shambir/linux_qmake
close #2332: [Linux] Adding project part for QtCreator.
2013-06-25 21:57:20 -07:00
Ricardo Quesada ef6f67902f Adds mac workspace
for the moment it includes TestCpp.
But Chipmunk, Box2d, cocos2dx, extensions and CocosDenshion are libraries
Like in the iOS project
2013-06-24 18:04:05 -07:00
James Chen 8dc8fec180 issue #2325: Updating project configuration, tested on iPad 3. 2013-06-24 18:32:06 +08:00
James Chen 7da2018128 issue #2325: Adding armv7s architecture. 2013-06-24 17:06:25 +08:00
James Chen b870488aad issue #2325: [iOS] Using Workspace to manage all projects. TBD, also apply to Mac port. 2013-06-24 15:31:18 +08:00
James Chen 53a372669a closed #2322: Updating all win32 project configurations, improvement by using Multi-processor Compilation. 2013-06-23 17:25:34 +08:00
James Chen 195605c85d issue #2322: Macro CC_DLL take no effect now since we are using static library. 2013-06-23 17:21:13 +08:00
Lee, Jae-Hong 2f8b24d05c Fix compile error. 2013-06-20 19:20:27 +09:00
James Chen 0a0bada9c2 issue #2129: Removing CC prefix for CocosDenshion module. 2013-06-20 14:12:43 +08:00
minggo e89652e280 Merge pull request #2902 from waiter/master
update "fix a bug that SimpleAudioEngine may cause crash on i9100"
2013-06-17 03:27:20 -07:00
James Chen 4432caca1a Fix a bug (https://github.com/cocos2d/cocos2d-x/pull/2902) 2013-06-17 15:54:50 +08:00
waiter 3921512739 update "fix a bug that SimpleAudioEngine may cause crash on i9100" 2013-06-17 09:50:39 +08:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
Lee, Jae-Hong 1bd3f10601 Support Tizen device. 2013-06-12 10:20:18 +09:00
James Chen 3cfa1a9873 [Android] Don't use c++11 feature in OpenSLEngine.cpp. 2013-06-09 15:33:31 +08:00
James Chen 49b4ec42f3 [Android] Don't use c++11 feature in OpenSLEngine.cpp. 2013-06-09 15:18:17 +08:00
Lee, Jae-Hong b9f5691706 [Tizen] Add libwebsockets.h, .a and support C++11 2013-06-07 20:14:43 +09:00
Sergey Shambir 984ed75b9a Linux: added project part for QtCreator.
Allows easily setup cocos2d on Linux in QtCreator IDE.
2013-06-02 10:15:14 +04:00
James Chen c1d85aaab2 Merge pull request #2611 from pyrasis/tizen_2.1
Update projects to Tizen 2.1 SDK.
2013-05-22 02:07:06 -07:00
Lee, Jae-Hong 220ac4982a Update projects to Tizen 2.1 SDK. 2013-05-22 16:55:18 +09:00
minggo d1a8f54113 Merge pull request #2609 from j4m3z0r/emscriptenate
Add Audio Support for Emscripten
2013-05-21 18:32:12 -07:00
James Gregory 05ca831e0d Add audio cleanup methods for Emscripten. 2013-05-21 16:37:24 -07:00