Commit Graph

354 Commits

Author SHA1 Message Date
mogemimi 3175316131 Fix format string warning when compiling for iOS armv7 (#16298) 2016-08-04 09:54:27 +08:00
James Chen cc9871b71d fixed #10482: New AudioEngine class can't play large ogg file on Win32. (#16303)
* fixed #10482: New AudioEngine class can't play large ogg file on Win32.

* [win32] Small logic fix in AudioPlayer::readPcmData.
2016-08-04 09:53:30 +08:00
mogemimi c03dd85c3f Remove redundant includes (#16285) 2016-08-01 10:22:35 +08:00
QingliWang bbfd2d334c Some bug-fix and quality assurance for Tizen support. (#16281)
* Support audio interruption and resume callback when change earphone status.

* Refactor keyevent callback and add makecurrent for compatible with different binary.

* Enable Tizen indicator.

* Remove the unnecessary evasobject in the window and refactor the function for glview mode.

* Fix the compatible issue between Tizen 2.3 and 2.4.

* Fix the wrong directory of script resources for HellLua template project.

* Create performance-test project for Tizen platform.
2016-07-31 22:32:59 +08:00
minggo a8ce513f6c Merge pull request #16228 from dumganhar/fix/iss14148-ios-no-sound
fixed #14148: Got an error while pressing home button at launch, after resuming from background, SimpileAudioEngine::playEffect will be mute.
2016-07-29 09:28:37 +08:00
James Chen 6efcf87b93 fixed #14148: Got an error while pressing home button at launch, after resuming from background, SimpileAudioEngine::playEffect will not be mute.
The error is: ERROR: [0x19e5fa000] >aurioc> 807: failed: '!pla' (enable 2, outf< 2 ch, 44100 Hz, Float32, non-inter> inf< 2 ch, 0 Hz, Float32, non-inter>)
2016-07-27 15:33:02 +08:00
James Chen bd1d630f93 fixed #16192: Crash while decoding small MP3 file on Android. 2016-07-27 13:54:39 +08:00
minggo 662a1636c3 replace __system_property_get (#16205)
* replace __system_property_get

* fix comment
2016-07-25 18:30:47 +08:00
mogemimi 15030ad4c3 Fix typos in log messages 2016-07-25 02:53:22 +09:00
minggo 8419cc2662 Merge pull request #16183 from SaxonDruce/android-willplaymusic
Implement willPlayBackgroundMusic() on Android
2016-07-22 10:57:26 +08:00
mogemimi 94d4971ddc Fix typos in documentation and comments 2016-07-22 02:05:19 +09:00
SaxonDruce bbedddbf08 Fix bugs with music not resuming when iOS app is reactivated (#16178)
* Pause instead of stopping music on resign

The [audioSource stop] causes the music to be stopped, and therefore it fails to resume later on a call to [audioSource resume], due to the addition of the if (!stopped) check in resume added in 26a04b38f2

* Don't re-pause music that has already been paused

In this situation:

1. Start game, music plays
2. Switch to Music app, game music paused, start other music
3. Switch to game, game music not resumed due to other music playing
4. Switch to Music app, stop other music
5. Switch back to game, game music should resume due to no other music playing

At step 5 the game music doesn't currently resume. This is because at step 4 when switching to the Music app, the game music gets re-paused (actually isPlaying is false, so systemPaused is set to NO, even though the music *is* still paused). This causes the music to not be resumed at step 5.

This change fixes this, by skipping the pause logic if systemPaused is already true.

Note that this is dependent on https://github.com/cocos2d/cocos2d-x/pull/16178

* Fix typo in previous fix.
2016-07-21 17:41:24 +08:00
James Chen 233f2111b9 fixed #16170: Random crash in alGenBuffers(AudioCache::readDataTask) at startup. (#16182)
* fixed #16170: Random crash in alGenBuffers(AudioCache::readDataTask) at startup.

* Minor fix: should -> may

* Minor fix: updates comments.

* Update comment.

* Comment fix again.
2016-07-21 16:51:04 +08:00
James Chen bb004c5e22 [audio] Fixes some issues while stop/uncache right after play/preload on OSX/iOS platform. (#16147)
* [audio] Fixes some issues while stop/uncache right after play/preload on OSX/iOS platform.

* Better state control in AudioCache.

* Adds State enum class which contains INITIAL, LOADING, READY, FAILED states.
* AudioPlayer::destroy should check AudioCache::_isAudioLoaded flag, otherwise, app will freeze in cpp-tests/NewAudioEngineTest/6:Test invalid audio file.

* Should check whether state is INITIAL in the destructor of AudioCache.

* Adds test case for switching play state frequently.

* Skips invoking reading data callback if cache's state is INITIAL.

* Variables initialization for AudioCache class and fixes protential missing delete AL buffers.
2016-07-21 14:57:59 +08:00
Saxon Druce de091cd3d9 Implement willPlayBackgroundMusic() on Android, to return false if there is other music already playing in another app. 2016-07-21 14:29:13 +08:00
James Chen 2e5626236b Remove unused code in cocos/audio/openal 2016-07-20 14:49:39 +08:00
James Chen 15ef80e27d [big refactoring] Audio latency fix for Android. Support to preload effects on Android now. (#15875)
* Audio latency fix for Android. Support preload effects on Android now.

Squashed commits:
[b6d80fe] log fix
[a0a918e] Fixes assetFd didn't be released while PcmData is returned from cache.
[4b956ba] Potential crash fix for PcmAudioPlayer while pause / resume.
[398ab8c] Updates LOG_TAG position in AudioEngine-inl.cpp
[e3634e7] include stdlib.h for posix_memalign
[9004074] fixes setVolume logical error.
[c96df46] Don't use another thread for mixing, enqueue is in a seperated thread, therefore doing mixing in another thread will waste more time.
[0a4c1a8] Adds setLoop, setVolume, setPostion support for Track
[c35fb20] Fixed include.
[cdd9d32] Do mixing by ourself. (TO BE POLISHED)
[6447025] µ -> u since µ could not be shown on some android devices.
[97be0c6] Don't send a silence clip.
[c1607ed] Make linter.py happy.
[0898b54] Puts enqueue & SetPlayState in PcmAudioPlayer::play to thread pool.
[b79fc01] Adds getDuration, getPosition support for PcmAudioPlayer
[80fa2ab] minor fix of the code position of resetting state to State::INITIALIZED
[d9c62f1] underrun fix for PcmAudioPlayer.
[9c2212a] UrlAudioPlayer, playOverMutex should be static, and should be used in update method.
[1519d2e] static variables
[19da936] _pcmAudioPlayer Null pointer check in AudioPlayerProvider.
[e6b0d14] Updates audio performance test.
[fc01dd4] Registers foreground & background event in AudioEngine-inl.cpp(android), the callback should invoke `provider`'s pause & resume method.
[e00a886] TBD: Pause & resume support for PcmAudioPlayerPool.
Since OpenSLES audio resources are expensive and device shared, we should delete all unused PcmAudioPlayers in pool while pause and re-create them while resume.
But this commit isn't finished yet, I don't find a better way to register pause&resume event in AudioEngine module.
[9e42ea3] Interleave mono audio to stereo audio. PcmAudioPlayerPool only contains PcmAudioPlayers with 2 channels.
[3f18d05] Adds a strategy for checking small size of different file formats.
[753ff49] Adds performance test for AudioEngine.
[09d3045] Releases an extra PcmAudioPlayer for UrlAudioPlayer while allocating PcmAudioPlayer fails.
[9dd4477] Using std::move for PcmData move constructor & move assignment.
[6ca3bcb] some fixes:
1) new -> new (std::nothrow)
2) break if allocate PcmAudioPlayer fails
3) renames 'initForPlayPcmData' to 'init'
4) PcmAudioPlayer destructor deadlock if 'init' failed
[54675b6] include path fix.
[a1903ca] More refactorings.
[19b9498] Makes linter.py happy. :)
[923c530] Fixes:
1) Avoid getFileInfo to be invoked twice
2) A critical bug fix for UrlAudioPlayer and adds detailed comments
3) __clang__ compiler option fix for AudioResamplerSinc.cpp.
[5ec4faf] minor fix.
[faaa0f3] output a log in the destructor of UrlAudioPlayer.
[9c20355] NewAudioEngineTest,TestControll crash fix.
[f114464] fixes an unused import.
[1dc5dab] Better algorithm for allocating PcmAudioPlayer.
[331a213] minor fix.
[e54084a] null -> nullptr
[f9a0389] Support uncache.
[89a364f] Removes unused update, and TODO uncache functionality.
[1732bf9] Supports AudioEngineImpl::setFinishCallback for android.
[43d1596] UrlAudioPlayer::stop fix.
[e2ee941] Test case fix in NewAudioEngineTest/AudioIssue11143Test
[5c5ba01] More fixes for making cpp-tests/New Audio Engine Test happy.
[8b554a3] Adds log while remove player from map.
[ed71322] If original file is larger than 30k bytes, consider it's a large audio file.
[fb1845a] Updates project.properties
[6f3839f] minor log output fix in AudioEngine-inl.cpp
[c68bc6c] Don't resample if the sample rate of the decoded pcm data matchs the device's.
[43ca45f] PcmAudioPlayers also need to be removed while they play over, but should not be deleted since their lifecycle is managed by PcmAudioPlayerPool.
[f5e63c9] Audio latency fix for Android. Support preload effects on Android now.

