Commit Graph

46 Commits

Author SHA1 Message Date
yycmmc edd81d3528 use error macro to replace constant value 1410L (#18264) 2017-09-19 10:05:46 +08:00
Tyler Dauch a7d7aaa368 Update AudioCache.h (#18136) 2017-08-10 17:40:24 +08:00
James Chen 474491a5d6 Call 'update' method in 'stop/stopAll' to cleanup immediately (#17846) 2017-05-22 11:12:17 +08:00
Vladimir Perminov 4fccfb2102 [Win32] Fix AudioDecoder fopen unicode. (#17815)
If use fopen to need convert utf8 string FileUtils::getSuitableFOpen.
ov_fopen and mpg123_open use fopen.
2017-05-16 09:45:33 +08:00
James Chen 3c1e36c2c3 Cleanup AudioEngine resource after exiting NewAudioEngineTest. (#17675)
* Unschedules update in AudioEngine implementation while AudioEngine::end is called.

* Cleanup AudioEngine resource after exiting NewAudioEngineTest.
2017-04-13 17:58:49 +08:00
James Chen 6217d8c5ca fixed #17591: [ios, mac, win32] Audio could not be played in the callback of AudioEngine::setFinishedCallback (#17593)
* Moves the implementation of AudioEngine::AudioInfo to cpp file.

* fixed #17591: [ios, mac, win32] Audio could not be played in the callback of AudioEngine::setFinishedCallback

* fixed #17591: Adds test case.
2017-03-27 17:28:39 +08:00
CocosRobot d07794052f Update license to 2017 (#17362)
* Typo: CopyRight -> Copyright

* Copyright update: chukong-inc.com -> Chukong Technologies Inc.

* [js files] Copyright update: 2014 -> 2014-2017

* [cpp files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2015 -> 2015-2017

* [js files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2016 -> 2016-2017

* Copyright update: 2013 -> 2013-2017

* Copyright update: 201?-201? -> 201?-2017

* License year fixes.

* Liscene year fix in CCRay.cpp

* Updates license years in CCGLProgramState.h & CCGLProgramStateCache.h
2017-02-14 14:36:57 +08:00
Wilson E. Alvarez 5d748f941b Mitigate cppcheck message (#17323) 2017-02-08 15:32:01 +08:00
Dmitry 4bf1750cbd issue #17305 fix: cocos/audio/win32/AudioCache.h fixed include <AL/al.h> (#17306) 2017-02-08 10:22:05 +08:00
James Chen be43c4210f Fixes crash that playing long audio and then uncacheAll (#17079)
* Fixes crash of playing long audio then uncacheAll.

* update

* Updates comments in MciPlayer.h

* tab -> 4spaces

* include path fix.
2016-12-29 10:05:13 +08:00
Wilson E. Alvarez cdee1e11de Performance tweak: use range-based for-loops instead of iterator-based for-loops. (#16642)
* Use ++ prefix instead for non-primitive data types in CCAutoPolygon.cpp

* Use ++ prefix instead for non-primitive data types in SimpleAudioEngine.cpp

* Use ++ prefix instead for non-primitive data types in CCNodeLoaderLibrary.cpp

* Use ++ prefix instead for non-primitive data types in CCActionManagerEx.cpp

* Use ++ prefix instead for non-primitive data types in CCDataReaderHelper.cpp

* Use ++ prefix instead for non-primitive data types in HttpClient-android.cpp

* Use ++ prefix instead for non-primitive data types in CCDevice-linux.cpp

* Use ++ prefix instead for non-primitive data types in ScriptingCore.cpp

* Switched implementation to range-based for loops

* Added readability, fixed loop in CCDataReaderHelper.cpp

Thanks to Dimon4eg for the code review.
2016-10-11 10:59:44 -07:00
minggo 04fd2b16b2 merge v3.13 back to v3 2016-08-29 11:57:13 +08:00
James Chen b135d512d2 Update copyright to 2016. (#16311) 2016-08-05 09:42:15 +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 cbc0612306 Use nullptr instead of 0 or NULL 2016-06-23 12:39:23 +09:00
xpol 1e70fb5eb5 Remove include of cocos2d.h (#15435) 2016-04-18 15:09:21 +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
mogemimi f280a31323 Fix typo in documentation and comments 2015-12-09 01:48:24 +09: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
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
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 86a68f5a09 AudioEngine:refine thread pool 2015-07-09 14:31:03 +08:00
WenhaiLin b395ef06d8 AudioEngine:support preload for audio[WIN32/WINRT 8.1/WP8.1] 2015-07-08 10:48:20 +08: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
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
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
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 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
Dhilan007 db45794625 fix macro 2014-09-30 09:57:28 +08:00
Dhilan007 7ebe4a5548 Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3-audio-win32
Conflicts:
	cocos/audio/AudioEngine.cpp
	cocos/audio/apple/AudioPlayer.h
	cocos/audio/include/AudioEngine.h
	tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.cpp
	tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.h
2014-09-30 09:45:47 +08:00
Dhilan007 f2f1331026 New Audio Engine[Win32] 2014-09-29 10:15:41 +08:00
minggo 6bcab3b05d Merge pull request #7920 from rny/audio_win32
win32 can not stop looping sound effect
2014-09-15 09:37:11 +08:00
Ricardo Quesada 4d57e991ea Compiles in Win32 2014-09-09 18:07:24 -07:00
Ningyu 1df8d423d0 win32 can not stop looping sound effect 2014-09-01 15:03:57 +08:00
samuele3hu 700699a37f Modify MciPlayer.cpp to support Unicode 2014-08-22 13:41:48 +08:00
John_He 2aa4b9936c Fix mingw64 build: convert from LPVOID to DWORD losses precision on 64-bit platform. 2014-05-28 12:37:35 +08:00
chuanweizhang2013 1fe52b1557 translate 2014-04-21 11:07:14 +08:00
koowolf 293bd5dc02 fix resume not support in midi file in win32 2014-04-03 09:55:31 +08:00
walzer d4c1aa92d5 add copyrights for 2014, in folders other then 2d. 2014-01-07 11:47:11 +08:00
martell e5ada6f377 added support for msys2 mingwtoolchains and fix x64 cocos/audio on windows platform for MSVC and Mingw. Also fixed a few very bad type casts very important for future Arm64 bit processors 2013-12-05 03:37:27 +00:00
minggo 4313c46e93 issue #2905:adjust folder structure 2013-10-12 11:22:05 +08:00