Commit Graph

54 Commits

Author SHA1 Message Date
folecr 10d9ea45fe Make methods in SimpleAudioEngine virtual 2013-08-05 02:05:43 -07:00
Timothy Qiu bc10c2a01f Change some doc due to the change of source code.
Fixed some incorrect use of doxygen command.
2013-08-01 17:47:37 +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 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
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
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 ab1038a540 pitch/pan/gain: added iOS/OSX impl, fixed compilation for all platforms. 2013-06-29 13:44:03 +04: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
James Chen 0dfa1b566b Fixed compilation errors of blackberry platform. 2012-09-26 11:16:44 +08:00
walzer 06f639edab update copyright to 2012, update cocos2d version to 2.0.3
1. update all copyright from 2010-2011 to 2010-2012 cocos2d-x.org
2. update COCOS2D_VERSION to 0x00020003
3. update const char* cocos2dVersion() to "cocos2d-2.0-x-2.0.3"
2012-09-24 21:22:20 +08:00
James Chen 9ba5a1bfef issue #1454: Removed COCOS2D_JAVASCRIPT macro. 2012-08-31 21:23:23 +08:00
James Chen a2b5916301 Using 'getHashCodeByString(typeid(*native_obj).name())' instead of 'reinterpret_cast<long>(typeid(*native_obj).name());'.
Since on win32 platform, 'reinterpret_cast<long>(typeid(*native_obj).name());' invoking in cocos2d.dll and outside cocos2d.dll(in TestJavascript.exe) will return different address.
But the return string from typeid(*native_obj).name() is the same string, so we must convert the string to hash id to make sure we can get unique id.
2012-08-29 14:49:03 -07:00
Rohan Kuruvilla 8d7516a0ef Test project for cocos2d-x js. 2012-08-27 10:07:31 -07:00
Rolando Abarca a33947711f updates CocosDenshion 2012-08-27 08:43:39 -07:00
Rolando Abarca 033ae81871 adds COCOS2D_JAVASCRIPT for some specifics parts 2012-08-27 08:43:39 -07:00
folecr a033959b81 Dynamic typing for cocosdenshion's JS bindings 2012-08-27 08:43:39 -07:00
Rolando Abarca ea6ae3903c minor changes to cocosdenshion 2012-08-27 08:43:38 -07:00
folecr a8a656de44 cleanup header 2012-08-27 08:43:38 -07:00
Rolando Abarca 2ea8350518 adds OBJECT_TYPE info to CocosDenshion 2012-08-27 08:43:37 -07:00
Walzer 2addd06f21 fixed #1203, remove CCFileUtils::setResource & SimpleAudioEngine::setResource, these 2 methods were created for wophone. 2012-05-02 10:39:17 +08:00
James Chen 230b8a386b issue #1176: Changed linebreak symbol to UNIX format ('\n'),replaced 'tab'
with four spaces. Also,
1. Used macro NS_CC_BEGIN instead of namespace cocos2d {, NS_CC_END instead
of }.
2. Removed some unused files.
3. Renamed the name of some folders, for example,
"test.android"-->"proj.android" .
2012-04-19 14:35:52 +08:00
minggo bd595516b8 issue #781: add new functions for sound 2011-11-25 09:56:06 +08:00
dumganhar 3b48a69d01 remove setResourcePath method 2011-11-07 14:19:46 +08:00
dumganhar fd90641c49 merge testf branch 2011-10-29 14:47:13 +08:00
dumganhar bf4cbbdd35 use shared lib for cocosdenshion 2011-10-24 14:21:46 +08:00
dumganhar f2ab09958f add setResourcePath for SimpleAudioEngine 2011-09-29 22:53:38 +08:00
dumganhar c93be8b828 modify <cstdio> to <stdio.h>
delete old project files
2011-09-20 12:39:44 +08:00
minggo 1bb9e8139a issue 33: iOS & Android support looping playing effect 2011-07-26 15:52:41 +08:00
natural-law 846b529e49 [wophone] fixed #482, Modify the resource data path for the new WoPhone-SDK. 2011-05-06 10:13:12 +08:00
minggo 22b55eaf78 issue #418: add copyright of original author to each file 2011-03-19 10:59:01 +08:00
natural-law d56575dd5a [uphone]change the parameter order of function setResource.And add default value of the parameter pszResPath. 2011-01-25 14:26:26 +08:00
minggo dfad6ab9f9 change the interface of SimpleAudioEngine 2011-01-21 15:14:07 +08:00
natural-law f992838f96 [uphone]fixed #293,Modify the absolute path method in CCFileUtils. 2011-01-18 18:21:06 +08:00
natural-law acff950860 [uphone]fixed #315,remove the way which use resource in ResourceMap. 2011-01-14 17:42:37 +08:00
natural-law 3d45614227 issue #310.Modify the SimpleAudioEngine in cocos2d-uphone. 2011-01-11 16:41:06 +08:00
minggo 221943fc26 rename SimpleAudioEngine::release() to SimpleAudioEngine::end() 2011-01-10 11:47:59 +08:00
minggo dca85259b1 cocosdenshion ok on iphone 2011-01-10 11:39:34 +08:00
minggo 3712372cc8 issue #241: add some files to support cocosdension for iphone 2011-01-08 13:41:27 +08:00
natural-law 95e697d316 fixed #262 Add namespace for the project CocosDenshion. 2010-12-15 18:28:18 +08:00
natural-law 0ab7e88f9f fixed #249 implement read sound data from zip file in SimpleAudioEngine 2010-12-11 11:08:03 +08:00
natural-law b3bb3ce461 Merge branch 'iss228' 2010-11-30 14:37:35 +08:00
natural-law 070439382e fixed #228 Optimize function SimpleAudioEngine::stopBackgroundMusic 2010-11-30 14:37:11 +08:00
Walzer 8128c1b322 issue #196 fix the bug in doxyen of SimpleAudioEngine 2010-11-29 22:17:30 +08:00
Walzer 5a44e5f1fe issue #211 don't checkout 2010-11-18 13:51:33 +00:00
Walzer 79ed40ef38 issue #211 don't check out 2010-11-18 13:47:14 +00:00
Walzer 0a2567c646 SEL_MunuHandler -> SEL_MenuHandler & SimpleAudioEngine::sharedEngine 2010-11-17 08:31:48 +00:00
natural-law f73ecd91bb issue #196
add comment of SimpleAudioEngine code
2010-11-12 08:33:50 +00:00
Walzer 94806c9194 merge with tag/0.99.4-uphone-0.9.0 2010-11-11 03:18:58 +00:00