* Supports to loading audio files asynchronously.

* Crash fix for stop audio right after play2d.

* Minor fix for logic in AudioMixerController.cpp

* Adds missing files (CCThreadPool.h/.cpp).

* Minor fix for including.

* Minor fix for missing include <functional> in Track.h

* update license information in audio.h

* Don't use std::future/std::promise anymore since ndk counldn't support it well in armeabi arch.

* isSmallFile postion updated, fixes large audio file goto the checking logic of cache.

* std::atomic<int> isn't supported by ndk-r10e while compiling with `armeabi` arch, using a int with a mutex instead.

* fixes __isnanf & posix_memalign doesn't exist on low api (<=16) devices.

* namespace updated: cocos2d -> cocos2d::experimental

* Removes commented code in AudioMixerController.h/.cpp

* Removes unused code again, and fixes a memory leak of `Track` instance.

* Oops, namespace changed.

* Only outputs log in debug mode.

* Uses ALOGV for outputing logs in AudioEngine-inl.cpp

* const PcmData& ->  PcmData for Track

* Fixes a protential crash in NewAudioEngineTest

* Adds `COCOS` prefix in header #ifndef COCOS_BALABALA #define COCOS_BALABALA

* Uses _ prefix for cocos code style instead of `m` prefix.

* Deletes AudioResamplerSinc related files.

* Bug fix from @minggo's reply on github.

* Don't need to invoke pause after in UrlAudioPlayer::prepare.

* Updates ThreadPool class, uses enum class and adds const keyword.
2016-07-18 10:22:40 +08:00
mogemimi 2650fd1afd Add missing float suffix to avoid -Wdouble-promotion 2016-07-04 23:12:45 +09:00
mogemimi 2443e09d29 Fix typos and other mistakes in docs 2016-07-04 00:42:10 +09:00
minggo bbd837aefa merge v3.12 back to v3 2016-06-28 17:53:50 +08:00
mogemimi cbc0612306 Use nullptr instead of 0 or NULL 2016-06-23 12:39:23 +09:00
minggo 465da95c01 return true for preload though it is not implemented 2016-06-22 17:41:04 +08:00
Dale Stammen 53321e401a updated to support Windows 10 UWP x64 builds 2016-06-15 08:50:04 -07:00
MagicXrEv 8e6ca57f4f lua binding : Rename end() to endToLua(). 2016-06-14 23:35:17 +08:00
minggo 1d42bae8c5 Merge pull request #15735 from MrCapone/v3
AudioEngine-linux fix: add map contains IDs of preloaded files
2016-06-01 21:34:15 +08:00
halx99 fa4bfe43d8 fix AudioEngine bug for iOS, UTF8 filePath (#15743)
* fix AudioEngine bug for iOS, UTF8 filePath

Fix bug for apple platform, open audio file failed with chinese App Name.

* Update AudioPlayer.mm
2016-05-30 10:47:48 +08:00
capone 5b02460989 AudioEngine-linux fix: add map contains IDs of preloaded files 2016-05-26 17:57:56 +06:00
mogemimi 0f3b36e834 Fix gcc warnings and type mismatch issues in AudioEngine for Linux 2016-05-20 01:39:40 +09:00
mogemimi 09d839be35 Format the code to better align with cocos2d-x code style 2016-05-19 05:17:33 +09:00
mogemimi 7b61aca64e Fix indentation and remove trailing whitespaces 2016-05-19 03:42:34 +09:00
mogemimi 3a80e7d8fb Change 2 spaces to 4 spaces indentation 2016-05-19 03:34:04 +09:00
mogemimi 03be0de2fa Remove unnecessary trailing semicolons 2016-05-19 01:40:00 +09:00
minggo a5602cc732 merge v3.11 back to v3 2016-05-04 16:02:23 +08:00
Adrien de Sentenac 1a76c9ea3b Add OBB (zip) support (#15515)
* Add OBB support.
OBB must be a zip file with audio and video files stored uncompressed.

* Use introspection to be able to build with Android API level 10.
Using the new audio engine to play sounds from the OBB will only work with API level 12 (Android 3.1) or above.
2016-05-04 09:21:35 +08:00
zilongshanren 482788c933 Add tizen support (#15518)
* add Tizen Support

* fix linter error

* fix tizen audio engine lua bindings config
2016-04-28 09:49:55 +08:00
minggo bb4a54b042 use fullpath to play background music 2016-04-26 15:59:30 +08:00
xpol 1e70fb5eb5 Remove include of cocos2d.h (#15435) 2016-04-18 15:09:21 +08:00
Xpol Wan 32e408487f Fixes import path for m and mm files. 2016-03-21 20:12:58 +08:00
Xpol Wan 931d56bc10 Fixes includes in .m and .mm files. 2016-03-21 11:02:00 +08:00
Xpol Wan 90456d29ba Fixes 1605 include path in 541 files
using the tools/coding-style/include-linter.py with -f options.
2016-03-20 21:53:44 +08:00
Ricardo Quesada 028f8c28e1 Squashed commit of the following:
commit 59e43a3c80f4af8998e4a14f6463bd7a91617d5f
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 15:19:48 2016 -0800

    uses new naming convention for projects

    uses _ instead of -

commit f97ba56608d48b17909649c8617ba9047b566196
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 14:49:22 2016 -0800

    fooling cmake for real

commit 20c2560f75eab952e5131b484284bf20cb07fe07
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 14:43:05 2016 -0800

    fooling cmake

commit a0ada44bc82941830f6c71219a1492d28c28c306
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 14:26:59 2016 -0800

    makes CMake for Mac happy

commit 656b4f5e2dd741215a4699db979fe1b0dce60298
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 13:50:15 2016 -0800

    linux fix

commit fa98aeac8505c764f4a69f15c8a8ff1123fad2a3
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Mar 2 11:18:18 2016 -0800

    links correctly!

commit 9c56ce7143d3a35b44d33f246cec093ca9eaa7d9
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Mar 1 17:44:58 2016 -0800

    Squashed commit of the following:

    commit 2ef52723dae44204c047cb177d5a5670fb659c79
    Merge: 8a5c998 25cf1f1
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Tue Mar 1 16:54:04 2016 -0800

        Merge branch 'v3' into cmake_android

    commit 8a5c9981192e344fffc9f14be5cb14f66eccfa24
    Author: Chaoren Lin <chaorenl@google.com>
    Date:   Thu Feb 11 18:34:46 2016 -0800

        Fix module name in Android template to match CMake project.

    commit be85e19e852a9d5fbd6c58cea60c75fe47a5a576
    Author: Chaoren Lin <chaorenl@google.com>
    Date:   Thu Feb 11 18:27:45 2016 -0800

        Add missing platform specific source file to CMake project.

    commit 705389ac6582107a381d0cbc56268eaa98ffc5c3
    Author: Chaoren Lin <chaorenl@google.com>
    Date:   Wed Feb 10 19:21:12 2016 -0800

        Find AndroidNdkModules.cmake relative to android.toolchain.cmake.

    commit a10075e2cb30af2e1f9a30da99efac880658ad6b
    Author: Chaoren Lin <chaorenl@google.com>
    Date:   Wed Feb 10 19:03:11 2016 -0800

        Remove cpp-empty-test from project templates.

    commit e070fcbf210b8628f75785e738202a80a95ac0ff
    Author: WenhaiLin <wenhai.lin@chukong-inc.com>
    Date:   Mon Aug 31 09:56:03 2015 +0800

        Fix CMake for Android Target
2016-03-02 16:51:54 -08:00
mogemimi 4c1c238f74 Fix format string warnings 2016-02-15 01:41:08 +09:00
Wenhai Lin 718d2c690b Remove CocosPlayClient 2016-01-18 17:58:04 +08:00
zilongshanren 161be986af Merge pull request #14340 from fnz/easyjni
easy jni
2016-01-12 11:50:16 +08:00
Ricardo Quesada 77aa3871b6 fixes compilation issues on tvOS 2015-12-29 12:30:00 -08:00
Ricardo Quesada 692c0f8a0e adds tvOS support
Ported tests:
 - js-tests
 - cpp-tsts
 - lua-tests
 - game-controller tests

all of them working, but most of the tests can't be navigated
since they expect a controller.
2015-12-28 15:59:36 -08:00
mogemimi f280a31323 Fix typo in documentation and comments 2015-12-09 01:48:24 +09:00
zilongshanren 01e619f686 Merge pull request #14476 from cesarpachon/linuxAudioEngine
AudioEngine:Linux: implementation using FMOD, refactor to SimpleAudio…
2015-11-28 14:27:15 +08:00
fnz 8c691430c1 conflicts resolved 2015-11-27 13:19:10 +03:00
fnz c4b995fe59 updates to JniHelper, refactoring of existing JNI calls 2015-11-27 12:00:33 +03:00
cesarpachon 40f6f76030 AudioEngine:Linux: implementation using FMOD, refactor to SimpleAudioEngine now as wrapper of AUdioEngine, upgrade FMOD binaries 2015-11-26 22:22:05 -05:00
WenhaiLin 42fa33dc6e AudioEngine[WIN32]:Fixed `FinishCallback` may not been invoked when the sound play completes. 2015-11-17 23:44:52 +08:00
cpascal 13c1258f9d Fixed AudioPlayer crash in Win32 2015-10-09 15:03:05 +09:00
Dale Stammen 32eeb560c3 clean up include files for WINRT platforms 2015-10-02 18:49:41 -07:00
Martin Taylor 62e36e8006 fix typos and syntax error. A thorough check by tool VSSpellChecker. 2015-09-22 16:08:23 +08:00
WenhaiLin e500b960f3 AudioEngine:Fixed audio can not resume if it is interrupted cause by an incoming phone call. 2015-09-07 16:29:57 +08:00
WenhaiLin 42b24a9c5b Rename AVAudioPlayer to CCAudioPlayer for avoid conflicting with system framework 2015-09-07 11:12:13 +08:00
Vladimir Perminov 104013aebe commit v3.8 overwrite this unused code
From commit #13397
2015-08-27 23:19:30 +03:00
pandamicro d6045fdbea Merge branch 'v3.8' of github.com:cocos2d/cocos2d-x into v3
Conflicts:
	cocos/audio/winrt/Audio.cpp
	cocos/platform/winrt/CCCommon.cpp
	cocos/platform/winrt/CCWinRTUtils.cpp
	cocos/platform/winrt/CCWinRTUtils.h
2015-08-27 10:40:04 +08:00
Dale Stammen fc1a2b2f99 fixed for winrt audio issue 13254 2015-08-21 09:59:46 -07:00
Vladimir Perminov d70a21aa25 Correct use and convert unicode from utf8
Move StringUtf8ToWideChar and StringWideCharToUtf8 to CCWinRTUtils(
Replace CCUtf8ToUnicode)
Use StringUtf8ToWideChar for convert utf8 to unicode
Use StringWideCharToUtf8 for convert unicode to utf8
2015-08-16 12:51:41 +03:00
James Windiate fa02751e45 fixed whitespace 2015-08-13 19:24:41 -04:00
James Windiate 61a2e0d2ad Added _playing flag switching on pause and resume
Issue # 13254
2015-08-13 18:52:32 -04:00
Wenhai Lin b46000287e AudioEngine:Fixed crash cause by multiple threads access into a shared unsynchronized data.[iOS/Mac] 2015-08-11 18:11:59 +08:00
子龙山人 f3f67a10f9 Merge pull request #13232 from perminovVS/v3-dev-get-file-extension
Add getFileExtension to FileUtils
2015-08-11 15:54:55 +08:00
WenhaiLin 2deeee70d2 CppTests-->Extension-->CocosBuilderTest:Fixed crash on Android 5.0.x. 2015-08-10 22:41:18 +08:00
Vladimir Perminov 7cacdaeaf1 Add getFileExtension to FileUtils
Gets filename extension is a suffix (separated from the base filename by
a dot) in lower case.

More code need get filename extension, everyone does it differently.
use check UPPER and lower case, use . and no(example ".csb", ".CSB",
"csb" )

And bag in AudioEngineImpl: find point from left( ext =
strchr(filePath.c_str(), '.'); )
If file path contains point. always unsupported media type
2015-08-05 22:21:16 +03:00
WenhaiLin 102020d831 1.AudioEngine:support callback for preload feature.
2.AudioEngineThreadPool:Make the number of thread be a fixed number.
2015-07-28 15:27:07 +08:00
WenhaiLin eca192f7a6 Fixed compile error 2015-07-10 14:43:28 +08:00
WenhaiLin 86a68f5a09 AudioEngine:refine thread pool 2015-07-09 14:31:03 +08:00
Wenhai Lin 5d50663c35 AudioEngine:support preload for audio[MAC/iOS] 2015-07-08 18:04:43 +08:00
WenhaiLin b395ef06d8 AudioEngine:support preload for audio[WIN32/WINRT 8.1/WP8.1] 2015-07-08 10:48:20 +08:00
Wenhai Lin c06b5c5570 AudioEngine:Fixed play audio may fail when switch to new scene on iOS. 2015-07-01 17:19:28 +08:00
Wenhai Lin e124593a5c AudioEngine:Fixed play audio may fail(error code:-1) on iOS 2015-06-30 15:38:24 +08:00
子龙山人 260d5035bb Merge pull request #12555 from WenhaiLin/v3-simpleaudio-AndroidL-Fix
Fixed SimpleAudioEngine may cause application to crash on Android L(5.0.x)
2015-06-26 11:05:40 +08:00
Wenhai Lin 1875829ab4 [CppTests:ExtensionsTest-->CocoStudioComponentsTest]Fixed crash on Android 5.0.x 2015-06-26 10:16:52 +08:00
Dale Stammen 61f4e280b4 Merge branch 'v3.7-release' into v3.7-winrt-audio 2015-06-25 12:46:20 -07:00
andyque 2bb7b96839 add guard to audio engine pointer 2015-06-25 10:17:31 +08:00
anniruddh e89a6c1651 fixed issue #160 2015-06-24 17:50:11 -07:00
pandamicro 29840df88e Fix indent of Audio.cpp 2015-06-23 20:08:00 +08:00
Anniruddh 4a15d57093 Fixed issue #168 2015-06-20 00:20:15 -07:00
pandamicro d0db40c4a6 Merge pull request #12080 from linshun/v3
issue #12078 added audio, network, physics, platform and storage group.
2015-06-15 12:45:11 +08:00
anniruddh.koppal 84fad34daf Added ogg support to audio engine. Fixed issues #150 and #151 2015-06-03 20:57:14 -07:00
子龙山人 d7534c26a3 Merge pull request #12106 from WenhaiLin/v3-audio-ios-phonecall
AudioEngine:Fixed audio can not resume if it is interrupted cause by an incoming phone call.
2015-06-01 11:19:01 +08:00
子龙山人 4e914a01da Merge pull request #12098 from WenhaiLin/v3-simpleaudio-lagged
Fixed SimpleAudioEngine::playEffect() lagged on Android 5.0.x
2015-06-01 11:17:26 +08:00
WenhaiLin 59435f8749 AudioEngine:Fixed audio can not resume if it is interrupted cause by an incoming phone call. 2015-05-29 21:41:54 +08:00
WenhaiLin 9c31aafba0 Fixed SimpleAudioEngine::playEffect() lagged on Android 5.0.x 2015-05-29 14:52:25 +08:00
子龙山人 035420893e Merge pull request #12076 from andyque/update-changelog-v3
Fix a memory issue in AudioEngine
2015-05-29 11:44:45 +08:00
linshun 77639bc88e issue #12078: Added audio group. 2015-05-28 15:46:02 +08:00
子龙山人 f6f8796dfa Merge pull request #11762 from WenhaiLin/v3-audioengine-i11697
AudioEngine:Fixed program may freeze if `AudioEngine::stop` or `AudioEngine::stopAll()` is invoked frequently on Android.
2015-05-28 14:52:20 +08:00
andyque 578fda54ba fix a memory issue in AudioEngine.
This PR also update AUTHORS and CHANGELOG files.
2015-05-28 11:49:27 +08:00
anniruddh.koppal 4501a53cfa Added MP3 support to simple audio engine 2015-05-27 10:57:26 -07:00
anniruddh.koppal b2eb946c14 Added MP3 support 2015-05-23 19:13:12 -07:00
Dale Stammen 6c02e46865 fix deprecated method 2015-05-21 13:30:51 -07:00
minggo 22f0e2fbbf Merge pull request #11918 from WenhaiLin/v3-37
AudioEngine: Fixed play with a large audio file may fail on Win32
2015-05-21 10:36:08 +08:00
Dale Stammen d70a9bf369 resolve full path for audio file 2015-05-20 11:18:54 -07:00
WenhaiLin 02946a55a1 Fixed crash. 2015-05-20 17:13:04 +08:00
WenhaiLin 81dc551fe9 AudioEngine: Fixed play with a large audio file may fail on Win32. 2015-05-20 15:13:31 +08:00
Wenhai Lin 17f2fcd201 Add more comment. 2015-05-19 11:01:23 +08:00
anniruddh.koppal 2db5a89b87 Added new audio engine with wav support 2015-05-15 18:17:52 -07:00
WenhaiLin 07f5ec755a AudioEngine:Fixed program may freeze if `AudioEngine::stop(int audioID)` or `AudioEngine::stopAll()` is invoked frequently on Android. 2015-05-08 18:29:45 +08:00
andyque db95034798 fix android compile error 2015-05-07 10:37:19 +08:00
Vladimir Perminov 694b9adc1e Add FileUtils::getSuitableFOpen
win32 fopen only ansi encoding.
if filePath contains utf8 characters fopen fail.
AudioCache FileFormat::OGG bag, can't open file, if filePath contains
utf8.

Need make all filename for fopen correct encoding.
Only Win32 FileUtils::getSuitableFOpen return
StringUtf8ToAnsi(filename),
other platform return filename

all fopen use FileUtils::getSuitableFOpen
2015-04-19 14:00:27 +03:00
Dale Stammen b700798287 removed WP8 project files 2015-04-15 07:13:54 -07:00
minggo 09c50c44dc Merge pull request #11224 from hawkwood/patch-7
Remove use of autorelease NSString and NSURL
2015-04-09 18:36:07 +08:00
Justin Hawkwood 84fd73630a Fix iOS 5.1.1 crash caused by interruptionHandler
checks OS version and sets handling based on what is available.
2015-04-03 15:57:47 -07:00
Justin Hawkwood 237e809f23 Remove use of autorelease NSString and NSURL
Since there is no autorelease pool, these were leaking.
2015-03-30 16:27:05 -07:00
Justin Hawkwood 3641ef266c Remove use of autorelease NSString and NSURL
Since there is no autorelease pool, these were leaking.
2015-03-30 16:24:48 -07:00
samuele3hu c3ad458a26 Update comment for Lua 2015-03-30 15:47:47 +08:00
Wenhai Lin fdffad3956 [ci skip]Fixed warnings when generating docs by doxygen. 2015-03-27 10:52:59 +08:00
WenhaiLin 2caff4e64d [ci skip]Update comments 2015-03-24 14:12:58 +08:00
dingpinglv 67169443df Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into Iss_Annotate
Conflicts:
	cocos/audio/include/SimpleAudioEngine.h
2015-03-19 20:28:29 +08:00
dingpinglv 1b179c2b02 Issue : added js annotates to SimpleAudioEngine, CCVertexIndexBuffer.h, CCVertexIndexData.h 2015-03-19 20:20:16 +08:00
VisualSJ f87b06a1c8 Add javascript notes...
cocos/2d/CCAction.h
  cocos/2d/CCActionCamera.h
  cocos/2d/CCActionCatmullRom.h
  cocos/2d/CCActionInstant.h
  cocos/2d/CCActionInterval.h
  cocos/2d/CCActionManager.h
  cocos/audio/include/AudioEngine.h
  cocos/audio/include/SimpleAudioEngine.h
2015-03-19 18:41:11 +08:00
WenhaiLin e528531b4b [ci skip]Update document 2015-03-19 10:38:12 +08:00
Krishna 35403439f3 Fixed compilation issue. Introduced missing CLASS_NAME 2015-03-04 10:48:30 +01:00
Krishna ec3a8d49f9 Fixed compilation error. 2015-03-04 10:43:31 +01:00
Krishna 58df860b4e Made the loadeffect utility method into a static method. Removed declaration of old method from header file 2015-02-26 06:53:20 +01:00
Krishna 3b54af1763 Introduced missing function declarators 2015-02-25 10:26:59 +01:00
Krishna Narasimhan 80ea81884b Source refactor. Corrected compile issue 2015-02-23 13:01:19 +01:00
Krishna Narasimhan 239a5f307f Sourcr Refactor. Abstracted common functionality from two jni methods and saved space/resources 2015-02-23 10:20:12 +01:00
Wenhai Lin eb7a7a9fb7 Fixed audio can't resume after the interruption of audio session has ended on iOS. 2015-02-12 15:38:44 +08:00
kompjoefriek ca48c5e5dd Fixed lots of compiler warnings
- signed / unsigned mismatches
- using int as bool
- Removed throw() from CCFrame.h, why is explained here:
http://www.gotw.ca/publications/mill22.htm
2015-01-23 02:02:33 +01:00
WenhaiLin 5fd9ccfecb Fixed AudioEngine causes game 'freeze' on Android 2015-01-21 16:18:47 +08:00
Wenhai Lin 58c45ca144 Integrate CocosPlayClient 2015-01-13 17:30:07 +08:00
raydelto e20c347767 Fixing typo in the constant INVAILD_AUDIO_ID of the new AudioEngine, changing it to INVALID_AUDIO_ID 2014-12-31 20:51:45 -04:00
Nick Barrios 0c2e64b8b9 AudioEngine-win32.ccp: Switch OpenAL include paths based on OPENAL_PLAINS_INCLUDES. 2014-12-19 16:50:47 -05:00
Ricardo Quesada 33a2d0451c Code conforms with the cocos2d-x c++ guidelines 2014-11-25 17:53:52 -08:00
Vladimir Timofeev ba2f74e76c Fix OpenAL include paths, cmake search include paths for case, when openal includes as "#include <al.h>" 2014-11-18 17:27:43 +03:00
Vladimir Timofeev 28d7279cb0 remove unnneded includes and declarations 2014-11-18 10:06:45 +03:00
Vladimir Timofeev b5266e95bf mingw fixes, now project builds with mingw64 and -DUSE_PREBUILT_LIBS=NO (some additional libs hardcoded still) 2014-11-17 01:42:04 +03:00
Ricardo Quesada 50dcae4bef fixes compiler warnings 2014-11-14 13:07:34 -08:00
Ricardo Quesada 1b44f4b605 Merge pull request #9115 from vovkasm/win32-audioengine-mingw-fix
Fix compile errors with recent mingw.
2014-11-14 11:22:35 -08:00
minggo 6d08b33a68 Merge pull request #9107 from Dhilan007/v3-audio-includefix
Remove unneeded include in AudioEngine.h
2014-11-14 20:09:33 +08:00
Vladimir Timofeev 48108e548a Fix compile errors with recent mingw.
Constify arguments to copy constuctors. Without this gcc fail to compile if classes used inside containers.
Error message is rather cryptic: " error: 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = const int; _T2 = cocos2d::experimental::AudioPlayer]' declared to take const reference, but implicit declaration would take non-const"
2014-11-14 10:52:17 +03:00
Ricardo Quesada 2e3b2d9f28 Merge pull request #9080 from vovkasm/cmake-refactoring
Cmake refactorings and fixes
2014-11-13 15:42:47 -08:00
Dhilan007 f52c3e5a83 Remove unneeded include in AudioEngine.h 2014-11-13 22:02:28 +08:00
Dhilan007 249d34b707 fix AudioEngine can't looping audio on Android 2.3.x 2014-11-13 11:28:08 +08:00
Vladimir Timofeev 8910b962a0 cmake:
- fix Audio engine build on Mac
- remove duplicated defintions of _EXPORT_DLL_
2014-11-11 10:30:48 +03:00
Dhilan007 c66348435c Fixed incorrect file path of audio resource in AudioEngine on Android. 2014-10-21 18:34:05 +08:00
Dale Stammen 52fc6d618b updated for Windows 8.1 2014-10-14 14:13:14 -07:00
Dale Stammen fd638f00b7 removed old WP8 project files 2014-10-14 14:09:52 -07:00
martell 73980195c0 wp8: use CC_STATIC because libs are static 2014-10-09 06:33:46 +01:00
martell c3172bef50 Finalise Windows cmake support for mingw-w64
Signed-off-by: martell <martellmalone@gmail.com>
2014-10-03 23:22:09 +01:00
martell 30240a8a37 Multi platform cmake support
Signed-off-by: martell <martellmalone@gmail.com>
2014-10-03 23:21:45 +01:00
martell fe32bcb952 added support for static and shared builds with audio and studio
Signed-off-by: martell <martellmalone@gmail.com>
2014-10-03 23:20:52 +01:00
Ricardo Quesada 342d934a0e scheduler and macro fixes
* kRepeatForever -> CC_REPEAT_FOREVER
* schedule_selector -> CC_SCHEDULE_SELECTOR
* [new] Node::schedule(const std::function<>& callback, const std::string &key)

Updates all smaples
2014-10-03 09:38:36 -07:00
minggo 2ecfcee2a6 Merge pull request #8216 from Dhilan007/v3-audio-fix
fix audio issues(log output:Too Many Objects) after play audio many times on Android
2014-09-30 15:19:46 +08:00
Dhilan007 ed9c8b2693 fix audio issues(log output:Too Many Objects) after play audio many times. 2014-09-30 15:00:52 +08:00
Dhilan007 02fcb6488a Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3-audio-win32
Conflicts:
	cocos/2d/libcocos2d.vcxproj.filters
	tests/cpp-tests/proj.win32/cpp-tests.vcxproj
2014-09-30 14:19:27 +08:00