From 3859b7c39df77e990f9b43b0286838baf78c9e2a Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 28 Sep 2011 14:30:33 +0800 Subject: [PATCH] fixed #723: remove unneeded files --- ...actices For Programmers.pdf.REMOVED.git-id | 1 - ...ted with FMOD for Linux.pdf.REMOVED.git-id | 1 - .../fmod/documentation/LICENSE.TXT | 85 -- .../fmod-profiler.pdf.REMOVED.git-id | 1 - .../documentation/fmodex.chm.REMOVED.git-id | 1 - .../documentation/revision.txt.REMOVED.git-id | 1 - .../third_party/fmod/examples/3d/Makefile | 11 - .../third_party/fmod/examples/3d/main.c | 254 ---- .../third_party/fmod/examples/3d/main.cpp | 255 ---- .../fmod/examples/cdplayer/Makefile | 11 - .../fmod/examples/cdplayer/cdplayer | Bin 21193 -> 0 bytes .../third_party/fmod/examples/cdplayer/main.c | 236 ---- .../fmod/examples/cdplayer/main.cpp | 238 ---- .../fmod/examples/channelgroups/Makefile | 11 - .../fmod/examples/channelgroups/main.c | 226 --- .../fmod/examples/channelgroups/main.cpp | 226 --- .../fmod/examples/common/wincompat.h | 84 -- .../fmod/examples/dsp_custom/Makefile | 11 - .../fmod/examples/dsp_custom/main.c | 185 --- .../fmod/examples/dsp_custom/main.cpp | 185 --- .../examples/dsp_effectperspeaker/Makefile | 11 - .../fmod/examples/dsp_effectperspeaker/main.c | 268 ---- .../examples/dsp_effectperspeaker/main.cpp | 268 ---- .../fmod/examples/effects/Makefile | 11 - .../third_party/fmod/examples/effects/effects | Bin 25149 -> 0 bytes .../third_party/fmod/examples/effects/main.c | 333 ----- .../fmod/examples/effects/main.cpp | 333 ----- .../fmod/examples/filecallbacks/Makefile | 11 - .../fmod/examples/filecallbacks/main.c | 230 --- .../fmod/examples/filecallbacks/main.cpp | 229 --- .../fmod/examples/generatetone/Makefile | 11 - .../fmod/examples/generatetone/main.c | 230 --- .../fmod/examples/generatetone/main.cpp | 234 ---- .../fmod/examples/loadfrommemory/Makefile | 11 - .../fmod/examples/loadfrommemory/main.c | 219 --- .../fmod/examples/loadfrommemory/main.cpp | 213 --- .../fmod/examples/media/playlist.m3u | 11 - .../examples/media/wave.mp3.REMOVED.git-id | 1 - .../fmod/examples/multiplesoundcard/Makefile | 11 - .../fmod/examples/multiplesoundcard/main.c | 226 --- .../fmod/examples/multiplesoundcard/main.cpp | 228 --- .../fmod/examples/multispeakeroutput/Makefile | 11 - .../fmod/examples/multispeakeroutput/main.c | 335 ----- .../fmod/examples/multispeakeroutput/main.cpp | 337 ----- .../fmod/examples/netstream/Makefile | 11 - .../fmod/examples/netstream/main.c | 174 --- .../fmod/examples/netstream/main.cpp | 186 --- .../fmod/examples/offlinedecoding/Makefile | 11 - .../fmod/examples/offlinedecoding/main.c | 137 -- .../fmod/examples/offlinedecoding/main.cpp | 135 -- .../fmod/examples/pitchdetection/Makefile | 11 - .../fmod/examples/pitchdetection/main.c | 309 ---- .../fmod/examples/pitchdetection/main.cpp | 309 ---- .../fmod/examples/playlist/Makefile | 11 - .../third_party/fmod/examples/playlist/main.c | 254 ---- .../fmod/examples/playlist/main.cpp | 256 ---- .../fmod/examples/playlist/playlist | Bin 21196 -> 0 bytes .../fmod/examples/playsound/Makefile | 11 - .../fmod/examples/playsound/main.c | 184 --- .../fmod/examples/playsound/main.cpp | 182 --- .../fmod/examples/playsound/playsound | Bin 21100 -> 0 bytes .../fmod/examples/playstream/Makefile | 11 - .../fmod/examples/playstream/main.c | 149 -- .../fmod/examples/playstream/main.cpp | 147 -- .../examples/plugin_dev/codec_raw/Makefile | 5 - .../fmod/examples/plugin_dev/codec_raw/main.c | 96 -- .../examples/plugin_dev/dsp_gain/Makefile | 5 - .../fmod/examples/plugin_dev/dsp_gain/main.c | 181 --- .../fmod/examples/readtags/Makefile | 11 - .../third_party/fmod/examples/readtags/main.c | 165 --- .../fmod/examples/readtags/main.cpp | 165 --- .../fmod/examples/realtimestitching/Makefile | 11 - .../fmod/examples/realtimestitching/main.c | 245 ---- .../fmod/examples/realtimestitching/main.cpp | 245 ---- .../fmod/examples/recording/Makefile | 11 - .../fmod/examples/recording/main.c | 401 ------ .../fmod/examples/recording/main.cpp | 395 ------ .../fmod/examples/recordtodisk/Makefile | 11 - .../fmod/examples/recordtodisk/main.c | 326 ----- .../fmod/examples/recordtodisk/main.cpp | 326 ----- .../fmod/examples/ripnetstream/Makefile | 11 - .../fmod/examples/ripnetstream/main.c | 332 ----- .../fmod/examples/ripnetstream/main.cpp | 332 ----- .../fmod/examples/submixing/Makefile | 11 - .../fmod/examples/submixing/main.c | 269 ---- .../fmod/examples/submixing/main.cpp | 269 ---- .../fmod/examples/useplugins/Makefile | 11 - .../fmod/examples/useplugins/main.c | 249 ---- .../fmod/examples/useplugins/main.cpp | 249 ---- .../fmod/examples/usercreatedsound/Makefile | 11 - .../fmod/examples/usercreatedsound/main.c | 215 --- .../fmod/examples/usercreatedsound/main.cpp | 214 --- .../fmod/fmoddesignerapi/README.TXT | 57 - .../fmod/fmoddesignerapi/api/inc/fmod_event.h | 1244 ----------------- .../fmoddesignerapi/api/inc/fmod_event.hpp | 395 ------ .../fmoddesignerapi/api/inc/fmod_event_net.h | 42 - .../api/inc/fmod_event_net.hpp | 26 - .../libfmodevent-4.36.01.so.REMOVED.git-id | 1 - .../libfmodeventL-4.36.01.so.REMOVED.git-id | 1 - .../examples/RUN_BUILD_MEDIA_FILES.txt | 1 - .../fmoddesignerapi/examples/effects/Makefile | 8 - .../fmoddesignerapi/examples/effects/main.cpp | 99 -- .../examples/examples.fdp.REMOVED.git-id | 1 - .../examples/info_only/Makefile | 8 - .../examples/info_only/main.cpp | 210 --- .../examples/load_data/Makefile | 8 - .../examples/load_data/main.cpp | 115 -- .../examples/max_playbacks/Makefile | 8 - .../examples/max_playbacks/main.cpp | 262 ---- .../2011_cycle_sustain01.ogg.REMOVED.git-id | 1 - .../2011_cycle_sustain02.ogg.REMOVED.git-id | 1 - .../Submarine/bow_still01.ogg.REMOVED.git-id | 1 - .../Submarine/bow_still02.ogg.REMOVED.git-id | 1 - .../Submarine/bow_wake01.ogg.REMOVED.git-id | 1 - .../Submarine/bow_wake02.ogg.REMOVED.git-id | 1 - .../Submarine/bow_wake03.ogg.REMOVED.git-id | 1 - .../2011/Submarine/buzz01.ogg.REMOVED.git-id | 1 - .../2011/Submarine/buzz02.ogg.REMOVED.git-id | 1 - .../cables_creak01.ogg.REMOVED.git-id | 1 - .../cables_creak02.ogg.REMOVED.git-id | 1 - .../cables_creak03.ogg.REMOVED.git-id | 1 - .../cables_creak05.ogg.REMOVED.git-id | 1 - .../cables_creak06.ogg.REMOVED.git-id | 1 - .../cables_creak07.ogg.REMOVED.git-id | 1 - .../engine_component01.ogg.REMOVED.git-id | 1 - .../engine_component02.ogg.REMOVED.git-id | 1 - .../engine_component03.ogg.REMOVED.git-id | 1 - .../engine_component04.ogg.REMOVED.git-id | 1 - .../engine_component06.ogg.REMOVED.git-id | 1 - .../engine_component07.ogg.REMOVED.git-id | 1 - .../Submarine/engine_load.ogg.REMOVED.git-id | 1 - .../metal_creak_light_12.ogg.REMOVED.git-id | 1 - .../metal_screech03.ogg.REMOVED.git-id | 1 - .../media/2011/crickets.ogg.REMOVED.git-id | 1 - .../examples/media/build_media_files.sh | 5 - .../examples/media/car/Readme Copyright.txt | 3 - .../examples/media/examples.fev | Bin 55134 -> 0 bytes .../interactive_music_1.ogg.REMOVED.git-id | 1 - .../interactive_music_2.ogg.REMOVED.git-id | 1 - .../interactive_music_3.ogg.REMOVED.git-id | 1 - ...eractive_music_6channel.ogg.REMOVED.git-id | 1 - .../media/music/excited.ogg.REMOVED.git-id | 1 - .../media/music/relaxed.ogg.REMOVED.git-id | 1 - .../music/state-idle-01.ogg.REMOVED.git-id | 1 - .../music/state-idle-02.ogg.REMOVED.git-id | 1 - .../music/state-idle-03.ogg.REMOVED.git-id | 1 - .../state-idle-fadeout.ogg.REMOVED.git-id | 1 - .../state-race-finish.ogg.REMOVED.git-id | 1 - .../media/onefootstep.wav.REMOVED.git-id | 1 - .../examples/media/streaming_bank.txt | 1 - .../examples/media/tutorial_bank.txt | 267 ---- .../examples/parameters/Makefile | 8 - .../examples/parameters/main.cpp | 145 -- .../examples/programmer_selected/Makefile | 8 - .../examples/programmer_selected/main.cpp | 110 -- .../examples/programmer_sound/Makefile | 8 - .../examples/programmer_sound/main.cpp | 182 --- .../examples/realtime_tweaking/Makefile | 8 - .../examples/realtime_tweaking/main.cpp | 115 -- .../examples/simple_event/Makefile | 8 - .../examples/simple_event/main.cpp | 70 - .../third_party/fmod/tools/fsbanklib/Makefile | 5 - .../tools/fsbanklib/example.REMOVED.git-id | 1 - .../fmod/tools/fsbanklib/example.cpp | 369 ----- .../third_party/fmod/tools/fsbanklib/fsbank.h | 258 ---- .../fsbanklib/libfsbankex.a.REMOVED.git-id | 1 - .../fsbanklib/libmp3lame.so.REMOVED.git-id | 1 - .../tools/fsbanklib/twolame.so.REMOVED.git-id | 1 - 168 files changed, 17152 deletions(-) delete mode 100644 CocosDenshion/third_party/fmod/documentation/FMOD Event System - Best Practices For Programmers.pdf.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/documentation/Getting started with FMOD for Linux.pdf.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/documentation/LICENSE.TXT delete mode 100644 CocosDenshion/third_party/fmod/documentation/fmod-profiler.pdf.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/documentation/fmodex.chm.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/documentation/revision.txt.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/examples/3d/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/3d/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/3d/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/cdplayer/Makefile delete mode 100755 CocosDenshion/third_party/fmod/examples/cdplayer/cdplayer delete mode 100644 CocosDenshion/third_party/fmod/examples/cdplayer/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/cdplayer/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/channelgroups/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/channelgroups/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/channelgroups/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/common/wincompat.h delete mode 100644 CocosDenshion/third_party/fmod/examples/dsp_custom/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/dsp_custom/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/dsp_custom/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/effects/Makefile delete mode 100755 CocosDenshion/third_party/fmod/examples/effects/effects delete mode 100644 CocosDenshion/third_party/fmod/examples/effects/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/effects/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/filecallbacks/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/filecallbacks/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/filecallbacks/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/generatetone/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/generatetone/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/generatetone/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/loadfrommemory/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/loadfrommemory/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/loadfrommemory/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/media/playlist.m3u delete mode 100644 CocosDenshion/third_party/fmod/examples/media/wave.mp3.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/examples/multiplesoundcard/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/multiplesoundcard/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/multiplesoundcard/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/multispeakeroutput/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/multispeakeroutput/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/multispeakeroutput/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/netstream/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/netstream/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/netstream/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/offlinedecoding/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/offlinedecoding/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/offlinedecoding/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/pitchdetection/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/pitchdetection/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/pitchdetection/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/playlist/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/playlist/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/playlist/main.cpp delete mode 100755 CocosDenshion/third_party/fmod/examples/playlist/playlist delete mode 100644 CocosDenshion/third_party/fmod/examples/playsound/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/playsound/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/playsound/main.cpp delete mode 100755 CocosDenshion/third_party/fmod/examples/playsound/playsound delete mode 100644 CocosDenshion/third_party/fmod/examples/playstream/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/playstream/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/playstream/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/plugin_dev/codec_raw/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/plugin_dev/codec_raw/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/plugin_dev/dsp_gain/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/plugin_dev/dsp_gain/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/readtags/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/readtags/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/readtags/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/realtimestitching/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/realtimestitching/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/realtimestitching/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/recording/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/recording/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/recording/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/recordtodisk/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/recordtodisk/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/recordtodisk/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/ripnetstream/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/ripnetstream/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/ripnetstream/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/submixing/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/submixing/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/submixing/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/useplugins/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/useplugins/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/useplugins/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/examples/usercreatedsound/Makefile delete mode 100644 CocosDenshion/third_party/fmod/examples/usercreatedsound/main.c delete mode 100644 CocosDenshion/third_party/fmod/examples/usercreatedsound/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/README.TXT delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event.h delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event.hpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event_net.h delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event_net.hpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/api/lib/libfmodevent-4.36.01.so.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/api/lib/libfmodeventL-4.36.01.so.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/RUN_BUILD_MEDIA_FILES.txt delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/effects/Makefile delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/effects/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/examples.fdp.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/info_only/Makefile delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/info_only/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/load_data/Makefile delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/load_data/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/max_playbacks/Makefile delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/max_playbacks/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/2011_cycle_sustain01.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/2011_cycle_sustain02.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_still01.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_still02.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake01.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake02.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake03.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/buzz01.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/buzz02.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak01.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak02.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak03.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak05.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak06.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak07.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component01.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component02.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component03.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component04.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component06.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component07.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_load.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/metal_creak_light_12.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/metal_screech03.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/crickets.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/build_media_files.sh delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/car/Readme Copyright.txt delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/examples.fev delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_1.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_2.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_3.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_6channel.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/excited.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/relaxed.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-01.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-02.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-03.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-fadeout.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-race-finish.ogg.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/onefootstep.wav.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/streaming_bank.txt delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/tutorial_bank.txt delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/parameters/Makefile delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/parameters/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_selected/Makefile delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_selected/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_sound/Makefile delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_sound/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/realtime_tweaking/Makefile delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/realtime_tweaking/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/simple_event/Makefile delete mode 100644 CocosDenshion/third_party/fmod/fmoddesignerapi/examples/simple_event/main.cpp delete mode 100644 CocosDenshion/third_party/fmod/tools/fsbanklib/Makefile delete mode 100644 CocosDenshion/third_party/fmod/tools/fsbanklib/example.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/tools/fsbanklib/example.cpp delete mode 100644 CocosDenshion/third_party/fmod/tools/fsbanklib/fsbank.h delete mode 100644 CocosDenshion/third_party/fmod/tools/fsbanklib/libfsbankex.a.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/tools/fsbanklib/libmp3lame.so.REMOVED.git-id delete mode 100644 CocosDenshion/third_party/fmod/tools/fsbanklib/twolame.so.REMOVED.git-id diff --git a/CocosDenshion/third_party/fmod/documentation/FMOD Event System - Best Practices For Programmers.pdf.REMOVED.git-id b/CocosDenshion/third_party/fmod/documentation/FMOD Event System - Best Practices For Programmers.pdf.REMOVED.git-id deleted file mode 100644 index 42232caeda..0000000000 --- a/CocosDenshion/third_party/fmod/documentation/FMOD Event System - Best Practices For Programmers.pdf.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -fe25757fdb0cc2e48002bf130522902794158965 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/documentation/Getting started with FMOD for Linux.pdf.REMOVED.git-id b/CocosDenshion/third_party/fmod/documentation/Getting started with FMOD for Linux.pdf.REMOVED.git-id deleted file mode 100644 index 5b79271982..0000000000 --- a/CocosDenshion/third_party/fmod/documentation/Getting started with FMOD for Linux.pdf.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -2b6d571d132326e599c4790cc0a24aaaa940f721 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/documentation/LICENSE.TXT b/CocosDenshion/third_party/fmod/documentation/LICENSE.TXT deleted file mode 100644 index c5656560bd..0000000000 --- a/CocosDenshion/third_party/fmod/documentation/LICENSE.TXT +++ /dev/null @@ -1,85 +0,0 @@ -FMOD Ex SoundSystem Copyright © 2005-2011 Firelight Technologies Pty, Ltd. - -FMOD NON-COMMERCIAL LICENSE ------------------------------------- -IF YOUR PRODUCT IS NOT INTENDED FOR COMMERCIAL GAIN AND DOES NOT -INCLUDE THE FMOD LIBRARY FOR RESALE, LICENSE OR OTHER COMMERCIAL -DISTRIBUTION, THEN USE OF FMOD IS FREE OF CHARGE. THERE ARE NO -LICENSE FEES FOR NON-COMMERCIAL APPLICATIONS. - -CONDITIONS/LIMITATIONS: -- WHEN USING THIS LICENSE, THE FMOD LIBRARY CANNOT BE USED FOR - RESALE OR OTHER COMMERCIAL DISTRIBUTION -- THIS LICENSE CANNOT BE USED FOR PRODUCTS WHICH DO NOT MAKE - PROFIT BUT ARE STILL COMMERCIALLY RELEASED -- THIS LICENSE CANNOT BE USED FOR COMMERCIAL SERVICES, WHERE THE - EXECUTABLE CONTAINING FMOD IS NOT SOLD, BUT THE DATA IS. -- WHEN USING FMOD, A CREDIT LINE IS REQUIRED IN EITHER DOCUMENTATION, - OR 'ON SCREEN' FORMAT (IF POSSIBLE). IT SHOULD CONTAIN AT LEAST - THE WORDS FMOD SOUND SYSTEM AND FIRELIGHT TECHNOLOGIES. - LOGOS ARE AVAILABLE FOR BOX OR MANUAL ART, BUT ARE NOT MANDANTORY. - AN EXAMPLE CREDIT COULD BE: - - FMOD Sound System, copyright © Firelight Technologies Pty, Ltd., 1994-2011. - - NOTE THIS IN ADVANCE, AS IT MUST BE DONE BEFORE SHIPPING YOUR - PRODUCT WITH FMOD. - -Uses Ogg Vorbis codec. BSD license. ------------------------------------- -Copyright (c) 2002, Xiph.org Foundation - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of the Xiph.org Foundation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -For Android platform code. --------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. diff --git a/CocosDenshion/third_party/fmod/documentation/fmod-profiler.pdf.REMOVED.git-id b/CocosDenshion/third_party/fmod/documentation/fmod-profiler.pdf.REMOVED.git-id deleted file mode 100644 index bbd9ca9f63..0000000000 --- a/CocosDenshion/third_party/fmod/documentation/fmod-profiler.pdf.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -fe3d4e47687a4bc181a1b3e1d71459b13f8d1ebc \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/documentation/fmodex.chm.REMOVED.git-id b/CocosDenshion/third_party/fmod/documentation/fmodex.chm.REMOVED.git-id deleted file mode 100644 index 2cee46a70a..0000000000 --- a/CocosDenshion/third_party/fmod/documentation/fmodex.chm.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -ea6ff436eda933873fe871fb22523eebdfcccbca \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/documentation/revision.txt.REMOVED.git-id b/CocosDenshion/third_party/fmod/documentation/revision.txt.REMOVED.git-id deleted file mode 100644 index cc8215e791..0000000000 --- a/CocosDenshion/third_party/fmod/documentation/revision.txt.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -2e5bd5bfc4d59acfe03fe0d7fd67187dd7281171 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/examples/3d/Makefile b/CocosDenshion/third_party/fmod/examples/3d/Makefile deleted file mode 100644 index c076990692..0000000000 --- a/CocosDenshion/third_party/fmod/examples/3d/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -3d_cpp: main.cpp - g++ -O3 -o 3d main.cpp ../../api/lib/libfmodex.so -pthread - -3d_c: main.c - g++ -O3 -o 3d main.c ../../api/lib/libfmodex.so -pthread - -run: - ./3d - -clean: - rm -f 3d diff --git a/CocosDenshion/third_party/fmod/examples/3d/main.c b/CocosDenshion/third_party/fmod/examples/3d/main.c deleted file mode 100644 index ec0687e721..0000000000 --- a/CocosDenshion/third_party/fmod/examples/3d/main.c +++ /dev/null @@ -1,254 +0,0 @@ -/*=============================================================================================== - 3d Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to basic 3d positioning -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include -#include - - -const int INTERFACE_UPDATETIME = 50; // 50ms update for interface - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound1, *sound2, *sound3; - FMOD_CHANNEL *channel1 = 0, *channel2 = 0, *channel3 = 0; - FMOD_RESULT result; - int key; - int listenerflag = TRUE; - FMOD_VECTOR listenerpos = { 0.0f, 0.0f, 0.0f }; - unsigned int version; - - printf("===============================================================\n"); - printf("3d Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===============================================================\n"); - printf("This example plays 2 3D sounds in software. Optionally you can\n"); - printf("play a 2D software sound as well.\n"); - printf("Hardware sounds are not supported on Linux\n"); - printf("===============================================================\n\n"); - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = FMOD_System_Init(system, 10, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - /* - Load some sounds - */ - result = FMOD_System_CreateSound(system, "../media/drumloop.wav", FMOD_SOFTWARE | FMOD_3D, 0, &sound1); - ERRCHECK(result); - result = FMOD_Sound_Set3DMinMaxDistance(sound1, 4.0f, 10000.0f); - ERRCHECK(result); - result = FMOD_Sound_SetMode(sound1, FMOD_LOOP_NORMAL); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/jaguar.wav", FMOD_SOFTWARE | FMOD_3D, 0, &sound2); - ERRCHECK(result); - result = FMOD_Sound_Set3DMinMaxDistance(sound2, 4.0f, 10000.0f); - ERRCHECK(result); - result = FMOD_Sound_SetMode(sound2, FMOD_LOOP_NORMAL); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/swish.wav", FMOD_SOFTWARE | FMOD_2D, 0, &sound3); - ERRCHECK(result); - - /* - Play sounds at certain positions - */ - { - FMOD_VECTOR pos = { -10.0f, -0.0f, 0.0f }; - FMOD_VECTOR vel = { 0.0f, 0.0f, 0.0f }; - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound1, TRUE, &channel1); - ERRCHECK(result); - result = FMOD_Channel_Set3DAttributes(channel1, &pos, &vel); - ERRCHECK(result); - result = FMOD_Channel_SetPaused(channel1, FALSE); - ERRCHECK(result); - } - - { - FMOD_VECTOR pos = { 15.0f, -0.0f, -0.0f }; - FMOD_VECTOR vel = { 0.0f, 0.0f, 0.0f }; - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound2, TRUE, &channel2); - ERRCHECK(result); - result = FMOD_Channel_Set3DAttributes(channel2, &pos, &vel); - ERRCHECK(result); - result = FMOD_Channel_SetPaused(channel2, FALSE); - ERRCHECK(result); - } - - /* - Display help - */ - { - int numchannels; - - result = FMOD_System_GetHardwareChannels(system, &numchannels); - ERRCHECK(result); - - printf("Hardware channels : %d\n", numchannels); - } - - printf("=========================================================================\n"); - printf("Press 1 Pause/Unpause 16bit 3D sound at any time\n"); - printf(" 2 Pause/Unpause 8bit 3D sound at any time\n"); - printf(" 3 Play 16bit STEREO 2D sound at any time\n"); - printf(" < Move listener left (in still mode)\n"); - printf(" > Move listener right (in still mode)\n"); - printf(" SPACE Stop/Start listener automatic movement\n"); - printf(" ESC Quit\n"); - printf("=========================================================================\n"); - - /* - Main loop - */ - do - { - if (kbhit()) - { - key = getch(); - - if (key == '1') - { - int paused; - FMOD_Channel_GetPaused(channel1, &paused); - FMOD_Channel_SetPaused(channel1, !paused); - } - - if (key == '2') - { - int paused; - FMOD_Channel_GetPaused(channel2, &paused); - FMOD_Channel_SetPaused(channel2, !paused); - } - - if (key == '3') - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound3, FALSE, &channel3); - ERRCHECK(result); - } - - if (key == ' ') - { - listenerflag = !listenerflag; - } - - if (!listenerflag) - { - if (key == '<') - { - listenerpos.x -= 1.0f; - if (listenerpos.x < -35) - { - listenerpos.x = -35; - } - } - if (key == '>') - { - listenerpos.x += 1.0f; - if (listenerpos.x > 30) - { - listenerpos.x = 30; - } - } - } - } - - // ========================================================================================== - // UPDATE THE LISTENER - // ========================================================================================== - { - static float t = 0; - static FMOD_VECTOR lastpos = { 0.0f, 0.0f, 0.0f }; - FMOD_VECTOR forward = { 0.0f, 0.0f, 1.0f }; - FMOD_VECTOR up = { 0.0f, 1.0f, 0.0f }; - FMOD_VECTOR vel; - - if (listenerflag) - { - listenerpos.x = ((float)sin(t * 0.05f) * 33.0f); // left right pingpong - } - - // ********* NOTE ******* READ NEXT COMMENT!!!!! - // vel = how far we moved last FRAME (m/f), then time compensate it to SECONDS (m/s). - vel.x = (listenerpos.x - lastpos.x) * (1000 / INTERFACE_UPDATETIME); - vel.y = (listenerpos.y - lastpos.y) * (1000 / INTERFACE_UPDATETIME); - vel.z = (listenerpos.z - lastpos.z) * (1000 / INTERFACE_UPDATETIME); - - // store pos for next time - lastpos = listenerpos; - - result = FMOD_System_Set3DListenerAttributes(system, 0, &listenerpos, &vel, &forward, &up); - ERRCHECK(result); - - t += (30 * (1.0f / (float)INTERFACE_UPDATETIME)); // t is just a time value .. it increments in 30m/s steps in this example - - // print out a small visual display - { - char s[80]; - - sprintf(s, "|.......................<1>......................<2>....................|"); - - s[(int)(listenerpos.x) + 35] = 'L'; - printf("%s\r", s); - fflush(stdout); - } - } - - FMOD_System_Update(system); - - Sleep(INTERFACE_UPDATETIME - 1); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound1); - ERRCHECK(result); - result = FMOD_Sound_Release(sound2); - ERRCHECK(result); - result = FMOD_Sound_Release(sound3); - ERRCHECK(result); - - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/3d/main.cpp b/CocosDenshion/third_party/fmod/examples/3d/main.cpp deleted file mode 100644 index f9066e69f2..0000000000 --- a/CocosDenshion/third_party/fmod/examples/3d/main.cpp +++ /dev/null @@ -1,255 +0,0 @@ -/*=============================================================================================== - 3d Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to basic 3d positioning -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include -#include - - -const int INTERFACE_UPDATETIME = 50; // 50ms update for interface - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound1, *sound2, *sound3; - FMOD::Channel *channel1 = 0, *channel2 = 0, *channel3 = 0; - FMOD_RESULT result; - int key; - bool listenerflag = true; - FMOD_VECTOR listenerpos = { 0.0f, 0.0f, 0.0f }; - unsigned int version; - - printf("===============================================================\n"); - printf("3d Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===============================================================\n\n"); - printf("This example plays 2 3D sounds in software. Optionally you can\n"); - printf("play a 2D software sound as well.\n"); - printf("Hardware sounds are not supported on Linux\n"); - printf("===============================================================\n\n"); - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = system->init(10, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - /* - Load some sounds - */ - - result = system->createSound("../media/drumloop.wav", FMOD_SOFTWARE | FMOD_3D, 0, &sound1); - ERRCHECK(result); - result = sound1->set3DMinMaxDistance(4.0f, 10000.0f); - ERRCHECK(result); - result = sound1->setMode(FMOD_LOOP_NORMAL); - ERRCHECK(result); - - result = system->createSound("../media/jaguar.wav", FMOD_SOFTWARE | FMOD_3D, 0, &sound2); - ERRCHECK(result); - result = sound2->set3DMinMaxDistance(4.0f, 10000.0f); - ERRCHECK(result); - result = sound2->setMode(FMOD_LOOP_NORMAL); - ERRCHECK(result); - - result = system->createSound("../media/swish.wav", FMOD_SOFTWARE | FMOD_2D, 0, &sound3); - ERRCHECK(result); - - /* - Play sounds at certain positions - */ - { - FMOD_VECTOR pos = { -10.0f, -0.0f, 0.0f }; - FMOD_VECTOR vel = { 0.0f, 0.0f, 0.0f }; - - result = system->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel1); - ERRCHECK(result); - result = channel1->set3DAttributes(&pos, &vel); - ERRCHECK(result); - result = channel1->setPaused(false); - ERRCHECK(result); - } - - { - FMOD_VECTOR pos = { 15.0f, -0.0f, -0.0f }; - FMOD_VECTOR vel = { 0.0f, 0.0f, 0.0f }; - - result = system->playSound(FMOD_CHANNEL_FREE, sound2, true, &channel2); - ERRCHECK(result); - result = channel2->set3DAttributes(&pos, &vel); - ERRCHECK(result); - result = channel2->setPaused(false); - ERRCHECK(result); - } - - /* - Display help - */ - { - int numchannels = 0; - - result = system->getHardwareChannels(&numchannels); - ERRCHECK(result); - - printf("Hardware channels : %d\n", numchannels); - } - - printf("=========================================================================\n"); - printf("Press 1 Pause/Unpause 16bit 3D sound at any time\n"); - printf(" 2 Pause/Unpause 8bit 3D sound at any time\n"); - printf(" 3 Play 16bit STEREO 2D sound at any time\n"); - printf(" < Move listener left (in still mode)\n"); - printf(" > Move listener right (in still mode)\n"); - printf(" SPACE Stop/Start listener automatic movement\n"); - printf(" ESC Quit\n"); - printf("=========================================================================\n"); - - /* - Main loop - */ - do - { - if (kbhit()) - { - key = getch(); - - if (key == '1') - { - bool paused; - channel1->getPaused(&paused); - channel1->setPaused(!paused); - } - - if (key == '2') - { - bool paused; - channel2->getPaused(&paused); - channel2->setPaused(!paused); - } - - if (key == '3') - { - result = system->playSound(FMOD_CHANNEL_FREE, sound3, false, &channel3); - ERRCHECK(result); - } - - if (key == ' ') - { - listenerflag = !listenerflag; - } - - if (!listenerflag) - { - if (key == '<') - { - listenerpos.x -= 1.0f; - if (listenerpos.x < -35) - { - listenerpos.x = -35; - } - } - if (key == '>') - { - listenerpos.x += 1.0f; - if (listenerpos.x > 30) - { - listenerpos.x = 30; - } - } - } - } - - // ========================================================================================== - // UPDATE THE LISTENER - // ========================================================================================== - { - static float t = 0; - static FMOD_VECTOR lastpos = { 0.0f, 0.0f, 0.0f }; - FMOD_VECTOR forward = { 0.0f, 0.0f, 1.0f }; - FMOD_VECTOR up = { 0.0f, 1.0f, 0.0f }; - FMOD_VECTOR vel; - - if (listenerflag) - { - listenerpos.x = ((float)sin(t * 0.05f) * 33.0f); // left right pingpong - } - - // ********* NOTE ******* READ NEXT COMMENT!!!!! - // vel = how far we moved last FRAME (m/f), then time compensate it to SECONDS (m/s). - vel.x = (listenerpos.x - lastpos.x) * (1000 / INTERFACE_UPDATETIME); - vel.y = (listenerpos.y - lastpos.y) * (1000 / INTERFACE_UPDATETIME); - vel.z = (listenerpos.z - lastpos.z) * (1000 / INTERFACE_UPDATETIME); - - // store pos for next time - lastpos = listenerpos; - - result = system->set3DListenerAttributes(0, &listenerpos, &vel, &forward, &up); - ERRCHECK(result); - - t += (30 * (1.0f / (float)INTERFACE_UPDATETIME)); // t is just a time value .. it increments in 30m/s steps in this example - - // print out a small visual display - { - char s[80]; - - sprintf(s, "|.......................<1>......................<2>....................|"); - - s[(int)(listenerpos.x) + 35] = 'L'; - printf("%s\r", s); - fflush(stdout); - } - } - - system->update(); - - Sleep(INTERFACE_UPDATETIME - 1); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound1->release(); - ERRCHECK(result); - result = sound2->release(); - ERRCHECK(result); - result = sound3->release(); - ERRCHECK(result); - - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/cdplayer/Makefile b/CocosDenshion/third_party/fmod/examples/cdplayer/Makefile deleted file mode 100644 index 9e935e5bfd..0000000000 --- a/CocosDenshion/third_party/fmod/examples/cdplayer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -cdplayer_cpp: main.cpp - g++ -O3 -o cdplayer main.cpp ../../api/lib/libfmodex.so -pthread - -cdplayer_c: main.c - g++ -O3 -o cdplayer main.c ../../api/lib/libfmodex.so -pthread - -run: - ./cdplayer - -clean: - rm -f cdplayer diff --git a/CocosDenshion/third_party/fmod/examples/cdplayer/cdplayer b/CocosDenshion/third_party/fmod/examples/cdplayer/cdplayer deleted file mode 100755 index ec5e6b93b6d7ba6366a04a28966527c0ad31a14c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21193 zcmd6Pe|%NdmG23;;Du6%l<}d`dbFX!#}E>J2}o-~as#PJxaJ1Ls=b`tdy;#|{nh&; zKYZ4KNl-Eo%BSVikL@@WTgP^0oYBrW4E`7!1{Hkuy`p}mk5~D0=!l(A^IF=XrY*1c zeZOm;bMCnpwYD>V%z>4C*4}Hcz4qE`uf6s@_nbctw6#=JRA|mMO{>(11^4>=E0G>- zR3$4lU7M*b)~?bPYBP|pGO&C3OIpsu?<2Dbz*3n&<4+y1+eaX0CmUmnrCJo3eL60>Z=xX{mJpcUwU3 zyslBn2mZ@3W}lslI+$f6?4S3VXCqhJDfQ%B)Dy2iQi*njoih0_;7SipTFUL{dk;qI z;F;|+nMdAi_o>&vcvn;4UnU>D>GkoGpWC*uXNytw(+*f4K}_TgGp38UF1ue*dEk_u4V}zf#7(rHtQWW#xC5 z;Ui`A4*{bl71Hm=IA&~AeKbz_R(Jj}$O z0lyFR$$uU^!1K_59el3B@wc{i8U7n-OL-HkyC;!~nsg^x_%j_VTiQ1_uMQ1mb7o?t zm9%mJYe%rZyku=UZVZJ|`D8Rue?4o2n>ICebOhR3JDLOAf*qmoDplGYByxRI%t$89 zc%Yomsz^MQH3Jv%U!6}!jhweY@vC3eYvwxgiBP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6F>Rmtf<&fAWQT%|I^EIW5KMd8-;Q6Ey ion1+jVQcl8)wTFwQ#c(7=VJL}Uv2lGrasps+W-HZ=Gx)_ diff --git a/CocosDenshion/third_party/fmod/examples/cdplayer/main.c b/CocosDenshion/third_party/fmod/examples/cdplayer/main.c deleted file mode 100644 index 0c3eea349b..0000000000 --- a/CocosDenshion/third_party/fmod/examples/cdplayer/main.c +++ /dev/null @@ -1,236 +0,0 @@ -/*=============================================================================================== - CDPlayer Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to play CD tracks digitally and generate a CDDB query -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -int cddb_sum(int n) -{ - int ret = 0; - - while (n > 0) - { - ret += (n % 10); - n /= 10; - } - - return ret; -} - -unsigned long cddb_discid(FMOD_CDTOC *toc) -{ - int i, t, n = 0; - - for (i = 0; i < toc->numtracks; i++) - { - n += cddb_sum((toc->min[i] * 60) + toc->sec[i]); - } - - t = ((toc->min[toc->numtracks] * 60) + toc->sec[toc->numtracks]) - ((toc->min[0] * 60) + toc->sec[0]); - - return ((n % 0xff) << 24 | t << 8 | toc->numtracks); -} - -void dump_cddb_query(FMOD_CDTOC *toc) -{ - int i; - - printf("cddb query %08x %d", cddb_discid(toc), toc->numtracks); - - for (i = 0; i < toc->numtracks; i++) - { - printf(" %d", (toc->min[i] * (60 * 75)) + (toc->sec[i] * 75) + toc->frame[i]); - } - - printf(" %d\n", (toc->min[toc->numtracks] * 60) + toc->sec[toc->numtracks]); -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *cdsound; - FMOD_SOUND *sound; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - int key, numtracks, currenttrack = 0; - unsigned int version; - - if (argc < 2) - { - printf("Usage: cdplayer \n"); - printf("Example: cdplayer /dev/cdrom\n"); - exit(-1); - } - - printf("==================================================================\n"); - printf("CDPlayer Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==================================================================\n\n"); - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 1, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - /* - Bump up the file buffer size a bit from the 16k default for CDDA, because it is a slower medium. - */ - result = FMOD_System_SetStreamBufferSize(system, 64*1024, FMOD_TIMEUNIT_RAWBYTES); - ERRCHECK(result); - - result = FMOD_System_CreateStream(system, argv[1], FMOD_OPENONLY, 0, &cdsound); - ERRCHECK(result); - result = FMOD_Sound_GetNumSubSounds(cdsound, &numtracks); - ERRCHECK(result); - result = FMOD_Sound_GetSubSound(cdsound, currenttrack, &sound); - ERRCHECK(result); - - for (;;) - { - FMOD_TAG tag; - - if (FMOD_Sound_GetTag(cdsound, 0, -1, &tag) != FMOD_OK) - { - break; - } - if (tag.datatype == FMOD_TAGDATATYPE_CDTOC) - { - dump_cddb_query((FMOD_CDTOC *)tag.data); - } - } - - printf("\n========================================\n"); - printf("Press SPACE to pause\n"); - printf(" n to skip to next track\n"); - printf(" ESC to exit\n"); - printf("========================================\n\n"); - - /* - Print out length of entire CD. Did you know you can also play 'cdsound' and it will play the whole CD without gaps? - */ - { - unsigned int lenms; - - result = FMOD_Sound_GetLength(cdsound, &lenms, FMOD_TIMEUNIT_MS); - ERRCHECK(result); - - printf("Total CD length %02d:%02d\n\n", lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100); - } - - /* - Play a CD track - */ - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, FALSE, &channel); - ERRCHECK(result); - - /* - Main loop - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - int paused; - FMOD_Channel_GetPaused(channel, &paused); - FMOD_Channel_SetPaused(channel, !paused); - break; - } - - case 'n' : - { - currenttrack++; - if (currenttrack >= numtracks) - { - currenttrack = 0; - } - result = FMOD_Sound_GetSubSound(cdsound, currenttrack, &sound); - ERRCHECK(result); - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, FALSE, &channel); - ERRCHECK(result); - break; - } - } - } - - FMOD_System_Update(system); - - if (channel) - { - unsigned int ms, lenms, percent = 0; - FMOD_BOOL playing; - FMOD_BOOL paused; - - result = FMOD_Channel_GetPaused(channel, &paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - result = FMOD_Channel_IsPlaying(channel, &playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - result = FMOD_Sound_GetLength(sound, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - printf("Track %d/%d : %02d:%02d:%02d/%02d:%02d:%02d : %s\r", currenttrack + 1, numtracks, ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped"); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/cdplayer/main.cpp b/CocosDenshion/third_party/fmod/examples/cdplayer/main.cpp deleted file mode 100644 index 08eec0cd65..0000000000 --- a/CocosDenshion/third_party/fmod/examples/cdplayer/main.cpp +++ /dev/null @@ -1,238 +0,0 @@ -/*=============================================================================================== - CDPlayer Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to play CD tracks digitally and generate a CDDB query -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -int cddb_sum(int n) -{ - int ret = 0; - - while (n > 0) - { - ret += (n % 10); - n /= 10; - } - - return ret; -} - -unsigned long cddb_discid(FMOD_CDTOC *toc) -{ - int i, t, n = 0; - - for (i = 0; i < toc->numtracks; i++) - { - n += cddb_sum((toc->min[i] * 60) + toc->sec[i]); - } - - t = ((toc->min[toc->numtracks] * 60) + toc->sec[toc->numtracks]) - ((toc->min[0] * 60) + toc->sec[0]); - - return ((n % 0xff) << 24 | t << 8 | toc->numtracks); -} - -void dump_cddb_query(FMOD_CDTOC *toc) -{ - int i; - - printf("cddb query %08x %d", cddb_discid(toc), toc->numtracks); - - for (i = 0; i < toc->numtracks; i++) - { - printf(" %d", (toc->min[i] * (60 * 75)) + (toc->sec[i] * 75) + toc->frame[i]); - } - - printf(" %d\n", (toc->min[toc->numtracks] * 60) + toc->sec[toc->numtracks]); -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *cdsound; - FMOD::Sound *sound; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - int key, numtracks, currenttrack = 0; - unsigned int version; - - if (argc < 2) - { - printf("Usage: cdplayer \n"); - printf("Example: cdplayer /dev/cdrom\n"); - exit(-1); - } - - printf("==================================================================\n"); - printf("CDPlayer Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==================================================================\n\n"); - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(1, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - /* - Bump up the file buffer size a bit from the 16k default for CDDA, because it is a slower medium. - */ - result = system->setStreamBufferSize(64*1024, FMOD_TIMEUNIT_RAWBYTES); - ERRCHECK(result); - - result = system->createStream(argv[1], FMOD_OPENONLY, 0, &cdsound); - ERRCHECK(result); - result = cdsound->getNumSubSounds(&numtracks); - ERRCHECK(result); - result = cdsound->getSubSound(currenttrack, &sound); - ERRCHECK(result); - - for (;;) - { - FMOD_TAG tag; - - if (cdsound->getTag(0, -1, &tag) != FMOD_OK) - { - break; - } - if (tag.datatype == FMOD_TAGDATATYPE_CDTOC) - { - dump_cddb_query((FMOD_CDTOC *)tag.data); - } - } - - printf("\n========================================\n"); - printf("Press SPACE to pause\n"); - printf(" n to skip to next track\n"); - printf(" ESC to exit\n"); - printf("========================================\n\n"); - - /* - Print out length of entire CD. Did you know you can also play 'cdsound' and it will play the whole CD without gaps? - */ - { - unsigned int lenms; - - result = cdsound->getLength(&lenms, FMOD_TIMEUNIT_MS); - ERRCHECK(result); - - printf("Total CD length %02d:%02d\n\n", lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100); - } - - - /* - Play a CD track - */ - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - - /* - Main loop - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - bool paused; - channel->getPaused(&paused); - channel->setPaused(!paused); - break; - } - - case 'n' : - { - currenttrack++; - if (currenttrack >= numtracks) - { - currenttrack = 0; - } - result = cdsound->getSubSound(currenttrack, &sound); - ERRCHECK(result); - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - break; - } - } - } - - system->update(); - - if (channel) - { - unsigned int ms; - unsigned int lenms; - bool playing; - bool paused; - - result = channel->getPaused(&paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - result = channel->isPlaying(&playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - result = sound->getLength(&lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - printf("Track %d/%d : %02d:%02d:%02d/%02d:%02d:%02d : %s\r", currenttrack + 1, numtracks, ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped"); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/channelgroups/Makefile b/CocosDenshion/third_party/fmod/examples/channelgroups/Makefile deleted file mode 100644 index d069d00587..0000000000 --- a/CocosDenshion/third_party/fmod/examples/channelgroups/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -channelgroups_cpp: main.cpp - g++ -O3 -o channelgroups main.cpp ../../api/lib/libfmodex.so -pthread - -channelgroups_c: main.c - g++ -O3 -o channelgroups main.c ../../api/lib/libfmodex.so -pthread - -run: - ./channelgroups - -clean: - rm -f channelgroups diff --git a/CocosDenshion/third_party/fmod/examples/channelgroups/main.c b/CocosDenshion/third_party/fmod/examples/channelgroups/main.c deleted file mode 100644 index f738cac1bf..0000000000 --- a/CocosDenshion/third_party/fmod/examples/channelgroups/main.c +++ /dev/null @@ -1,226 +0,0 @@ -/*=============================================================================================== - ChannelGroups Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to put channels into channel groups, so that you can affect a group - of channels at a time instead of just one channel at a time. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound[6]; - FMOD_CHANNEL *channel[6]; - FMOD_CHANNELGROUP *groupA, *groupB, *masterGroup; - FMOD_RESULT result; - int key, count; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/drumloop.wav", FMOD_LOOP_NORMAL, 0, &sound[0]); - ERRCHECK(result); - result = FMOD_System_CreateSound(system, "../media/jaguar.wav", FMOD_LOOP_NORMAL, 0, &sound[1]); - ERRCHECK(result); - result = FMOD_System_CreateSound(system, "../media/swish.wav", FMOD_LOOP_NORMAL, 0, &sound[2]); - ERRCHECK(result); - result = FMOD_System_CreateSound(system, "../media/c.ogg", FMOD_LOOP_NORMAL, 0, &sound[3]); - ERRCHECK(result); - result = FMOD_System_CreateSound(system, "../media/d.ogg", FMOD_LOOP_NORMAL, 0, &sound[4]); - ERRCHECK(result); - result = FMOD_System_CreateSound(system, "../media/e.ogg", FMOD_LOOP_NORMAL, 0, &sound[5]); - ERRCHECK(result); - - result = FMOD_System_CreateChannelGroup(system, "Group A", &groupA); - ERRCHECK(result); - - result = FMOD_System_CreateChannelGroup(system, "Group B", &groupB); - ERRCHECK(result); - - result = FMOD_System_GetMasterChannelGroup(system, &masterGroup); - ERRCHECK(result); - - printf("=======================================================================\n"); - printf("ChannelGroups Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("=======================================================================\n"); - printf("\n"); - printf("Group A : drumloop.wav, jaguar.wav, swish.wav\n"); - printf("Group B : c.ogg, d.ogg, e.ogg\n"); - printf("\n"); - printf("Press 'A' to mute/unmute group A\n"); - printf("Press 'B' to mute/unmute group B\n"); - printf("Press 'C' to mute/unmute group A and B (master group)\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Instead of being independent, set the group A and B to be children of the master group. - */ - result = FMOD_ChannelGroup_AddGroup(masterGroup, groupA); - ERRCHECK(result); - - result = FMOD_ChannelGroup_AddGroup(masterGroup, groupB); - ERRCHECK(result); - - /* - Start all the sounds! - */ - for (count = 0; count < 6; count++) - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound[count], TRUE, &channel[count]); - ERRCHECK(result); - if (count < 3) - { - result = FMOD_Channel_SetChannelGroup(channel[count], groupA); - } - else - { - result = FMOD_Channel_SetChannelGroup(channel[count], groupB); - } - ERRCHECK(result); - result = FMOD_Channel_SetPaused(channel[count], FALSE); - ERRCHECK(result); - } - - /* - Change the volume of each group, just because we can! (And makes it less of a loud noise). - */ - result = FMOD_ChannelGroup_SetVolume(groupA, 0.5f); - ERRCHECK(result); - result = FMOD_ChannelGroup_SetVolume(groupB, 0.5f); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'a' : - case 'A' : - { - static int mute = TRUE; - - FMOD_ChannelGroup_SetMute(groupA, mute); - - mute = !mute; - break; - } - case 'b' : - case 'B' : - { - static int mute = TRUE; - - FMOD_ChannelGroup_SetMute(groupB, mute); - - mute = !mute; - break; - } - case 'c' : - case 'C' : - { - static int mute = TRUE; - - FMOD_ChannelGroup_SetMute(masterGroup, mute); - - mute = !mute; - break; - } - } - } - - FMOD_System_Update(system); - - { - int channelsplaying = 0; - - FMOD_System_GetChannelsPlaying(system, &channelsplaying); - - printf("Channels Playing %2d\r", channelsplaying); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - A little fade out. (over 2 seconds) - */ - printf("Goodbye!\n"); - { - float pitch = 1.0f; - float vol = 1.0f; - - for (count = 0; count < 200; count++) - { - FMOD_ChannelGroup_SetPitch(masterGroup, pitch); - FMOD_ChannelGroup_SetVolume(masterGroup, vol); - - vol -= (1.0f / 200.0f); - pitch -= (0.5f / 200.0f); - - Sleep(10); - } - } - - /* - Shut down - */ - for (count = 0; count < 6; count++) - { - result = FMOD_Sound_Release(sound[count]); - ERRCHECK(result); - } - - result = FMOD_ChannelGroup_Release(groupA); - ERRCHECK(result); - result = FMOD_ChannelGroup_Release(groupB); - ERRCHECK(result); - - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/channelgroups/main.cpp b/CocosDenshion/third_party/fmod/examples/channelgroups/main.cpp deleted file mode 100644 index 6c043d0843..0000000000 --- a/CocosDenshion/third_party/fmod/examples/channelgroups/main.cpp +++ /dev/null @@ -1,226 +0,0 @@ -/*=============================================================================================== - ChannelGroups Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to put channels into channel groups, so that you can affect a group - of channels at a time instead of just one channel at a time. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound[6]; - FMOD::Channel *channel[6]; - FMOD::ChannelGroup *groupA, *groupB, *masterGroup; - FMOD_RESULT result; - int key, count; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->createSound("../media/drumloop.wav", FMOD_LOOP_NORMAL, 0, &sound[0]); - ERRCHECK(result); - result = system->createSound("../media/jaguar.wav", FMOD_LOOP_NORMAL, 0, &sound[1]); - ERRCHECK(result); - result = system->createSound("../media/swish.wav", FMOD_LOOP_NORMAL, 0, &sound[2]); - ERRCHECK(result); - result = system->createSound("../media/c.ogg", FMOD_LOOP_NORMAL, 0, &sound[3]); - ERRCHECK(result); - result = system->createSound("../media/d.ogg", FMOD_LOOP_NORMAL, 0, &sound[4]); - ERRCHECK(result); - result = system->createSound("../media/e.ogg", FMOD_LOOP_NORMAL, 0, &sound[5]); - ERRCHECK(result); - - result = system->createChannelGroup("Group A", &groupA); - ERRCHECK(result); - - result = system->createChannelGroup("Group B", &groupB); - ERRCHECK(result); - - result = system->getMasterChannelGroup(&masterGroup); - ERRCHECK(result); - - printf("=======================================================================\n"); - printf("ChannelGroups Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("=======================================================================\n"); - printf("\n"); - printf("Group A : drumloop.wav, jaguar.wav, swish.wav\n"); - printf("Group B : c.ogg, d.ogg, e.ogg\n"); - printf("\n"); - printf("Press 'A' to mute/unmute group A\n"); - printf("Press 'B' to mute/unmute group B\n"); - printf("Press 'C' to mute/unmute group A and B (master group)\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Instead of being independent, set the group A and B to be children of the master group. - */ - result = masterGroup->addGroup(groupA); - ERRCHECK(result); - - result = masterGroup->addGroup(groupB); - ERRCHECK(result); - - /* - Start all the sounds! - */ - for (count = 0; count < 6; count++) - { - result = system->playSound(FMOD_CHANNEL_FREE, sound[count], true, &channel[count]); - ERRCHECK(result); - if (count < 3) - { - result = channel[count]->setChannelGroup(groupA); - } - else - { - result = channel[count]->setChannelGroup(groupB); - } - ERRCHECK(result); - result = channel[count]->setPaused(false); - ERRCHECK(result); - } - - /* - Change the volume of each group, just because we can! (And makes it less noise). - */ - result = groupA->setVolume(0.5f); - ERRCHECK(result); - result = groupB->setVolume(0.5f); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'a' : - case 'A' : - { - static bool mute = true; - - groupA->setMute(mute); - - mute = !mute; - break; - } - case 'b' : - case 'B' : - { - static bool mute = true; - - groupB->setMute(mute); - - mute = !mute; - break; - } - case 'c' : - case 'C' : - { - static bool mute = true; - - masterGroup->setMute(mute); - - mute = !mute; - break; - } - } - } - - system->update(); - - { - int channelsplaying = 0; - - system->getChannelsPlaying(&channelsplaying); - - printf("Channels Playing %2d\r", channelsplaying); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - A little fade out. (over 2 seconds) - */ - printf("Goodbye!\n"); - { - float pitch = 1.0f; - float vol = 1.0f; - - for (count = 0; count < 200; count++) - { - masterGroup->setPitch(pitch); - masterGroup->setVolume(vol); - - vol -= (1.0f / 200.0f); - pitch -= (0.5f / 200.0f); - - Sleep(10); - } - } - - /* - Shut down - */ - for (count = 0; count < 6; count++) - { - result = sound[count]->release(); - ERRCHECK(result); - } - - result = groupA->release(); - ERRCHECK(result); - result = groupB->release(); - ERRCHECK(result); - - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/common/wincompat.h b/CocosDenshion/third_party/fmod/examples/common/wincompat.h deleted file mode 100644 index 0a4a281a2b..0000000000 --- a/CocosDenshion/third_party/fmod/examples/common/wincompat.h +++ /dev/null @@ -1,84 +0,0 @@ -#if !defined(WINCOMPAT_INCLUDED) && !defined(PLATFORM_WINDOWS) && !defined(WIN32) && !defined(WINDOWS) && !defined(__WIN32__) -#define WINCOMPAT_INCLUDED - -/** - * - * Author: Magnus Naeslund (mag@fbab.net, mag@bahnhof.se) - * (c) 2000 Magnus Naeslund, all rights reserved - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#ifndef TRUE - #define TRUE 1 -#endif -#ifndef FALSE - #define FALSE 0 -#endif - -#define _kbhit kbhit -#define _getch getch -#define stricmp strcasecmp -#define strnicmp strncasecmp - -#define Sleep(x) usleep((x)*1000) - -static int inited=0; -static struct termios ori; - -static void tcatexit(){ - tcsetattr(0,TCSANOW,&ori); -} - -static void init_terminal(){ - struct termios t; - tcgetattr(0,&t); - tcgetattr(0,&ori); - t.c_lflag &= ~(ICANON); - t.c_lflag &= ~(ECHO); - tcsetattr(0,TCSANOW,&t); - atexit(tcatexit); -} - -static inline int kbhit(){ - fd_set rfds; - struct timeval tv; - - if (!inited){ - inited=1; - init_terminal(); - } - - FD_ZERO(&rfds); - FD_SET(0, &rfds); - tv.tv_sec = 0; - tv.tv_usec = 10*1000; - return select(1, &rfds, NULL, NULL, &tv)>0; -} - -static inline int getch(){ - fd_set rfds; - - if (!inited){ - inited=1; - init_terminal(); - } - - FD_ZERO(&rfds); - FD_SET(0, &rfds); - if (select(1, &rfds, NULL, NULL, NULL)>0) - return getchar(); - else{ - printf("wincompat.h: select() on fd 0 failed\n"); - return 0xDeadBeef; - } -} - -#endif diff --git a/CocosDenshion/third_party/fmod/examples/dsp_custom/Makefile b/CocosDenshion/third_party/fmod/examples/dsp_custom/Makefile deleted file mode 100644 index 19c045dffb..0000000000 --- a/CocosDenshion/third_party/fmod/examples/dsp_custom/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -dsp_custom_cpp: main.cpp - g++ -O3 -o dsp_custom main.cpp ../../api/lib/libfmodex.so -pthread - -dsp_custom_c: main.c - g++ -O3 -o dsp_custom main.c ../../api/lib/libfmodex.so -pthread - -run: - ./dsp_custom - -clean: - rm -f dsp_custom diff --git a/CocosDenshion/third_party/fmod/examples/dsp_custom/main.c b/CocosDenshion/third_party/fmod/examples/dsp_custom/main.c deleted file mode 100644 index b46bebfd18..0000000000 --- a/CocosDenshion/third_party/fmod/examples/dsp_custom/main.c +++ /dev/null @@ -1,185 +0,0 @@ -/*=============================================================================================== - Custom DSP Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to add a user created DSP callback to process audio data. - A read callback is generated at runtime, and can be added anywhere in the DSP network. - -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -FMOD_RESULT F_CALLBACK myDSPCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels) -{ - unsigned int count, userdata; - int count2; - char name[256]; - FMOD_DSP *thisdsp = dsp_state->instance; - - /* - This redundant call just shows using the instance parameter of FMOD_DSP_STATE and using it to - call a DSP information function. - */ - FMOD_DSP_GetInfo(thisdsp, name, 0, 0, 0, 0); - - FMOD_DSP_GetUserData(thisdsp, (void **)&userdata); - - /* - This loop assumes inchannels = outchannels, which it will be if the DSP is created with '0' - as the number of channels in FMOD_DSP_DESCRIPTION. - Specifying an actual channel count will mean you have to take care of any number of channels coming in, - but outputting the number of channels specified. Generally it is best to keep the channel - count at 0 for maximum compatibility. - */ - for (count = 0; count < length; count++) - { - /* - Feel free to unroll this. - */ - for (count2 = 0; count2 < outchannels; count2++) - { - /* - This DSP filter just halves the volume! - Input is modified, and sent to output. - */ - outbuffer[(count * outchannels) + count2] = inbuffer[(count * inchannels) + count2] * 0.2f; - } - } - - return FMOD_OK; -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound; - FMOD_CHANNEL *channel; - FMOD_DSP *mydsp; - FMOD_RESULT result; - int key; - unsigned int version; - float pan = 0; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/drumloop.wav", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound); - ERRCHECK(result); - - printf("===============================================================================\n"); - printf("Custom DSP example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===============================================================================\n"); - printf("Press 'f' to activate, deactivate user filter\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, FALSE, &channel); - ERRCHECK(result); - - /* - Create the DSP effects. - */ - { - FMOD_DSP_DESCRIPTION dspdesc; - - memset(&dspdesc, 0, sizeof(FMOD_DSP_DESCRIPTION)); - - strcpy(dspdesc.name, "My first DSP unit"); - dspdesc.channels = 0; // 0 = whatever comes in, else specify. - dspdesc.read = myDSPCallback; - dspdesc.userdata = (void *)0x12345678; - - result = FMOD_System_CreateDSP(system, &dspdesc, &mydsp); - ERRCHECK(result); - } - - /* - Inactive by default. - */ - FMOD_DSP_SetBypass(mydsp, TRUE); - - /* - Main loop. - */ - result = FMOD_System_AddDSP(system, mydsp, 0); - - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'f' : - case 'F' : - { - static int active = FALSE; - - FMOD_DSP_SetBypass(mydsp, active); - - active = !active; - break; - } - } - } - - FMOD_System_Update(system); - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - - result = FMOD_DSP_Release(mydsp); - ERRCHECK(result); - - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/dsp_custom/main.cpp b/CocosDenshion/third_party/fmod/examples/dsp_custom/main.cpp deleted file mode 100644 index 33e5d3cc0c..0000000000 --- a/CocosDenshion/third_party/fmod/examples/dsp_custom/main.cpp +++ /dev/null @@ -1,185 +0,0 @@ -/*=============================================================================================== - Custom DSP Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to add a user created DSP callback to process audio data. - A read callback is generated at runtime, and can be added anywhere in the DSP network. - -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -FMOD_RESULT F_CALLBACK myDSPCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels) -{ - unsigned int count, userdata; - int count2; - char name[256]; - FMOD::DSP *thisdsp = (FMOD::DSP *)dsp_state->instance; - - /* - This redundant call just shows using the instance parameter of FMOD_DSP_STATE and using it to - call a DSP information function. - */ - thisdsp->getInfo(name, 0, 0, 0, 0); - - thisdsp->getUserData((void **)&userdata); - - /* - This loop assumes inchannels = outchannels, which it will be if the DSP is created with '0' - as the number of channels in FMOD_DSP_DESCRIPTION. - Specifying an actual channel count will mean you have to take care of any number of channels coming in, - but outputting the number of channels specified. Generally it is best to keep the channel - count at 0 for maximum compatibility. - */ - for (count = 0; count < length; count++) - { - /* - Feel free to unroll this. - */ - for (count2 = 0; count2 < outchannels; count2++) - { - /* - This DSP filter just halves the volume! - Input is modified, and sent to output. - */ - outbuffer[(count * outchannels) + count2] = inbuffer[(count * inchannels) + count2] * 0.2f; - } - } - - return FMOD_OK; -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound; - FMOD::Channel *channel; - FMOD::DSP *mydsp; - FMOD_RESULT result; - int key; - unsigned int version; - float pan = 0; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->createSound("../media/drumloop.wav", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound); - ERRCHECK(result); - - printf("===================================================================\n"); - printf("Custom DSP example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===================================================================\n"); - printf("Press 'f' to activate, deactivate user filter\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - - /* - Create the DSP effects. - */ - { - FMOD_DSP_DESCRIPTION dspdesc; - - memset(&dspdesc, 0, sizeof(FMOD_DSP_DESCRIPTION)); - - strcpy(dspdesc.name, "My first DSP unit"); - dspdesc.channels = 0; // 0 = whatever comes in, else specify. - dspdesc.read = myDSPCallback; - dspdesc.userdata = (void *)0x12345678; - - result = system->createDSP(&dspdesc, &mydsp); - ERRCHECK(result); - } - - /* - Inactive by default. - */ - mydsp->setBypass(true); - - /* - Main loop. - */ - result = system->addDSP(mydsp, 0); - - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'f' : - case 'F' : - { - static bool active = false; - - mydsp->setBypass(active); - - active = !active; - break; - } - } - } - - system->update(); - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - - result = mydsp->release(); - ERRCHECK(result); - - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/Makefile b/CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/Makefile deleted file mode 100644 index e1a470b843..0000000000 --- a/CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -dsp_effectperspeaker_cpp: main.cpp - g++ -O3 -o dsp_effectperspeaker main.cpp ../../api/lib/libfmodex.so -pthread - -dsp_effectperspeaker_c: main.c - g++ -O3 -o dsp_effectperspeaker main.c ../../api/lib/libfmodex.so -pthread - -run: - ./dsp_effectperspeaker - -clean: - rm -f dsp_effectperspeaker diff --git a/CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/main.c b/CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/main.c deleted file mode 100644 index 80f993388e..0000000000 --- a/CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/main.c +++ /dev/null @@ -1,268 +0,0 @@ -/*=============================================================================================== - DSP Effect per speaker Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to manipulate a DSP network and as an example, creates 2 dsp effects, - and splits a single sound into 2 audio paths, which it then filters seperately. - To only have each audio path come out of one speaker each, FMOD_DSPConnection_setLevels is used just - before the 2 branches merge back together again. - - For more speakers: - 1. Use FMOD_System_SetSpeakerMode or FMOD_System_SetOutputFormat. - 2. Create more effects, currently 2 for stereo (reverb and chorus), create one per speaker. - 3. Under the 'Now connect the 2 effects to channeldsp head.' section, connect the extra effects - by duplicating the code more times. - 4. Filter each effect to each speaker by calling FMOD_DSP_SetInputLevels. Expand the existing code - by extending the level arrays from 2 to the number of speakers you require, and change the - numlevels parameter in FMOD_DSP_SetInputLevels from 2 to the correct number accordingly. - -===============================================================================================*/ -#include "../common/wincompat.h" -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound; - FMOD_CHANNEL *channel; - FMOD_DSP *dsplowpass, *dspchorus, *dsphead, *dspchannelmixer; - FMOD_DSPCONNECTION *dsplowpassconnection, *dspchorusconnection; - FMOD_RESULT result; - int key; - unsigned int version; - float pan = 0; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/drumloop.wav", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound); - ERRCHECK(result); - - printf("===============================================================================\n"); - printf("DSP Effect per speaker example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===============================================================================\n"); - printf("Press 'L' to toggle reverb on/off on left speaker only\n"); - printf("Press 'R' to toggle chorus on/off on right speaker only\n"); - printf("Press '[' to pan sound left\n"); - printf("Press ']' to pan sound right\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, FALSE, &channel); - ERRCHECK(result); - - /* - Create the DSP effects. - */ - result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_REVERB, &dsplowpass); - ERRCHECK(result); - - result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_CHORUS, &dspchorus); - ERRCHECK(result); - - /* - Connect up the DSP network - */ - - /* - When a sound is played, a subnetwork is set up in the DSP network which looks like this. - Wavetable is the drumloop sound, and it feeds its data from right to left. - - [DSPHEAD]<------------[DSPCHANNELMIXER] - */ - result = FMOD_System_GetDSPHead(system, &dsphead); - ERRCHECK(result); - - result = FMOD_DSP_GetInput(dsphead, 0, &dspchannelmixer, 0); - ERRCHECK(result); - - /* - Now disconnect channeldsp head from wavetable to look like this. - - [DSPHEAD] [DSPCHANNELMIXER] - */ - result = FMOD_DSP_DisconnectFrom(dsphead, dspchannelmixer); - ERRCHECK(result); - - /* - Now connect the 2 effects to channeldsp head. - Store the 2 connections this makes so we can set their speakerlevels later. - - [DSPLOWPASS] - /x - [DSPHEAD] [DSPCHANNELMIXER] - \y - [DSPCHORUS] - */ - result = FMOD_DSP_AddInput(dsphead, dsplowpass, &dsplowpassconnection); /* x = dsplowpassconnection */ - ERRCHECK(result); - result = FMOD_DSP_AddInput(dsphead, dspchorus, &dspchorusconnection); /* y = dspchorusconnection */ - ERRCHECK(result); - - /* - Now connect the wavetable to the 2 effects - - [DSPLOWPASS] - /x \ - [DSPHEAD] [DSPCHANNELMIXER] - \y / - [DSPCHORUS] - */ - result = FMOD_DSP_AddInput(dsplowpass, dspchannelmixer, NULL); /* Null for connection - we dont care about it. */ - ERRCHECK(result); - result = FMOD_DSP_AddInput(dspchorus, dspchannelmixer, NULL); /* Null for connection - we dont care about it. */ - ERRCHECK(result); - - /* - Now the drumloop will be twice as loud, because it is being split into 2, then recombined at the end. - What we really want is to only feed the dspchannelmixer->dsplowpass through the left speaker, and - dspchannelmixer->dspchorus to the right speaker. - We can do that simply by setting the pan, or speaker levels of the connections. - - [DSPLOWPASS] - /x=1,0 \ - [DSPHEAD] [DSPCHANNELMIXER] - \y=0,1 / - [DSPCHORUS] - */ - { - float leftinputon[2] = { 1.0f, 0.0f }; - float rightinputon[2] = { 0.0f, 1.0f }; - float inputsoff[2] = { 0.0f, 0.0f }; - - result = FMOD_DSPConnection_SetLevels(dsplowpassconnection, FMOD_SPEAKER_FRONT_LEFT, leftinputon, 2); - ERRCHECK(result); - result = FMOD_DSPConnection_SetLevels(dsplowpassconnection, FMOD_SPEAKER_FRONT_RIGHT, inputsoff, 2); - ERRCHECK(result); - - result = FMOD_DSPConnection_SetLevels(dspchorusconnection, FMOD_SPEAKER_FRONT_LEFT, inputsoff, 2); - ERRCHECK(result); - result = FMOD_DSPConnection_SetLevels(dspchorusconnection, FMOD_SPEAKER_FRONT_RIGHT, rightinputon, 2); - ERRCHECK(result); - } - - result = FMOD_DSP_SetBypass(dsplowpass, TRUE); - result = FMOD_DSP_SetBypass(dspchorus, TRUE); - - result = FMOD_DSP_SetActive(dsplowpass, TRUE); - result = FMOD_DSP_SetActive(dspchorus, TRUE); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'l' : - case 'L' : - { - static int reverb = FALSE; - - FMOD_DSP_SetBypass(dsplowpass, reverb); - - reverb = !reverb; - break; - } - case 'r' : - case 'R' : - { - static int chorus = FALSE; - - FMOD_DSP_SetBypass(dspchorus, chorus); - - chorus = !chorus; - break; - } - case '[' : - { - FMOD_Channel_GetPan(channel, &pan); - pan -= 0.1f; - if (pan < -1) - { - pan = -1; - } - FMOD_Channel_SetPan(channel, pan); - break; - } - case ']' : - { - FMOD_Channel_GetPan(channel, &pan); - pan += 0.1f; - if (pan > 1) - { - pan = 1; - } - FMOD_Channel_SetPan(channel, pan); - break; - } - } - } - - FMOD_System_Update(system); - - { - int channelsplaying = 0; - - FMOD_System_GetChannelsPlaying(system, &channelsplaying); - - printf("Channels Playing %2d : Pan = %.02f\r", channelsplaying, pan); - } - - fflush(stdout); - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - - result = FMOD_DSP_Release(dsplowpass); - ERRCHECK(result); - result = FMOD_DSP_Release(dspchorus); - ERRCHECK(result); - - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/main.cpp b/CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/main.cpp deleted file mode 100644 index bbde2d97c7..0000000000 --- a/CocosDenshion/third_party/fmod/examples/dsp_effectperspeaker/main.cpp +++ /dev/null @@ -1,268 +0,0 @@ -/*=============================================================================================== - DSP Effect per speaker Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to manipulate a DSP network and as an example, creates 2 dsp effects, - and splits a single sound into 2 audio paths, which it then filters seperately. - To only have each audio path come out of one speaker each, DSPConnection::setLevels is used just - before the 2 branches merge back together again. - - For more speakers: - 1. Use System::setSpeakerMode or System::setOutputFormat. - 2. Create more effects, currently 2 for stereo (lowpass and chorus), create one per speaker. - 3. Under the 'Now connect the 2 effects to channeldsp head.' section, connect the extra effects - by duplicating the code more times. - 4. Filter each effect to each speaker by calling DSP::setInputLevels. Expand the existing code - by extending the level arrays from 2 to the number of speakers you require, and change the - numlevels parameter in DSP::setInputLevels from 2 to the correct number accordingly. - -===============================================================================================*/ -#include "../common/wincompat.h" -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound; - FMOD::Channel *channel; - FMOD::DSP *dsplowpass, *dspchorus, *dsphead, *dspchannelmixer; - FMOD::DSPConnection *dsplowpassconnection, *dspchorusconnection; - FMOD_RESULT result; - int key; - unsigned int version; - float pan = 0; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->createSound("../media/drumloop.wav", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound); - ERRCHECK(result); - - printf("===============================================================================\n"); - printf("DSP effect per speaker example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===============================================================================\n"); - printf("Press 'L' to toggle lowpass on/off on left speaker only\n"); - printf("Press 'R' to toggle chorus on/off on right speaker only\n"); - printf("Press '[' to pan sound left\n"); - printf("Press ']' to pan sound right\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - - /* - Create the DSP effects. - */ - result = system->createDSPByType(FMOD_DSP_TYPE_LOWPASS, &dsplowpass); - ERRCHECK(result); - - result = system->createDSPByType(FMOD_DSP_TYPE_CHORUS, &dspchorus); - ERRCHECK(result); - - /* - Connect up the DSP network - */ - - /* - When a sound is played, a subnetwork is set up in the DSP network which looks like this. - Wavetable is the drumloop sound, and it feeds its data from right to left. - - [DSPHEAD]<------------[DSPCHANNELMIXER] - */ - result = system->getDSPHead(&dsphead); - ERRCHECK(result); - - result = dsphead->getInput(0, &dspchannelmixer, 0); - ERRCHECK(result); - - /* - Now disconnect channeldsp head from wavetable to look like this. - - [DSPHEAD] [DSPCHANNELMIXER] - */ - result = dsphead->disconnectFrom(dspchannelmixer); - ERRCHECK(result); - - /* - Now connect the 2 effects to channeldsp head. - Store the 2 connections this makes so we can set their speakerlevels later. - - [DSPLOWPASS] - /x - [DSPHEAD] [DSPCHANNELMIXER] - \y - [DSPCHORUS] - */ - result = dsphead->addInput(dsplowpass, &dsplowpassconnection); /* x = dsplowpassconnection */ - ERRCHECK(result); - result = dsphead->addInput(dspchorus, &dspchorusconnection); /* y = dspchorusconnection */ - ERRCHECK(result); - - /* - Now connect the wavetable to the 2 effects - - [DSPLOWPASS] - /x \ - [DSPHEAD] [DSPCHANNELMIXER] - \y / - [DSPCHORUS] - */ - result = dsplowpass->addInput(dspchannelmixer, 0); /* Null for connection - we dont care about it. */ - ERRCHECK(result); - result = dspchorus->addInput(dspchannelmixer, 0); /* Null for connection - we dont care about it. */ - ERRCHECK(result); - - /* - Now the drumloop will be twice as loud, because it is being split into 2, then recombined at the end. - What we really want is to only feed the dspchannelmixer->dsplowpass through the left speaker, and - dspchannelmixer->dspchorus to the right speaker. - We can do that simply by setting the pan, or speaker levels of the connections. - - [DSPLOWPASS] - /x=1,0 \ - [DSPHEAD] [DSPCHANNELMIXER] - \y=0,1 / - [DSPCHORUS] - */ - { - float leftinputon[2] = { 1.0f, 0.0f }; - float rightinputon[2] = { 0.0f, 1.0f }; - float inputsoff[2] = { 0.0f, 0.0f }; - - result = dsplowpassconnection->setLevels(FMOD_SPEAKER_FRONT_LEFT, leftinputon, 2); - ERRCHECK(result); - result = dsplowpassconnection->setLevels(FMOD_SPEAKER_FRONT_RIGHT, inputsoff, 2); - ERRCHECK(result); - - result = dspchorusconnection->setLevels(FMOD_SPEAKER_FRONT_LEFT, inputsoff, 2); - ERRCHECK(result); - result = dspchorusconnection->setLevels(FMOD_SPEAKER_FRONT_RIGHT, rightinputon, 2); - ERRCHECK(result); - } - - result = dsplowpass->setBypass(true); - result = dspchorus->setBypass(true); - - result = dsplowpass->setActive(true); - result = dspchorus->setActive(true); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'l' : - case 'L' : - { - static bool lowpass = false; - - dsplowpass->setBypass(lowpass); - - lowpass = !lowpass; - break; - } - case 'r' : - case 'R' : - { - static bool chorus = false; - - dspchorus->setBypass(chorus); - - chorus = !chorus; - break; - } - case '[' : - { - channel->getPan(&pan); - pan -= 0.1f; - if (pan < -1) - { - pan = -1; - } - channel->setPan(pan); - break; - } - case ']' : - { - channel->getPan(&pan); - pan += 0.1f; - if (pan > 1) - { - pan = 1; - } - channel->setPan(pan); - break; - } - } - } - - system->update(); - - { - int channelsplaying = 0; - - system->getChannelsPlaying(&channelsplaying); - - printf("Channels Playing %2d : Pan = %.02f\r", channelsplaying, pan); - } - - fflush(stdout); - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - - result = dsplowpass->release(); - ERRCHECK(result); - result = dspchorus->release(); - ERRCHECK(result); - - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/effects/Makefile b/CocosDenshion/third_party/fmod/examples/effects/Makefile deleted file mode 100644 index 714215c0bb..0000000000 --- a/CocosDenshion/third_party/fmod/examples/effects/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -effects_cpp: main.cpp - g++ -O3 -o effects main.cpp ../../api/lib/libfmodex.so -pthread - -effects_c: main.c - g++ -O3 -o effects main.c ../../api/lib/libfmodex.so -pthread - -run: - ./effects - -clean: - rm -f effects diff --git a/CocosDenshion/third_party/fmod/examples/effects/effects b/CocosDenshion/third_party/fmod/examples/effects/effects deleted file mode 100755 index d414f54deb9bf06bf8768a58c2ccc966def3487c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25149 zcmeHve|%ikb?1{kz!;1zr~?>O@(6M)K9$FkZH#eDkt~gof-FxY*_c2wJk7k(j6J_H zKP-v$QafW)T;aq`QbMrMGIN^w{zxEr%^SZC`* z`~9AK@0&Mcn=I{r`|*S8`_8@Ro^$TG=bn4+eWUwZ;l6bZ4GorgW?8c>LiXN3a0T-H zA5t|dEZdr6wOH@9nygDv#JUwbfP-YC0n;TY3n0x#8Uj4DGZ19@HNZ@)L$M@emW8%V zXYRBtCbqX4RsCeYWler35MrI)~zEi0;7ol!35}#|4 zL|@2*EWp#GGNGYgB{O_32XvXQ!p3_u()*FFLAn~rJlEr84$@UfHzWNz(tD6@L}EY8 z^FH(PE_3#m5Bp@EE6odX>V(ftNOR>){WH(^{$9M(uBf-`bUF2Z1=2zd-+-JtrQAjj zk6^S8{3t(%Wu#9To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 zXMdJ;PaQt5xcL)3A2}Wm0p|UB{H{rTRRH_%&9!0${H+~+1|H(=o?Sy52BLkvgG0Ej zG#c%$fj-#ftBU8MBkA0*la5L}9(BrNmilo8f60AY+p>0x7130DjL>pRh4k@qCNpmM zg!{XN&ANfk_2H<2$i}=^xk&IYTzKnfD3;ITUe>-$BgsQNo80K|o4;zrS%u83v2x)byqt3Zy~O|F4rJ>GUJ}x>b=Rzy6RQ>ufGO5>N6a5QSUnl zUA^zw2x+b${?}fMtY);CU2>H#?M(LK>JEllaaM%~2D*B}U3a&)>t9h1ZtNR^iTdvM zt-D&dN&p6>?cv;;plfZ+cj30&NL;1Srv4^E{Zi4p>Y7&ytE-CrnBFzU{z4-Ht?v9c zL9^ypUcFttu-n{leD2lF9UZ=Fj_H(YaddDSP with - channel->addDSP. - Note in this example you don't have to add and remove units each time, you could simply add them - all at the start then use DSP::setActive to toggle them on and off. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_dsp.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system = 0; - FMOD::Sound *sound = 0; - FMOD::Channel *channel = 0; - FMOD::DSP *dsplowpass = 0; - FMOD::DSP *dsphighpass = 0; - FMOD::DSP *dspecho = 0; - FMOD::DSP *dspflange = 0; - FMOD::DSP *dspdistortion = 0; - FMOD::DSP *dspchorus = 0; - FMOD::DSP *dspparameq = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->createSound("../media/drumloop.wav", FMOD_SOFTWARE, 0, &sound); - ERRCHECK(result); - - printf("=================================================================\n"); - printf("Effects Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("=================================================================\n"); - printf("\n"); - printf("Press SPACE to paused/unpause sound.\n"); - printf("Press 1 to toggle dsplowpass effect.\n"); - printf("Press 2 to toggle dsphighpass effect.\n"); - printf("Press 3 to toggle dspecho effect.\n"); - printf("Press 4 to toggle dspflange effect.\n"); - printf("Press 5 to toggle dspdistortion effect.\n"); - printf("Press 6 to toggle dspchorus effect.\n"); - printf("Press 7 to toggle dspparameq effect.\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - - /* - Create some effects to play with. - */ - result = system->createDSPByType(FMOD_DSP_TYPE_LOWPASS, &dsplowpass); - ERRCHECK(result); - result = system->createDSPByType(FMOD_DSP_TYPE_HIGHPASS, &dsphighpass); - ERRCHECK(result); - result = system->createDSPByType(FMOD_DSP_TYPE_ECHO, &dspecho); - ERRCHECK(result); - result = system->createDSPByType(FMOD_DSP_TYPE_FLANGE, &dspflange); - ERRCHECK(result); - result = system->createDSPByType(FMOD_DSP_TYPE_DISTORTION, &dspdistortion); - ERRCHECK(result); - result = system->createDSPByType(FMOD_DSP_TYPE_CHORUS, &dspchorus); - ERRCHECK(result); - result = system->createDSPByType(FMOD_DSP_TYPE_PARAMEQ, &dspparameq); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - bool paused; - - channel->getPaused(&paused); - ERRCHECK(result); - - paused = !paused; - - result = channel->setPaused(paused); - ERRCHECK(result); - break; - } - case '1' : - { - bool active; - - result = dsplowpass->getActive(&active); - ERRCHECK(result); - - if (active) - { - result = dsplowpass->remove(); - ERRCHECK(result); - } - else - { - result = system->addDSP(dsplowpass, 0); - ERRCHECK(result); - } - break; - } - case '2' : - { - bool active; - - result = dsphighpass->getActive(&active); - ERRCHECK(result); - - if (active) - { - result = dsphighpass->remove(); - ERRCHECK(result); - } - else - { - result = system->addDSP(dsphighpass, 0); - ERRCHECK(result); - } - break; - } - case '3' : - { - bool active; - - result = dspecho->getActive(&active); - ERRCHECK(result); - - if (active) - { - result = dspecho->remove(); - ERRCHECK(result); - } - else - { - result = system->addDSP(dspecho, 0); - ERRCHECK(result); - - result = dspecho->setParameter(FMOD_DSP_ECHO_DELAY, 50.0f); - ERRCHECK(result); - } - break; - } - case '4' : - { - bool active; - - result = dspflange->getActive(&active); - ERRCHECK(result); - - if (active) - { - result = dspflange->remove(); - ERRCHECK(result); - } - else - { - result = system->addDSP(dspflange, 0); - ERRCHECK(result); - } - break; - } - case '5' : - { - bool active; - - result = dspdistortion->getActive(&active); - ERRCHECK(result); - - if (active) - { - result = dspdistortion->remove(); - ERRCHECK(result); - } - else - { - result = system->addDSP(dspdistortion, 0); - ERRCHECK(result); - - result = dspdistortion->setParameter(FMOD_DSP_DISTORTION_LEVEL, 0.8f); - ERRCHECK(result); - } - break; - } - case '6' : - { - bool active; - - result = dspchorus->getActive(&active); - ERRCHECK(result); - - if (active) - { - result = dspchorus->remove(); - ERRCHECK(result); - } - else - { - result = system->addDSP(dspchorus, 0); - ERRCHECK(result); - } - break; - } - case '7' : - { - bool active; - - result = dspparameq->getActive(&active); - ERRCHECK(result); - - if (active) - { - result = dspparameq->remove(); - ERRCHECK(result); - } - else - { - result = system->addDSP(dspparameq, 0); - ERRCHECK(result); - - result = dspparameq->setParameter(FMOD_DSP_PARAMEQ_CENTER, 5000.0f); - ERRCHECK(result); - result = dspparameq->setParameter(FMOD_DSP_PARAMEQ_GAIN, 0.0f); - ERRCHECK(result); - } - break; - } - } - } - - system->update(); - - { - bool paused = 0; - bool dsplowpass_active; - bool dsphighpass_active; - bool dspecho_active; - bool dspflange_active; - bool dspdistortion_active; - bool dspchorus_active; - bool dspparameq_active; - - dsplowpass ->getActive(&dsplowpass_active); - dsphighpass ->getActive(&dsphighpass_active); - dspecho ->getActive(&dspecho_active); - dspflange ->getActive(&dspflange_active); - dspdistortion->getActive(&dspdistortion_active); - dspchorus ->getActive(&dspchorus_active); - dspparameq ->getActive(&dspparameq_active); - - if (channel) - { - result = channel->getPaused(&paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - - printf("%s : lowpass[%c] highpass[%c] echo[%c] flange[%c] dist[%c] chorus[%c] parameq[%c]\r", - paused ? "Paused " : "Playing", - dsplowpass_active ? 'x' : ' ', - dsphighpass_active ? 'x' : ' ', - dspecho_active ? 'x' : ' ', - dspflange_active ? 'x' : ' ', - dspdistortion_active ? 'x' : ' ', - dspchorus_active ? 'x' : ' ', - dspparameq_active ? 'x' : ' '); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/filecallbacks/Makefile b/CocosDenshion/third_party/fmod/examples/filecallbacks/Makefile deleted file mode 100644 index 741a5e3c6b..0000000000 --- a/CocosDenshion/third_party/fmod/examples/filecallbacks/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -filecallbacks_cpp: main.cpp - g++ -O3 -o filecallbacks main.cpp ../../api/lib/libfmodex.so -pthread - -filecallbacks_c: main.c - g++ -O3 -o filecallbacks main.c ../../api/lib/libfmodex.so -pthread - -run: - ./filecallbacks - -clean: - rm -f filecallbacks diff --git a/CocosDenshion/third_party/fmod/examples/filecallbacks/main.c b/CocosDenshion/third_party/fmod/examples/filecallbacks/main.c deleted file mode 100644 index fe106fb941..0000000000 --- a/CocosDenshion/third_party/fmod/examples/filecallbacks/main.c +++ /dev/null @@ -1,230 +0,0 @@ -/*=============================================================================================== - File Callbacks Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example is a modified version of the playstream example. - It shows the correct way declare and handle fmod file callbacks with System::setFileSystem. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -/* - TIPS: - - 1. use F_CALLBACK. Do NOT force cast your own function to fmod's callback type. - 2. return FMOD_ERR_FILE_NOTFOUND in open as required. - 3. return number of bytes read in read callback. Do not get the size and count - around the wrong way in fread for example, this would return 1 instead of the number of bytes read. - - QUESTIONS: - - 1. Why does fmod seek to the end and read? Because it is looking for ID3V1 tags. - Use FMOD_IGNORETAGS in FMOD_System_CreateSound / FMOD_System_CreateStream if you don't like this behaviour. -*/ - -FMOD_RESULT F_CALLBACK myopen(const char *name, int unicode, unsigned int *filesize, void **handle, void **userdata) -{ - if (name) - { - FILE *fp; - - fp = fopen(name, "rb"); - if (!fp) - { - return FMOD_ERR_FILE_NOTFOUND; - } - - fseek(fp, 0, SEEK_END); - *filesize = ftell(fp); - fseek(fp, 0, SEEK_SET); - - *userdata = (void *)0x12345678; - *handle = fp; - } - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK myclose(void *handle, void *userdata) -{ - if (!handle) - { - return FMOD_ERR_INVALID_PARAM; - } - - fclose((FILE *)handle); - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK myread(void *handle, void *buffer, unsigned int sizebytes, unsigned int *bytesread, void *userdata) -{ - if (!handle) - { - return FMOD_ERR_INVALID_PARAM; - } - - if (bytesread) - { - *bytesread = (int)fread(buffer, 1, sizebytes, (FILE *)handle); - - if (*bytesread < sizebytes) - { - return FMOD_ERR_FILE_EOF; - } - } - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK myseek(void *handle, unsigned int pos, void *userdata) -{ - if (!handle) - { - return FMOD_ERR_INVALID_PARAM; - } - - fseek((FILE *)handle, pos, SEEK_SET); - - return FMOD_OK; -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 1, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - result = FMOD_System_SetFileSystem(system, myopen, myclose, myread, myseek, 0, 0, 2048); - ERRCHECK(result); - - result = FMOD_System_CreateStream(system, "../media/wave.mp3", FMOD_HARDWARE | FMOD_LOOP_NORMAL | FMOD_2D, 0, &sound); - ERRCHECK(result); - - printf("====================================================================\n"); - printf("PlayStream Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("====================================================================\n"); - printf("\n"); - printf("Press space to pause, Esc to quit\n"); - printf("\n"); - - /* - Play the sound. - */ - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, &channel); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - int paused; - FMOD_Channel_GetPaused(channel, &paused); - FMOD_Channel_SetPaused(channel, !paused); - break; - } - } - } - - FMOD_System_Update(system); - - if (channel) - { - unsigned int ms; - unsigned int lenms; - int playing; - int paused; - - FMOD_Channel_IsPlaying(channel, &playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPaused(channel, &paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Sound_GetLength(sound, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped"); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/filecallbacks/main.cpp b/CocosDenshion/third_party/fmod/examples/filecallbacks/main.cpp deleted file mode 100644 index a4730916d1..0000000000 --- a/CocosDenshion/third_party/fmod/examples/filecallbacks/main.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/*=============================================================================================== - File Callbacks Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example is a modified version of the playstream example. - It shows the correct way declare and handle fmod file callbacks with System::setFileSystem. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -/* - TIPS: - - 1. use F_CALLBACK. Do NOT force cast your own function to fmod's callback type. - 2. return FMOD_ERR_FILE_NOTFOUND in open as required. - 3. return number of bytes read in read callback. Do not get the size and count - around the wrong way in fread for example, this would return 1 instead of the number of bytes read. - - QUESTIONS: - - 1. Why does fmod seek to the end and read? Because it is looking for ID3V1 tags. - Use FMOD_IGNORETAGS in System::createSound / System::createStream if you don't like this behaviour. - -*/ - -FMOD_RESULT F_CALLBACK myopen(const char *name, int unicode, unsigned int *filesize, void **handle, void **userdata) -{ - if (name) - { - FILE *fp; - - fp = fopen(name, "rb"); - if (!fp) - { - return FMOD_ERR_FILE_NOTFOUND; - } - - fseek(fp, 0, SEEK_END); - *filesize = ftell(fp); - fseek(fp, 0, SEEK_SET); - - *userdata = (void *)0x12345678; - *handle = fp; - } - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK myclose(void *handle, void *userdata) -{ - if (!handle) - { - return FMOD_ERR_INVALID_PARAM; - } - - fclose((FILE *)handle); - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK myread(void *handle, void *buffer, unsigned int sizebytes, unsigned int *bytesread, void *userdata) -{ - if (!handle) - { - return FMOD_ERR_INVALID_PARAM; - } - - if (bytesread) - { - *bytesread = (int)fread(buffer, 1, sizebytes, (FILE *)handle); - - if (*bytesread < sizebytes) - { - return FMOD_ERR_FILE_EOF; - } - } - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK myseek(void *handle, unsigned int pos, void *userdata) -{ - if (!handle) - { - return FMOD_ERR_INVALID_PARAM; - } - - fseek((FILE *)handle, pos, SEEK_SET); - - return FMOD_OK; -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(1, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->setFileSystem(myopen, myclose, myread, myseek, 0, 0, 2048); - ERRCHECK(result); - - result = system->createStream("../media/wave.mp3", FMOD_HARDWARE | FMOD_LOOP_NORMAL | FMOD_2D, 0, &sound); - ERRCHECK(result); - - printf("========================================================================\n"); - printf("File Callbacks Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("========================================================================\n"); - printf("\n"); - printf("Press space to pause, Esc to quit\n"); - printf("\n"); - - /* - Play the sound. - */ - - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - bool paused; - channel->getPaused(&paused); - channel->setPaused(!paused); - break; - } - } - } - - system->update(); - - if (channel) - { - unsigned int ms; - unsigned int lenms; - bool playing; - bool paused; - - channel->isPlaying(&playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE)) - { - ERRCHECK(result); - } - - result = channel->getPaused(&paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE)) - { - ERRCHECK(result); - } - - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE)) - { - ERRCHECK(result); - } - - result = sound->getLength(&lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE)) - { - ERRCHECK(result); - } - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped"); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/generatetone/Makefile b/CocosDenshion/third_party/fmod/examples/generatetone/Makefile deleted file mode 100644 index bc7f3cc699..0000000000 --- a/CocosDenshion/third_party/fmod/examples/generatetone/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -generatetone_cpp: main.cpp - g++ -O3 -o generatetone main.cpp ../../api/lib/libfmodex.so - -generatetone_c: main.c - g++ -O3 -o generatetone main.c ../../api/lib/libfmodex.so - -run: - ./generatetone - -clean: - rm -f generatetone diff --git a/CocosDenshion/third_party/fmod/examples/generatetone/main.c b/CocosDenshion/third_party/fmod/examples/generatetone/main.c deleted file mode 100644 index 2c668b92cf..0000000000 --- a/CocosDenshion/third_party/fmod/examples/generatetone/main.c +++ /dev/null @@ -1,230 +0,0 @@ -/*=============================================================================================== - GenerateTone Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how simply play generated tones using FMOD_System_PlayDSP instead of - manually connecting and disconnecting DSP units. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_CHANNEL *channel = 0; - FMOD_DSP *dsp = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - /* - Create DSP units for each type of noise we want. - */ - result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_OSCILLATOR, &dsp); - ERRCHECK(result); - result = FMOD_DSP_SetParameter(dsp, FMOD_DSP_OSCILLATOR_RATE, 440.0f); - ERRCHECK(result); - - printf("======================================================================\n"); - printf("GenerateTone Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("======================================================================\n\n"); - printf("\n"); - printf("Press '1' to play a sine wave\n"); - printf("Press '2' to play a square wave\n"); - printf("Press '3' to play a triangle wave\n"); - printf("Press '4' to play a saw wave\n"); - printf("Press '5' to play a white noise\n"); - printf("Press 's' to stop channel\n"); - printf("\n"); - printf("Press 'v'/'V' to change channel volume\n"); - printf("Press 'f'/'F' to change channel frequency\n"); - printf("Press '['/']' to change channel pan\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case '1' : - { - result = FMOD_System_PlayDSP(system, FMOD_CHANNEL_REUSE, dsp, TRUE, &channel); - - FMOD_Channel_SetVolume(channel, 0.5f); - result = FMOD_DSP_SetParameter(dsp, FMOD_DSP_OSCILLATOR_TYPE, 0); - ERRCHECK(result); - FMOD_Channel_SetPaused(channel, FALSE); - break; - } - case '2' : - { - result = FMOD_System_PlayDSP(system, FMOD_CHANNEL_REUSE, dsp, TRUE, &channel); - FMOD_Channel_SetVolume(channel, 0.125f); - result = FMOD_DSP_SetParameter(dsp, FMOD_DSP_OSCILLATOR_TYPE, 1); - ERRCHECK(result); - FMOD_Channel_SetPaused(channel, FALSE); - break; - } - case '3' : - { - result = FMOD_System_PlayDSP(system, FMOD_CHANNEL_REUSE, dsp, TRUE, &channel); - FMOD_Channel_SetVolume(channel, 0.5f); - result = FMOD_DSP_SetParameter(dsp, FMOD_DSP_OSCILLATOR_TYPE, 2); - ERRCHECK(result); - FMOD_Channel_SetPaused(channel, FALSE); - break; - } - case '4' : - { - result = FMOD_System_PlayDSP(system, FMOD_CHANNEL_REUSE, dsp, TRUE, &channel); - FMOD_Channel_SetVolume(channel, 0.125f); - result = FMOD_DSP_SetParameter(dsp, FMOD_DSP_OSCILLATOR_TYPE, 4); - ERRCHECK(result); - FMOD_Channel_SetPaused(channel, FALSE); - break; - } - case '5' : - { - result = FMOD_System_PlayDSP(system, FMOD_CHANNEL_REUSE, dsp, TRUE, &channel); - FMOD_Channel_SetVolume(channel, 0.25f); - result = FMOD_DSP_SetParameter(dsp, FMOD_DSP_OSCILLATOR_TYPE, 5); - ERRCHECK(result); - FMOD_Channel_SetPaused(channel, FALSE); - break; - } - case 's' : - { - FMOD_Channel_Stop(channel); - break; - } - case 'v' : - { - float volume; - - FMOD_Channel_GetVolume(channel, &volume); - volume -= 0.1f; - FMOD_Channel_SetVolume(channel, volume); - break; - } - case 'V' : - { - float volume; - - FMOD_Channel_GetVolume(channel, &volume); - volume += 0.1f; - FMOD_Channel_SetVolume(channel, volume); - break; - } - case 'f' : - { - float frequency; - - FMOD_Channel_GetFrequency(channel, &frequency); - frequency -= 500.0f; - FMOD_Channel_SetFrequency(channel, frequency); - break; - } - case 'F' : - { - float frequency; - - FMOD_Channel_GetFrequency(channel, &frequency); - frequency += 500.0f; - FMOD_Channel_SetFrequency(channel, frequency); - break; - } - case '[' : - { - float pan; - - FMOD_Channel_GetPan(channel, &pan); - pan -= 0.1f; - FMOD_Channel_SetPan(channel, pan); - break; - } - case ']' : - { - float pan; - - FMOD_Channel_GetPan(channel, &pan); - pan += 0.1f; - FMOD_Channel_SetPan(channel, pan); - break; - } - } - } - - FMOD_System_Update(system); - - { - float frequency = 0, volume = 0, pan = 0; - int playing = FALSE; - - if (channel) - { - FMOD_Channel_GetFrequency(channel, &frequency); - FMOD_Channel_GetVolume(channel, &volume); - FMOD_Channel_GetPan(channel, &pan); - FMOD_Channel_IsPlaying(channel, &playing); - } - - printf("Channel %s : Frequency %.1f Volume %.1f Pan %.1f \r", playing ? "playing" : "stopped", frequency, volume, pan); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_DSP_Release(dsp); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/generatetone/main.cpp b/CocosDenshion/third_party/fmod/examples/generatetone/main.cpp deleted file mode 100644 index eba958d49f..0000000000 --- a/CocosDenshion/third_party/fmod/examples/generatetone/main.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/*=============================================================================================== - GenerateTone Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how simply play generated tones using FMOD::System::payDSP instead of - manually connecting and disconnecting DSP units. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Channel *channel = 0; - FMOD::DSP *dsp = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - /* - Create an oscillator DSP unit for the tone. - */ - result = system->createDSPByType(FMOD_DSP_TYPE_OSCILLATOR, &dsp); - ERRCHECK(result); - result = dsp->setParameter(FMOD_DSP_OSCILLATOR_RATE, 440.0f); - ERRCHECK(result); - - printf("======================================================================\n"); - printf("GenerateTone Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("======================================================================\n\n"); - printf("\n"); - printf("Press '1' to play a sine wave\n"); - printf("Press '2' to play a square wave\n"); - printf("Press '3' to play a triangle wave\n"); - printf("Press '4' to play a saw wave\n"); - printf("Press '5' to play a white noise\n"); - printf("Press 's' to stop channel\n"); - printf("\n"); - printf("Press 'v'/'V' to change channel volume\n"); - printf("Press 'f'/'F' to change channel frequency\n"); - printf("Press '['/']' to change channel pan\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case '1' : - { - result = system->playDSP(FMOD_CHANNEL_REUSE, dsp, true, &channel); - - channel->setVolume(0.5f); - result = dsp->setParameter(FMOD_DSP_OSCILLATOR_TYPE, 0); - ERRCHECK(result); - channel->setPaused(false); - break; - } - case '2' : - { - result = system->playDSP(FMOD_CHANNEL_REUSE, dsp, true, &channel); - - channel->setVolume(0.125f); - result = dsp->setParameter(FMOD_DSP_OSCILLATOR_TYPE, 1); - ERRCHECK(result); - channel->setPaused(false); - break; - } - case '3' : - { - result = system->playDSP(FMOD_CHANNEL_REUSE, dsp, true, &channel); - - channel->setVolume(0.5f); - result = dsp->setParameter(FMOD_DSP_OSCILLATOR_TYPE, 2); - ERRCHECK(result); - channel->setPaused(false); - break; - } - case '4' : - { - result = system->playDSP(FMOD_CHANNEL_REUSE, dsp, true, &channel); - - channel->setVolume(0.125f); - result = dsp->setParameter(FMOD_DSP_OSCILLATOR_TYPE, 4); - ERRCHECK(result); - channel->setPaused(false); - break; - } - case '5' : - { - result = system->playDSP(FMOD_CHANNEL_REUSE, dsp, true, &channel); - - channel->setVolume(0.25f); - result = dsp->setParameter(FMOD_DSP_OSCILLATOR_TYPE, 5); - ERRCHECK(result); - channel->setPaused(false); - break; - } - case 's' : - { - channel->stop(); - break; - } - case 'v' : - { - float volume; - - channel->getVolume(&volume); - volume -= 0.1f; - channel->setVolume(volume); - break; - } - case 'V' : - { - float volume; - - channel->getVolume(&volume); - volume += 0.1f; - channel->setVolume(volume); - break; - } - case 'f' : - { - float frequency; - - channel->getFrequency(&frequency); - frequency -= 500.0f; - channel->setFrequency(frequency); - break; - } - case 'F' : - { - float frequency; - - channel->getFrequency(&frequency); - frequency += 500.0f; - channel->setFrequency(frequency); - break; - } - case '[' : - { - float pan; - - channel->getPan(&pan); - pan -= 0.1f; - channel->setPan(pan); - break; - } - case ']' : - { - float pan; - - channel->getPan(&pan); - pan += 0.1f; - channel->setPan(pan); - break; - } - } - } - - system->update(); - - { - float frequency = 0, volume = 0, pan = 0; - bool playing = false; - - if (channel) - { - channel->getFrequency(&frequency); - channel->getVolume(&volume); - channel->getPan(&pan); - channel->isPlaying(&playing); - } - - printf("Channel %s : Frequency %.1f Volume %.1f Pan %.1f \r", playing ? "playing" : "stopped", frequency, volume, pan); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = dsp->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/loadfrommemory/Makefile b/CocosDenshion/third_party/fmod/examples/loadfrommemory/Makefile deleted file mode 100644 index ceec753a43..0000000000 --- a/CocosDenshion/third_party/fmod/examples/loadfrommemory/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -loadfrommemory_cpp: main.cpp - g++ -O3 -o loadfrommemory main.cpp ../../api/lib/libfmodex.so -pthread - -loadfrommemory_c: main.c - g++ -O3 -o loadfrommemory main.c ../../api/lib/libfmodex.so -pthread - -run: - ./loadfrommemory - -clean: - rm -f loadfrommemory diff --git a/CocosDenshion/third_party/fmod/examples/loadfrommemory/main.c b/CocosDenshion/third_party/fmod/examples/loadfrommemory/main.c deleted file mode 100644 index f6f3d7a577..0000000000 --- a/CocosDenshion/third_party/fmod/examples/loadfrommemory/main.c +++ /dev/null @@ -1,219 +0,0 @@ -/*=============================================================================================== - Load from memory example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example is simply a variant of the play sound example, but it loads the data into memory - then uses the 'load from memory' feature of System::createSound. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -void LoadFileIntoMemory(const char *name, void **buff, int *length) -{ - FILE *fp = fopen(name, "rb"); - - fseek(fp, 0, SEEK_END); - *length = ftell(fp); - fseek(fp, 0, SEEK_SET); - - *buff = malloc(*length); - fread(*buff, *length, 1, fp); - - fclose(fp); -} - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound1, *sound2, *sound3; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - void *buff = 0; - int length = 0; - FMOD_CREATESOUNDEXINFO exinfo; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - LoadFileIntoMemory("../media/drumloop.wav", &buff, &length); - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.length = length; - - result = FMOD_System_CreateSound(system, (const char *)buff, FMOD_HARDWARE | FMOD_OPENMEMORY, &exinfo, &sound1); - ERRCHECK(result); - - result = FMOD_Sound_SetMode(sound1, FMOD_LOOP_OFF); - ERRCHECK(result); - - free(buff); // don't need the original memory any more. Note! If loading as a stream, the memory must stay active so do not free it! - - LoadFileIntoMemory("../media/jaguar.wav", &buff, &length); - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.length = length; - - result = FMOD_System_CreateSound(system, (const char *)buff, FMOD_SOFTWARE | FMOD_OPENMEMORY, &exinfo, &sound2); - ERRCHECK(result); - - free(buff); // don't need the original memory any more. Note! If loading as a stream, the memory must stay active so do not free it! - - LoadFileIntoMemory("../media/swish.wav", &buff, &length); - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.length = length; - - result = FMOD_System_CreateSound(system, (const char *)buff, FMOD_HARDWARE | FMOD_OPENMEMORY, &exinfo, &sound3); - ERRCHECK(result); - - free(buff); // don't need the original memory any more. Note! If loading as a stream, the memory must stay active so do not free it! - - printf("==========================================================================\n"); - printf("Load from memory example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==========================================================================\n"); - printf("\n"); - printf("Press '1' to play a mono sound using hardware mixing\n"); - printf("Press '2' to play a mono sound using software mixing\n"); - printf("Press '3' to play a stereo sound using hardware mixing\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case '1' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound1, 0, &channel); - ERRCHECK(result); - break; - } - case '2' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound2, 0, &channel); - ERRCHECK(result); - break; - } - case '3' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound3, 0, &channel); - ERRCHECK(result); - break; - } - } - } - - FMOD_System_Update(system); - - { - unsigned int ms = 0; - unsigned int lenms = 0; - int playing = 0; - int paused = 0; - int channelsplaying = 0; - - if (channel) - { - FMOD_SOUND *currentsound = 0; - - result = FMOD_Channel_IsPlaying(channel, &playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPaused(channel, &paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - FMOD_Channel_GetCurrentSound(channel, ¤tsound); - if (currentsound) - { - result = FMOD_Sound_GetLength(currentsound, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - } - - result = FMOD_Sound_GetLength(sound1, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - FMOD_System_GetChannelsPlaying(system, &channelsplaying); - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s : Channels Playing %2d\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped", channelsplaying); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound1); - ERRCHECK(result); - result = FMOD_Sound_Release(sound2); - ERRCHECK(result); - result = FMOD_Sound_Release(sound3); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/loadfrommemory/main.cpp b/CocosDenshion/third_party/fmod/examples/loadfrommemory/main.cpp deleted file mode 100644 index 2dba723573..0000000000 --- a/CocosDenshion/third_party/fmod/examples/loadfrommemory/main.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/*=============================================================================================== - Load from memory example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example is simply a variant of the play sound example, but it loads the data into memory - then uses the 'load from memory' feature of System::createSound. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -void LoadFileIntoMemory(const char *name, void **buff, int *length) -{ - FILE *fp = fopen(name, "rb"); - - fseek(fp, 0, SEEK_END); - *length = ftell(fp); - fseek(fp, 0, SEEK_SET); - - *buff = malloc(*length); - fread(*buff, *length, 1, fp); - - fclose(fp); -} - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound1, *sound2, *sound3; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - void *buff = 0; - int length = 0; - FMOD_CREATESOUNDEXINFO exinfo; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - LoadFileIntoMemory("../media/drumloop.wav", &buff, &length); - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.length = length; - - result = system->createSound((const char *)buff, FMOD_HARDWARE | FMOD_OPENMEMORY, &exinfo, &sound1); - ERRCHECK(result); - - result = sound1->setMode(FMOD_LOOP_OFF); - ERRCHECK(result); - - free(buff); // don't need the original memory any more. Note! If loading as a stream, the memory must stay active so do not free it! - - LoadFileIntoMemory("../media/jaguar.wav", &buff, &length); - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.length = length; - - result = system->createSound((const char *)buff, FMOD_SOFTWARE | FMOD_OPENMEMORY, &exinfo, &sound2); - ERRCHECK(result); - - free(buff); // don't need the original memory any more. Note! If loading as a stream, the memory must stay active so do not free it! - - LoadFileIntoMemory("../media/swish.wav", &buff, &length); - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.length = length; - - result = system->createSound((const char *)buff, FMOD_HARDWARE | FMOD_OPENMEMORY, &exinfo, &sound3); - ERRCHECK(result); - - free(buff); // don't need the original memory any more. Note! If loading as a stream, the memory must stay active so do not free it! - - printf("==========================================================================\n"); - printf("Load from memory example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==========================================================================\n"); - printf("\n"); - printf("Press '1' to play a mono sound using hardware mixing\n"); - printf("Press '2' to play a mono sound using software mixing\n"); - printf("Press '3' to play a stereo sound using hardware mixing\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case '1' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound1, false, &channel); - ERRCHECK(result); - break; - } - case '2' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound2, false, &channel); - ERRCHECK(result); - break; - } - case '3' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound3, false, &channel); - ERRCHECK(result); - break; - } - } - } - - system->update(); - - { - unsigned int ms = 0; - unsigned int lenms = 0; - bool playing = 0; - bool paused = 0; - int channelsplaying = 0; - - if (channel) - { - FMOD::Sound *currentsound = 0; - - result = channel->isPlaying(&playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPaused(&paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - channel->getCurrentSound(¤tsound); - if (currentsound) - { - result = currentsound->getLength(&lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - } - - system->getChannelsPlaying(&channelsplaying); - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s : Channels Playing %2d\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped", channelsplaying); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound1->release(); - ERRCHECK(result); - result = sound2->release(); - ERRCHECK(result); - result = sound3->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/media/playlist.m3u b/CocosDenshion/third_party/fmod/examples/media/playlist.m3u deleted file mode 100644 index 381935fcc0..0000000000 --- a/CocosDenshion/third_party/fmod/examples/media/playlist.m3u +++ /dev/null @@ -1,11 +0,0 @@ -#EXTM3U -#EXTINF:11,Unknown - FMOD example wave -wave.mp3 -#EXTINF:1,swish -swish.wav -#EXTINF:2,stereo -stereo.ogg -#EXTINF:1,jaguar -jaguar.wav -#EXTINF:0,drumloop -drumloop.wav diff --git a/CocosDenshion/third_party/fmod/examples/media/wave.mp3.REMOVED.git-id b/CocosDenshion/third_party/fmod/examples/media/wave.mp3.REMOVED.git-id deleted file mode 100644 index d18eccea47..0000000000 --- a/CocosDenshion/third_party/fmod/examples/media/wave.mp3.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -400b6a591c4687406c5b5943181e083952872de7 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/examples/multiplesoundcard/Makefile b/CocosDenshion/third_party/fmod/examples/multiplesoundcard/Makefile deleted file mode 100644 index b221cabf3e..0000000000 --- a/CocosDenshion/third_party/fmod/examples/multiplesoundcard/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -multiplesoundcard_cpp: main.cpp - g++ -O3 -o multiplesoundcard main.cpp ../../api/lib/libfmodex.so -pthread - -multiplesoundcard_c: main.c - g++ -O3 -o multiplesoundcard main.c ../../api/lib/libfmodex.so -pthread - -run: - ./multiplesoundcard - -clean: - rm -f multiplesoundcard diff --git a/CocosDenshion/third_party/fmod/examples/multiplesoundcard/main.c b/CocosDenshion/third_party/fmod/examples/multiplesoundcard/main.c deleted file mode 100644 index e99247f834..0000000000 --- a/CocosDenshion/third_party/fmod/examples/multiplesoundcard/main.c +++ /dev/null @@ -1,226 +0,0 @@ -/*=============================================================================================== - MultipleSoundCard Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to simply load and play multiple sounds. This is about the simplest - use of FMOD. - This makes FMOD decode the into memory when it loads. If the sounds are big and possibly take - up a lot of ram, then it would be better to use the FMOD_CREATESTREAM flag so that it is - streamed in realtime as it plays. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *systemA, *systemB; - FMOD_SOUND *soundA, *soundB; - FMOD_CHANNEL *channelA = 0, *channelB = 0; - FMOD_RESULT result; - int key, count, numdrivers, driver; - unsigned int version; - - /* - Create Sound Card A - */ - result = FMOD_System_Create(&systemA); - ERRCHECK(result); - - result = FMOD_System_GetVersion(systemA, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = FMOD_System_GetNumDrivers(systemA, &numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Select soundcard A\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = FMOD_System_GetDriverInfo(systemA, count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - if (key == 27) - { - return 0; - } - driver = key - '1'; - } while (driver < 0 || driver >= numdrivers); - - printf("\n"); - - result = FMOD_System_SetDriver(systemA, driver); - ERRCHECK(result); - - result = FMOD_System_Init(systemA, 32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - - - /* - Create Sound Card B - */ - result = FMOD_System_Create(&systemB); - ERRCHECK(result); - - result = FMOD_System_GetVersion(systemB, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = FMOD_System_GetNumDrivers(systemB, &numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Select soundcard B\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = FMOD_System_GetDriverInfo(systemB, count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - if (key == 27) - { - return 0; - } - driver = key - '1'; - } while (driver < 0 || driver >= numdrivers); - - printf("\n"); - - result = FMOD_System_SetDriver(systemB, driver); - ERRCHECK(result); - - result = FMOD_System_Init(systemB, 32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - - /* - Load 1 sample into each soundcard. - */ - result = FMOD_System_CreateSound(systemA, "../media/drumloop.wav", FMOD_HARDWARE, 0, &soundA); - ERRCHECK(result); - result = FMOD_Sound_SetMode(soundA, FMOD_LOOP_OFF); - ERRCHECK(result); - - result = FMOD_System_CreateSound(systemB, "../media/jaguar.wav", FMOD_HARDWARE, 0,&soundB); - ERRCHECK(result); - - printf("======================================================================\n"); - printf("MultipleSoundCard Example. Copyright (c) Firelight Technologies 2004.\n"); - printf("======================================================================\n"); - printf("\n"); - printf("Press '1' to play a sound on soundcard A\n"); - printf("Press '2' to play a sound on soundcard B\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop. - */ - do - { - int channelsplayingA = 0; - int channelsplayingB = 0; - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case '1' : - { - result = FMOD_System_PlaySound(systemA, FMOD_CHANNEL_FREE, soundA, 0, &channelA); - ERRCHECK(result); - break; - } - case '2' : - { - result = FMOD_System_PlaySound(systemB, FMOD_CHANNEL_FREE, soundB, 0, &channelB); - ERRCHECK(result); - break; - } - } - } - - FMOD_System_Update(systemA); - FMOD_System_Update(systemB); - - FMOD_System_GetChannelsPlaying(systemA, &channelsplayingA); - FMOD_System_GetChannelsPlaying(systemB, &channelsplayingB); - - printf("Channels Playing on A %2d. Channels Playing on B %2d.\r", channelsplayingA, channelsplayingB); - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(soundA); - ERRCHECK(result); - result = FMOD_System_Close(systemA); - ERRCHECK(result); - result = FMOD_System_Release(systemA); - ERRCHECK(result); - - result = FMOD_Sound_Release(soundB); - ERRCHECK(result); - result = FMOD_System_Close(systemB); - ERRCHECK(result); - result = FMOD_System_Release(systemB); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/multiplesoundcard/main.cpp b/CocosDenshion/third_party/fmod/examples/multiplesoundcard/main.cpp deleted file mode 100644 index aec4520f4f..0000000000 --- a/CocosDenshion/third_party/fmod/examples/multiplesoundcard/main.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/*=============================================================================================== - MultipleSoundCard Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to play sounds on 2 different sound cards from the same application. - It creates 2 FMOD::System objects, selects a different sound device for each, then allows - the user to play 1 sound on 1 soundcard and another sound on another soundcard. - - Note that sounds created on device A cannot be played on device B and vice versa. - You will have to each sound separately for each sound card. Device A might load the sound - into its own memory so obviously device B wouldnt be able to play it. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *systemA, *systemB; - FMOD::Sound *soundA, *soundB; - FMOD::Channel *channelA = 0, *channelB = 0;; - FMOD_RESULT result; - int key, count, numdrivers, driver; - unsigned int version; - - /* - Create Sound Card A - */ - result = FMOD::System_Create(&systemA); - ERRCHECK(result); - - result = systemA->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = systemA->getNumDrivers(&numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Select soundcard A\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = systemA->getDriverInfo(count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - if (key == 27) - { - return 0; - } - driver = key - '1'; - } while (driver < 0 || driver >= numdrivers); - - printf("\n"); - - result = systemA->setDriver(driver); - ERRCHECK(result); - - result = systemA->init(32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - - - /* - Create Sound Card B - */ - result = FMOD::System_Create(&systemB); - ERRCHECK(result); - - result = systemB->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = systemB->getNumDrivers(&numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Select soundcard B\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = systemB->getDriverInfo(count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - if (key == 27) - { - return 0; - } - driver = key - '1'; - } while (driver < 0 || driver >= numdrivers); - - printf("\n"); - - result = systemB->setDriver(driver); - ERRCHECK(result); - - result = systemB->init(32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - - /* - Load 1 sample into each soundcard. - */ - result = systemA->createSound("../media/drumloop.wav", FMOD_HARDWARE, 0, &soundA); - ERRCHECK(result); - result = soundA->setMode(FMOD_LOOP_OFF); - ERRCHECK(result); - - result = systemB->createSound("../media/jaguar.wav", FMOD_HARDWARE, 0, &soundB); - ERRCHECK(result); - - printf("======================================================================\n"); - printf("MultipleSoundCard Example. Copyright (c) Firelight Technologies 2004.\n"); - printf("======================================================================\n"); - printf("\n"); - printf("Press '1' to play a sound on soundcard A\n"); - printf("Press '2' to play a sound on soundcard B\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop. - */ - do - { - int channelsplayingA = 0; - int channelsplayingB = 0; - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case '1' : - { - result = systemA->playSound(FMOD_CHANNEL_FREE, soundA, 0, &channelA); - ERRCHECK(result); - break; - } - case '2' : - { - result = systemB->playSound(FMOD_CHANNEL_FREE, soundB, 0, &channelB); - ERRCHECK(result); - break; - } - } - } - - systemA->update(); - systemB->update(); - - systemA->getChannelsPlaying(&channelsplayingA); - systemB->getChannelsPlaying(&channelsplayingB); - - printf("Channels Playing on A %2d. Channels Playing on B %2d.\r", channelsplayingA, channelsplayingB); - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = soundA->release(); - ERRCHECK(result); - result = systemA->close(); - ERRCHECK(result); - result = systemA->release(); - ERRCHECK(result); - - result = soundB->release(); - ERRCHECK(result); - result = systemB->close(); - ERRCHECK(result); - result = systemB->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/multispeakeroutput/Makefile b/CocosDenshion/third_party/fmod/examples/multispeakeroutput/Makefile deleted file mode 100644 index 5030259732..0000000000 --- a/CocosDenshion/third_party/fmod/examples/multispeakeroutput/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -multispeakeroutput_cpp: main.cpp - g++ -O3 -o multispeakeroutput main.cpp ../../api/lib/libfmodex.so -pthread - -multispeakeroutput_c: main.c - g++ -O3 -o multispeakeroutput main.c ../../api/lib/libfmodex.so -pthread - -run: - ./multispeakeroutput - -clean: - rm -f multispeakeroutput diff --git a/CocosDenshion/third_party/fmod/examples/multispeakeroutput/main.c b/CocosDenshion/third_party/fmod/examples/multispeakeroutput/main.c deleted file mode 100644 index a2e3be628c..0000000000 --- a/CocosDenshion/third_party/fmod/examples/multispeakeroutput/main.c +++ /dev/null @@ -1,335 +0,0 @@ -/*=============================================================================================== - Multi Speaker Output Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to play sounds in multiple speakers, and also how to even assign - sound subchannels, such as those in a stereo sound to different individual speakers. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound1, *sound2; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - /* - Multichannel only supported in ALSA mode in 5.1 and 7.1. - If the user doesn't have 5.1 speakers then only the speakers - they have will be audible. - */ - - result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_ALSA); - ERRCHECK(result); - - FMOD_System_SetSpeakerMode(system, FMOD_SPEAKERMODE_5POINT1); - ERRCHECK(result); - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/drumloop.wav", FMOD_SOFTWARE | FMOD_2D, 0, &sound1); - ERRCHECK(result); - result = FMOD_Sound_SetMode(sound1, FMOD_LOOP_OFF); - - result = FMOD_System_CreateSound(system, "../media/stereo.ogg", FMOD_SOFTWARE | FMOD_2D, 0, &sound2); - ERRCHECK(result); - - printf("==============================================================================\n"); - printf("Multi Speaker Output Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==============================================================================\n"); - printf("\n"); - printf("Note! You must have your speaker configuration set up correctly\n"); - printf(" in the windows control panel for this to work properly.\n"); - printf("\n"); - printf("Press '1' to play a mono sound on the FRONT LEFT speaker.\n"); - printf("Press '2' to play a mono sound on the FRONT RIGHT speaker.\n"); - printf("Press '3' to play a mono sound on the CENTER speaker.\n"); - printf("Press '4' to play a mono sound on the REAR LEFT speaker.\n"); - printf("Press '5' to play a mono sound on the REAR RIGHT speaker.\n"); - printf("Press '6' to play a mono sound on the SIDE LEFT speaker.\n"); - printf("Press '7' to play a mono sound on the SIDE RIGHT speaker.\n"); - printf("Press '8' to play a stereo sound on the front speakers.\n"); - printf("Press '9' to play a stereo sound on the front speakers but channel swapped.\n"); - printf("Press '0' to play the right part of a stereo sound on the CENTER speaker.\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case '1' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound1, TRUE, &channel); - ERRCHECK(result); - - result = FMOD_Channel_SetSpeakerMix(channel, 1.0f, 0, 0, 0, 0, 0, 0, 0); - ERRCHECK(result); - - result = FMOD_Channel_SetPaused(channel, FALSE); - ERRCHECK(result); - break; - } - case '2' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound1, TRUE, &channel); - ERRCHECK(result); - - result = FMOD_Channel_SetSpeakerMix(channel, 0, 1.0f, 0, 0, 0, 0, 0, 0); - ERRCHECK(result); - - result = FMOD_Channel_SetPaused(channel, FALSE); - ERRCHECK(result); - break; - } - case '3' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound1, TRUE, &channel); - ERRCHECK(result); - - result = FMOD_Channel_SetSpeakerMix(channel, 0, 0, 1.0f, 0, 0, 0, 0, 0); - ERRCHECK(result); - - result = FMOD_Channel_SetPaused(channel, FALSE); - ERRCHECK(result); - break; - } - case '4' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound1, TRUE, &channel); - ERRCHECK(result); - - result = FMOD_Channel_SetSpeakerMix(channel, 0, 0, 0, 0, 1.0f, 0, 0, 0); - ERRCHECK(result); - - result = FMOD_Channel_SetPaused(channel, FALSE); - ERRCHECK(result); - break; - } - case '5' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound1, TRUE, &channel); - ERRCHECK(result); - - result = FMOD_Channel_SetSpeakerMix(channel, 0, 0, 0, 0, 0, 1.0f, 0, 0); - ERRCHECK(result); - - result = FMOD_Channel_SetPaused(channel, FALSE); - ERRCHECK(result); - break; - } - case '6' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound1, TRUE, &channel); - ERRCHECK(result); - - result = FMOD_Channel_SetSpeakerMix(channel, 0, 0, 0, 0, 0, 0, 1.0f, 0); - ERRCHECK(result); - - result = FMOD_Channel_SetPaused(channel, FALSE); - ERRCHECK(result); - break; - } - case '7' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound1, TRUE, &channel); - ERRCHECK(result); - - result = FMOD_Channel_SetSpeakerMix(channel, 0, 0, 0, 0, 0, 0, 0, 1.0f); - ERRCHECK(result); - - result = FMOD_Channel_SetPaused(channel, FALSE); - ERRCHECK(result); - - break; - } - case '8' : - { - float levels[2] = { 0, 1.0f }; - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound2, TRUE, &channel); - ERRCHECK(result); - - /* - By default a stereo sound would play in all right and all left speakers, so this forces it to just the front. - */ - result = FMOD_Channel_SetSpeakerMix(channel, 1.0f, 1.0f, 0, 0, 0, 0, 0, 0); - ERRCHECK(result); - - result = FMOD_Channel_SetPaused(channel, FALSE); - ERRCHECK(result); - - break; - } - case '9' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound2, TRUE, &channel); - ERRCHECK(result); - - /* - Clear out all speakers first. - */ - result = FMOD_Channel_SetSpeakerMix(channel, 0, 0, 0, 0, 0, 0, 0, 0); - ERRCHECK(result); - - /* - Put the left channel of the sound in the right speaker. - */ - { - float levels[2] = { 0, 1.0f }; /* This array represents the source stereo sound. l/r */ - - result = FMOD_Channel_SetSpeakerLevels(channel, FMOD_SPEAKER_FRONT_LEFT, levels, 2); - ERRCHECK(result); - } - /* - Put the right channel of the sound in the left speaker. - */ - { - float levels[2] = { 1.0f, 0 }; /* This array represents the source stereo sound. l/r */ - - result = FMOD_Channel_SetSpeakerLevels(channel, FMOD_SPEAKER_FRONT_RIGHT, levels, 2); - ERRCHECK(result); - } - - result = FMOD_Channel_SetPaused(channel, FALSE); - ERRCHECK(result); - - break; - } - case '0' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound2, TRUE, &channel); - ERRCHECK(result); - - /* - Clear out all speakers first. - */ - result = FMOD_Channel_SetSpeakerMix(channel, 0, 0, 0, 0, 0, 0, 0, 0); - ERRCHECK(result); - - /* - Put the left channel of the sound in the right speaker. - */ - { - float levels[2] = { 0, 1.0f }; /* This array represents the source stereo sound. l/r */ - - result = FMOD_Channel_SetSpeakerLevels(channel, FMOD_SPEAKER_FRONT_CENTER, levels, 2); - ERRCHECK(result); - } - - result = FMOD_Channel_SetPaused(channel, FALSE); - ERRCHECK(result); - - break; - } - } - } - - FMOD_System_Update(system); - - { - unsigned int ms = 0; - unsigned int lenms = 0; - int playing = FALSE; - int paused = FALSE; - int channelsplaying = 0; - - if (channel) - { - FMOD_SOUND *currentsound = 0; - - result = FMOD_Channel_IsPlaying(channel, &playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPaused(channel, &paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - FMOD_Channel_GetCurrentSound(channel, ¤tsound); - if (currentsound) - { - result = FMOD_Sound_GetLength(currentsound, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - } - - FMOD_System_GetChannelsPlaying(system, &channelsplaying); - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s : Channels Playing %2d\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped", channelsplaying); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound1); - ERRCHECK(result); - result = FMOD_Sound_Release(sound2); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/multispeakeroutput/main.cpp b/CocosDenshion/third_party/fmod/examples/multispeakeroutput/main.cpp deleted file mode 100644 index c771563e3f..0000000000 --- a/CocosDenshion/third_party/fmod/examples/multispeakeroutput/main.cpp +++ /dev/null @@ -1,337 +0,0 @@ -/*=============================================================================================== - Multi Speaker Output Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to play sounds in multiple speakers, and also how to even assign - sound subchannels, such as those in a stereo sound to different individual speakers. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound1, *sound2; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - /* - Multichannel only supported in ALSA mode in 5.1 and 7.1. - If the user doesn't have 5.1 speakers then only the speakers - they have will be audible. - */ - - result = system->setOutput(FMOD_OUTPUTTYPE_ALSA); - ERRCHECK(result); - - result = system->setSpeakerMode(FMOD_SPEAKERMODE_5POINT1); - ERRCHECK(result); - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->createSound("../media/drumloop.wav", FMOD_SOFTWARE | FMOD_2D, 0, &sound1); - ERRCHECK(result); - result = sound1->setMode(FMOD_LOOP_OFF); - ERRCHECK(result); - - - result = system->createSound("../media/stereo.ogg", FMOD_SOFTWARE | FMOD_2D, 0, &sound2); - ERRCHECK(result); - - printf("==============================================================================\n"); - printf("Multi Speaker Output Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==============================================================================\n"); - printf("\n"); - printf("Note! You must have your speaker configuration set up correctly\n"); - printf(" in the windows control panel for this to work properly.\n"); - printf("\n"); - printf("Press '1' to play a mono sound on the FRONT LEFT speaker.\n"); - printf("Press '2' to play a mono sound on the FRONT RIGHT speaker.\n"); - printf("Press '3' to play a mono sound on the CENTER speaker.\n"); - printf("Press '4' to play a mono sound on the REAR LEFT speaker.\n"); - printf("Press '5' to play a mono sound on the REAR RIGHT speaker.\n"); - printf("Press '6' to play a mono sound on the SIDE LEFT speaker.\n"); - printf("Press '7' to play a mono sound on the SIDE RIGHT speaker.\n"); - printf("Press '8' to play a stereo sound on the front speakers.\n"); - printf("Press '9' to play a stereo sound on the front speakers but channel swapped.\n"); - printf("Press '0' to play the right part of a stereo sound on the CENTER speaker.\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case '1' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel); - ERRCHECK(result); - - result = channel->setSpeakerMix(1.0f, 0, 0, 0, 0, 0, 0, 0); - ERRCHECK(result); - - result = channel->setPaused(false); - ERRCHECK(result); - break; - } - case '2' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel); - ERRCHECK(result); - - result = channel->setSpeakerMix(0, 1.0f, 0, 0, 0, 0, 0, 0); - ERRCHECK(result); - - result = channel->setPaused(false); - ERRCHECK(result); - break; - } - case '3' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel); - ERRCHECK(result); - - result = channel->setSpeakerMix(0, 0, 1.0f, 0, 0, 0, 0, 0); - ERRCHECK(result); - - result = channel->setPaused(false); - ERRCHECK(result); - break; - } - case '4' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel); - ERRCHECK(result); - - result = channel->setSpeakerMix(0, 0, 0, 0, 1.0f, 0, 0, 0); - ERRCHECK(result); - - result = channel->setPaused(false); - ERRCHECK(result); - break; - } - case '5' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel); - ERRCHECK(result); - - result = channel->setSpeakerMix(0, 0, 0, 0, 0, 1.0f, 0, 0); - ERRCHECK(result); - - result = channel->setPaused(false); - ERRCHECK(result); - break; - } - case '6' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel); - ERRCHECK(result); - - result = channel->setSpeakerMix(0, 0, 0, 0, 0, 0, 1.0f, 0); - ERRCHECK(result); - - result = channel->setPaused(false); - ERRCHECK(result); - break; - } - case '7' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound1, true, &channel); - ERRCHECK(result); - - result = channel->setSpeakerMix(0, 0, 0, 0, 0, 0, 0, 1.0f); - ERRCHECK(result); - - result = channel->setPaused(false); - ERRCHECK(result); - - break; - } - case '8' : - { - float levels[2] = { 0, 1.0f }; - - result = system->playSound(FMOD_CHANNEL_FREE, sound2, true, &channel); - ERRCHECK(result); - - /* - By default a stereo sound would play in all right and all left speakers, so this forces it to just the front. - */ - result = channel->setSpeakerMix(1.0f, 1.0f, 0, 0, 0, 0, 0, 0); - ERRCHECK(result); - - result = channel->setPaused(false); - ERRCHECK(result); - - break; - } - case '9' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound2, true, &channel); - ERRCHECK(result); - - /* - Clear out all speakers first. - */ - result = channel->setSpeakerMix(0, 0, 0, 0, 0, 0, 0, 0); - ERRCHECK(result); - - /* - Put the left channel of the sound in the right speaker. - */ - { - float levels[2] = { 0, 1.0f }; /* This array represents the source stereo sound. l/r */ - - result = channel->setSpeakerLevels(FMOD_SPEAKER_FRONT_LEFT, levels, 2); - ERRCHECK(result); - } - /* - Put the right channel of the sound in the left speaker. - */ - { - float levels[2] = { 1.0f, 0 }; /* This array represents the source stereo sound. l/r */ - - result = channel->setSpeakerLevels(FMOD_SPEAKER_FRONT_RIGHT, levels, 2); - ERRCHECK(result); - } - - result = channel->setPaused(false); - ERRCHECK(result); - - break; - } - case '0' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound2, true, &channel); - ERRCHECK(result); - - /* - Clear out all speakers first. - */ - result = channel->setSpeakerMix(0, 0, 0, 0, 0, 0, 0, 0); - ERRCHECK(result); - - /* - Put the left channel of the sound in the right speaker. - */ - { - float levels[2] = { 0, 1.0f }; /* This array represents the source stereo sound. l/r */ - - result = channel->setSpeakerLevels(FMOD_SPEAKER_FRONT_CENTER, levels, 2); - ERRCHECK(result); - } - - result = channel->setPaused(false); - ERRCHECK(result); - - break; - } - } - } - - system->update(); - - { - unsigned int ms = 0; - unsigned int lenms = 0; - bool playing = false; - bool paused = false; - int channelsplaying = 0; - - if (channel) - { - FMOD::Sound *currentsound = 0; - - result = channel->isPlaying(&playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPaused(&paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - channel->getCurrentSound(¤tsound); - if (currentsound) - { - result = currentsound->getLength(&lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - } - - system->getChannelsPlaying(&channelsplaying); - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s : Channels Playing %2d\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped", channelsplaying); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound1->release(); - ERRCHECK(result); - result = sound2->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/netstream/Makefile b/CocosDenshion/third_party/fmod/examples/netstream/Makefile deleted file mode 100644 index 2b3b3e0088..0000000000 --- a/CocosDenshion/third_party/fmod/examples/netstream/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -netstream_cpp: main.cpp - g++ -O3 -o netstream main.cpp ../../api/lib/libfmodex.so -pthread - -netstream_c: main.c - g++ -O3 -o netstream main.c ../../api/lib/libfmodex.so -pthread - -run: - ./netstream - -clean: - rm -f netstream diff --git a/CocosDenshion/third_party/fmod/examples/netstream/main.c b/CocosDenshion/third_party/fmod/examples/netstream/main.c deleted file mode 100644 index 66e01ad886..0000000000 --- a/CocosDenshion/third_party/fmod/examples/netstream/main.c +++ /dev/null @@ -1,174 +0,0 @@ -/*=============================================================================================== - NetStream Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to play streaming audio from the internet -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - printf("===================================================================\n"); - printf("NetStream Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===================================================================\n\n"); - - if (argc < 2) - { - printf("Usage: netstream \n"); - printf("Example: netstream http://www.fmod.org/stream.mp3\n\n"); - return -1; - } - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system,&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 1, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - /* - Bump up the file buffer size a little bit for netstreams (to account for lag). Decode buffer is left at default. - */ - result = FMOD_System_SetStreamBufferSize(system, 64*1024, FMOD_TIMEUNIT_RAWBYTES); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, argv[1], FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING, 0, &sound); - ERRCHECK(result); - - printf("Press space to pause, Esc to quit\n\n"); - - /* - Main loop - */ - do - { - unsigned int ms = 0, percent = 0; - int playing = FALSE; - int paused = FALSE; - int starving = FALSE; - FMOD_OPENSTATE openstate; - - if (!channel) - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, FALSE, &channel); - } - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - if (channel) - { - int paused; - FMOD_Channel_GetPaused(channel, &paused); - FMOD_Channel_SetPaused(channel, !paused); - } - break; - } - } - } - - FMOD_System_Update(system); - - if (channel) - { - for (;;) - { - FMOD_TAG tag; - if (FMOD_Sound_GetTag(sound, 0, -1, &tag) != FMOD_OK) - { - break; - } - if (tag.datatype == FMOD_TAGDATATYPE_STRING) - { - printf("%s = %s (%d bytes)\n", tag.name, tag.data, tag.datalen); - } - } - result = FMOD_Channel_GetPaused(channel, &paused); - ERRCHECK(result); - result = FMOD_Channel_IsPlaying(channel, &playing); - ERRCHECK(result); - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - ERRCHECK(result); - } - - result = FMOD_Sound_GetOpenState(sound, &openstate, &percent, &starving, 0); - ERRCHECK(result); - - printf("Time %02d:%02d:%02d : %s : (%3d%%%) %s \r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, openstate == FMOD_OPENSTATE_BUFFERING ? "Buffering..." : openstate == FMOD_OPENSTATE_CONNECTING ? "Connecting..." : paused ? "Paused " : playing ? "Playing " : "Stopped ", percent, starving ? "STARVING" : " "); - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - printf("Shutting down.\n"); - - /* - If we pressed escape before it is ready, wait for it to finish opening before we release it. - */ - do - { - FMOD_OPENSTATE openstate; - - result = FMOD_Sound_GetOpenState(sound, &openstate, 0, 0, 0); - ERRCHECK(result); - - if (openstate == FMOD_OPENSTATE_READY) - { - break; - } - - printf("Waiting for sound to finish opening before trying to release it....\r"); - - Sleep(10); - } while (1); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/netstream/main.cpp b/CocosDenshion/third_party/fmod/examples/netstream/main.cpp deleted file mode 100644 index 31a4dcbaaf..0000000000 --- a/CocosDenshion/third_party/fmod/examples/netstream/main.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/*=============================================================================================== - NetStream Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to play streaming audio from the internet -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - printf("===================================================================\n"); - printf("NetStream Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===================================================================\n\n"); - - if (argc < 2) - { - printf("Usage: netstream \n"); - printf("Example: netstream http://www.fmod.org/stream.mp3\n\n"); - return -1; - } - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(1, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - /* - Bump up the file buffer size a little bit for netstreams (to account for lag). Decode buffer is left at default. - */ - result = system->setStreamBufferSize(64*1024, FMOD_TIMEUNIT_RAWBYTES); - ERRCHECK(result); - - result = system->createSound(argv[1], FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING, 0, &sound); - ERRCHECK(result); - - printf("Press space to pause, Esc to quit\n\n"); - - /* - Main loop - */ - do - { - unsigned int ms = 0, percent = 0; - bool playing = false; - bool paused = false; - bool starving = false; - FMOD_OPENSTATE openstate; - - if (!channel) - { - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - } - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - if (channel) - { - bool paused; - channel->getPaused(&paused); - channel->setPaused(!paused); - } - break; - } - } - } - - system->update(); - - if (channel) - { - for (;;) - { - FMOD_TAG tag; - if (sound->getTag(0, -1, &tag) != FMOD_OK) - { - break; - } - if (tag.datatype == FMOD_TAGDATATYPE_STRING) - { - printf("%s = %s (%d bytes)\n", tag.name, (char *)tag.data, tag.datalen); - } - } - - result = channel->getPaused(&paused); - ERRCHECK(result); - result = channel->isPlaying(&playing); - ERRCHECK(result); - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - ERRCHECK(result); - } - - result = sound->getOpenState(&openstate, &percent, &starving, 0); - ERRCHECK(result); - - channel->setMute(starving); - ERRCHECK(result); - - printf("Time %02d:%02d:%02d : %s : (%3d%%) %s \r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, openstate == FMOD_OPENSTATE_BUFFERING ? "Buffering..." : openstate == FMOD_OPENSTATE_CONNECTING ? "Connecting..." : paused ? "Paused " : playing ? "Playing " : "Stopped ", percent, starving ? "STARVING" : " "); - fflush(stdout); - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - printf("Shutting down.\n"); - - if (channel) - { - result = channel->stop(); - ERRCHECK(result); - } - - /* - If we pressed escape before it is ready, wait for it to finish opening before we release it. - */ - do - { - FMOD_OPENSTATE openstate; - - result = sound->getOpenState(&openstate, 0, 0, 0); - ERRCHECK(result); - - if (openstate == FMOD_OPENSTATE_READY) - { - break; - } - - printf("Waiting for sound to finish opening before trying to release it....\r"); - fflush(stdout); - - Sleep(10); - } while (1); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/offlinedecoding/Makefile b/CocosDenshion/third_party/fmod/examples/offlinedecoding/Makefile deleted file mode 100644 index 090b273dcf..0000000000 --- a/CocosDenshion/third_party/fmod/examples/offlinedecoding/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -offlinedecoding_cpp: main.cpp - g++ -O3 -o offlinedecoding main.cpp ../../api/lib/libfmodex.so -pthread - -offlinedecoding_c: main.c - g++ -O3 -o offlinedecoding main.c ../../api/lib/libfmodex.so -pthread - -run: - ./offlinedecoding - -clean: - rm -f offlinedecoding diff --git a/CocosDenshion/third_party/fmod/examples/offlinedecoding/main.c b/CocosDenshion/third_party/fmod/examples/offlinedecoding/main.c deleted file mode 100644 index 866f4384d9..0000000000 --- a/CocosDenshion/third_party/fmod/examples/offlinedecoding/main.c +++ /dev/null @@ -1,137 +0,0 @@ -/*=============================================================================================== - Offline Decoding Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how decode a file to PCM, without playing it. - It writes out the data as a raw data file. - The FMOD_System_CreateSound function uses FMOD_OPENONLY so that FMOD does not read any data - itself. - If this is uses then it is up to the user to use FMOD_Sound_ReadData to get the data out of - the file and into the destination buffer. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound; - FMOD_RESULT result; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 1, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = FMOD_System_CreateStream(system, "../media/wave.mp3", FMOD_OPENONLY | FMOD_ACCURATETIME, 0, &sound); - ERRCHECK(result); - - printf("==========================================================================\n"); - printf("Offline Decoding Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==========================================================================\n"); - printf("\n"); - printf("This program will open wave.mp3 and decode it into wave.raw using the\n"); - printf("FMOD_Sound_ReadData function.\n"); - printf("\n"); - - /* - Decode the sound and write it to a .raw file. - */ - { - void *data; - unsigned int length = 0, read; - unsigned int bytesread; - FILE *outfp; - - #define CHUNKSIZE 4096 - - result = FMOD_Sound_GetLength(sound, &length, FMOD_TIMEUNIT_PCMBYTES); - ERRCHECK(result); - - outfp = fopen("output.raw", "wb"); - if (!outfp) - { - printf("Error! Could not open output.raw output file.\n"); - return 0; - } - - data = malloc(CHUNKSIZE); - if (!data) - { - printf("Error! Failed to allocate %d bytes.\n", CHUNKSIZE); - return 0; - } - - bytesread = 0; - do - { - result = FMOD_Sound_ReadData(sound, (char *)data, CHUNKSIZE, &read); - - fwrite((char *)data, read, 1, outfp); - - bytesread += read; - - printf("writing %d bytes of %d to output.raw\r", bytesread, length); - } - while (result == FMOD_OK && read == CHUNKSIZE); - - /* - Loop terminates when either - 1. the read function returns an error. (ie FMOD_ERR_FILE_EOF etc). - 2. the amount requested was different to the amount returned. (somehow got an EOF without the file error, maybe a non stream file format like mod/s3m/xm/it/midi). - - If 'bytesread' is bigger than 'length' then it just means that FMOD miscalculated the size, - but this will not usually happen if FMOD_ACCURATETIME is used. (this will give the correct length for VBR formats) - */ - - printf("\n"); - - if (outfp) - { - fclose(outfp); - } - } - - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/offlinedecoding/main.cpp b/CocosDenshion/third_party/fmod/examples/offlinedecoding/main.cpp deleted file mode 100644 index 96c88065a2..0000000000 --- a/CocosDenshion/third_party/fmod/examples/offlinedecoding/main.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/*=============================================================================================== - Offline Decoding Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how decode a file to PCM, without playing it. - It writes out the data as a raw data file. - The System::createSound function uses FMOD_OPENONLY so that FMOD does not read any data - itself. - If this is uses then it is up to the user to use Sound::readData to get the data out of - the file and into the destination buffer. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound; - FMOD_RESULT result; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(1, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->createStream("../media/wave.mp3", FMOD_OPENONLY | FMOD_ACCURATETIME, 0, &sound); - ERRCHECK(result); - - printf("==========================================================================\n"); - printf("Offline Decoding Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==========================================================================\n"); - printf("\n"); - printf("This program will open wave.mp3 and decode it into wave.raw using the\n"); - printf("Sound::readData function.\n"); - printf("\n"); - - /* - Decode the sound and write it to a .raw file. - */ - { - void *data; - unsigned int length = 0, read; - unsigned int bytesread; - FILE *outfp; - - #define CHUNKSIZE 4096 - - result = sound->getLength(&length, FMOD_TIMEUNIT_PCMBYTES); - ERRCHECK(result); - - outfp = fopen("output.raw", "wb"); - if (!outfp) - { - printf("Error! Could not open output.raw output file.\n"); - return 0; - } - - data = malloc(CHUNKSIZE); - if (!data) - { - printf("Error! Failed to allocate %d bytes.\n", CHUNKSIZE); - return 0; - } - - bytesread = 0; - do - { - result = sound->readData((char *)data, CHUNKSIZE, &read); - - fwrite((char *)data, read, 1, outfp); - - bytesread += read; - - printf("writing %d bytes of %d to output.raw\r", bytesread, length); - } - while (result == FMOD_OK && read == CHUNKSIZE); - - /* - Loop terminates when either - 1. the read function returns an error. (ie FMOD_ERR_FILE_EOF etc). - 2. the amount requested was different to the amount returned. (somehow got an EOF without the file error, maybe a non stream file format like mod/s3m/xm/it/midi). - - If 'bytesread' is bigger than 'length' then it just means that FMOD miscalculated the size, - but this will not usually happen if FMOD_ACCURATETIME is used. (this will give the correct length for VBR formats) - */ - - printf("\n"); - - if (outfp) - { - fclose(outfp); - } - } - - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/pitchdetection/Makefile b/CocosDenshion/third_party/fmod/examples/pitchdetection/Makefile deleted file mode 100644 index 19e2c34c31..0000000000 --- a/CocosDenshion/third_party/fmod/examples/pitchdetection/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -pitchdetection_cpp: main.cpp - g++ -O3 -o pitchdetection main.cpp ../../api/lib/libfmodex.so -pthread - -pitchdetection_c: main.c - g++ -O3 -o pitchdetection main.c ../../api/lib/libfmodex.so -pthread - -run: - ./pitchdetection - -clean: - rm -f pitchdetection diff --git a/CocosDenshion/third_party/fmod/examples/pitchdetection/main.c b/CocosDenshion/third_party/fmod/examples/pitchdetection/main.c deleted file mode 100644 index ab2fd6971c..0000000000 --- a/CocosDenshion/third_party/fmod/examples/pitchdetection/main.c +++ /dev/null @@ -1,309 +0,0 @@ -/*=============================================================================================== - Pitch detection example. - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example combines recording with spectrum analysis to determine the pitch of the sound - being recorded. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -#include -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -static const char *note[120] = -{ - "C 0", "C#0", "D 0", "D#0", "E 0", "F 0", "F#0", "G 0", "G#0", "A 0", "A#0", "B 0", - "C 1", "C#1", "D 1", "D#1", "E 1", "F 1", "F#1", "G 1", "G#1", "A 1", "A#1", "B 1", - "C 2", "C#2", "D 2", "D#2", "E 2", "F 2", "F#2", "G 2", "G#2", "A 2", "A#2", "B 2", - "C 3", "C#3", "D 3", "D#3", "E 3", "F 3", "F#3", "G 3", "G#3", "A 3", "A#3", "B 3", - "C 4", "C#4", "D 4", "D#4", "E 4", "F 4", "F#4", "G 4", "G#4", "A 4", "A#4", "B 4", - "C 5", "C#5", "D 5", "D#5", "E 5", "F 5", "F#5", "G 5", "G#5", "A 5", "A#5", "B 5", - "C 6", "C#6", "D 6", "D#6", "E 6", "F 6", "F#6", "G 6", "G#6", "A 6", "A#6", "B 6", - "C 7", "C#7", "D 7", "D#7", "E 7", "F 7", "F#7", "G 7", "G#7", "A 7", "A#7", "B 7", - "C 8", "C#8", "D 8", "D#8", "E 8", "F 8", "F#8", "G 8", "G#8", "A 8", "A#8", "B 8", - "C 9", "C#9", "D 9", "D#9", "E 9", "F 9", "F#9", "G 9", "G#9", "A 9", "A#9", "B 9" -}; - -static const float notefreq[120] = -{ - 16.35f, 17.32f, 18.35f, 19.45f, 20.60f, 21.83f, 23.12f, 24.50f, 25.96f, 27.50f, 29.14f, 30.87f, - 32.70f, 34.65f, 36.71f, 38.89f, 41.20f, 43.65f, 46.25f, 49.00f, 51.91f, 55.00f, 58.27f, 61.74f, - 65.41f, 69.30f, 73.42f, 77.78f, 82.41f, 87.31f, 92.50f, 98.00f, 103.83f, 110.00f, 116.54f, 123.47f, - 130.81f, 138.59f, 146.83f, 155.56f, 164.81f, 174.61f, 185.00f, 196.00f, 207.65f, 220.00f, 233.08f, 246.94f, - 261.63f, 277.18f, 293.66f, 311.13f, 329.63f, 349.23f, 369.99f, 392.00f, 415.30f, 440.00f, 466.16f, 493.88f, - 523.25f, 554.37f, 587.33f, 622.25f, 659.26f, 698.46f, 739.99f, 783.99f, 830.61f, 880.00f, 932.33f, 987.77f, - 1046.50f, 1108.73f, 1174.66f, 1244.51f, 1318.51f, 1396.91f, 1479.98f, 1567.98f, 1661.22f, 1760.00f, 1864.66f, 1975.53f, - 2093.00f, 2217.46f, 2349.32f, 2489.02f, 2637.02f, 2793.83f, 2959.96f, 3135.96f, 3322.44f, 3520.00f, 3729.31f, 3951.07f, - 4186.01f, 4434.92f, 4698.64f, 4978.03f, 5274.04f, 5587.65f, 5919.91f, 6271.92f, 6644.87f, 7040.00f, 7458.62f, 7902.13f, - 8372.01f, 8869.84f, 9397.27f, 9956.06f, 10548.08f, 11175.30f, 11839.82f, 12543.85f, 13289.75f, 14080.00f, 14917.24f, 15804.26f -}; - -#define OUTPUTRATE 48000 -#define SPECTRUMSIZE 8192 -#define SPECTRUMRANGE ((float)OUTPUTRATE / 2.0f) /* 0 to nyquist */ - -#define BINSIZE (SPECTRUMRANGE / (float)SPECTRUMSIZE) - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system = 0; - FMOD_SOUND *sound = 0; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - FMOD_CREATESOUNDEXINFO exinfo; - int key, driver, recorddriver, numdrivers, count, outputfreq, bin; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - /* - System initialization - */ - printf("---------------------------------------------------------\n"); - printf("Select OUTPUT type\n"); - printf("---------------------------------------------------------\n"); - printf("1 : OSS - Open Sound System\n"); - printf("2 : ALSA - Advanced Linux Sound Architecture\n"); - printf("3 : ESD - Enlightenment Sound Daemon\n"); - printf("4 : PULSEAUDIO - Pulse Audio Sound Server\n"); - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - } while (key != 27 && key < '1' && key > '5'); - - switch (key) - { - case '1' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_OSS); - break; - case '2' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_ALSA); - break; - case '3' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_ESD); - break; - case '4' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_PULSEAUDIO); - break; - default : return 1; - } - ERRCHECK(result); - - /* - Enumerate playback devices - */ - - result = FMOD_System_GetNumDrivers(system, &numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Choose a PLAYBACK driver\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = FMOD_System_GetDriverInfo(system, count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - if (key == 27) - { - return 0; - } - driver = key - '1'; - } while (driver < 0 || driver >= numdrivers); - - result = FMOD_System_SetDriver(system, driver); - ERRCHECK(result); - - /* - Enumerate record devices - */ - - result = FMOD_System_GetRecordNumDrivers(system, &numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Choose a RECORD driver\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = FMOD_System_GetRecordDriverInfo(system, count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - recorddriver = 0; - do - { - key = getch(); - if (key == 27) - { - return 0; - } - recorddriver = key - '1'; - } while (recorddriver < 0 || recorddriver >= numdrivers); - - printf("\n"); - - result = FMOD_System_SetSoftwareFormat(system, OUTPUTRATE, FMOD_SOUND_FORMAT_PCM16, 1, 0, FMOD_DSP_RESAMPLER_LINEAR); - ERRCHECK(result); - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - FMOD_System_GetSoftwareFormat(system, &outputfreq, 0, 0, 0, 0, 0); - ERRCHECK(result); - - /* - Create a sound to record to. - */ - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.numchannels = 1; - exinfo.format = FMOD_SOUND_FORMAT_PCM16; - exinfo.defaultfrequency = OUTPUTRATE; - exinfo.length = exinfo.defaultfrequency * sizeof(short) * exinfo.numchannels * 5; - - result = FMOD_System_CreateSound(system, 0, FMOD_2D | FMOD_SOFTWARE | FMOD_LOOP_NORMAL | FMOD_OPENUSER, &exinfo, &sound); - ERRCHECK(result); - - /* - Start the interface - */ - printf("=========================================================================\n"); - printf("Pitch detection example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("=========================================================================\n"); - printf("\n"); - printf("Record something through the selected recording device and FMOD will\n"); - printf("Determine the pitch. Sustain the tone for at least a second to get an\n"); - printf("accurate reading.\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - result = FMOD_System_RecordStart(system, recorddriver, sound, TRUE); - ERRCHECK(result); - - Sleep(200); /* Give it some time to record something */ - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_REUSE, sound, FALSE, &channel); - ERRCHECK(result); - - /* Dont hear what is being recorded otherwise it will feedback. Spectrum analysis is done before volume scaling in the DSP chain */ - result = FMOD_Channel_SetVolume(channel, 0); - ERRCHECK(result); - - bin = 0; - - /* - Main loop. - */ - do - { - static float spectrum[SPECTRUMSIZE]; - float dominanthz = 0; - float max; - int dominantnote = 0; - float binsize = BINSIZE; - - if (kbhit()) - { - key = getch(); - } - - result = FMOD_Channel_GetSpectrum(channel, spectrum, SPECTRUMSIZE, 0, FMOD_DSP_FFT_WINDOW_TRIANGLE); - ERRCHECK(result); - - max = 0; - - for (count = 0; count < SPECTRUMSIZE; count++) - { - if (spectrum[count] > 0.01f && spectrum[count] > max) - { - max = spectrum[count]; - bin = count; - } - } - - dominanthz = (float)bin * BINSIZE; /* dominant frequency min */ - - dominantnote = 0; - for (count = 0; count < 120; count++) - { - if (dominanthz >= notefreq[count] && dominanthz < notefreq[count + 1]) - { - /* which is it closer to. This note or the next note */ - if (fabs(dominanthz - notefreq[count]) < fabs(dominanthz - notefreq[count+1])) - { - dominantnote = count; - } - else - { - dominantnote = count + 1; - } - break; - } - } - - printf("Detected rate : %7.1f -> %7.1f hz. Detected musical note. %-3s (%7.1f hz)\r", dominanthz, ((float)bin + 0.99f) * BINSIZE, note[dominantnote], notefreq[dominantnote]); - fflush(stdout); - - FMOD_System_Update(system); - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/pitchdetection/main.cpp b/CocosDenshion/third_party/fmod/examples/pitchdetection/main.cpp deleted file mode 100644 index 80c7bef09e..0000000000 --- a/CocosDenshion/third_party/fmod/examples/pitchdetection/main.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/*=============================================================================================== - Pitch detection example. - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example combines recording with spectrum analysis to determine the pitch of the sound - being recorded. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -#include -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -static const char *note[120] = -{ - "C 0", "C#0", "D 0", "D#0", "E 0", "F 0", "F#0", "G 0", "G#0", "A 0", "A#0", "B 0", - "C 1", "C#1", "D 1", "D#1", "E 1", "F 1", "F#1", "G 1", "G#1", "A 1", "A#1", "B 1", - "C 2", "C#2", "D 2", "D#2", "E 2", "F 2", "F#2", "G 2", "G#2", "A 2", "A#2", "B 2", - "C 3", "C#3", "D 3", "D#3", "E 3", "F 3", "F#3", "G 3", "G#3", "A 3", "A#3", "B 3", - "C 4", "C#4", "D 4", "D#4", "E 4", "F 4", "F#4", "G 4", "G#4", "A 4", "A#4", "B 4", - "C 5", "C#5", "D 5", "D#5", "E 5", "F 5", "F#5", "G 5", "G#5", "A 5", "A#5", "B 5", - "C 6", "C#6", "D 6", "D#6", "E 6", "F 6", "F#6", "G 6", "G#6", "A 6", "A#6", "B 6", - "C 7", "C#7", "D 7", "D#7", "E 7", "F 7", "F#7", "G 7", "G#7", "A 7", "A#7", "B 7", - "C 8", "C#8", "D 8", "D#8", "E 8", "F 8", "F#8", "G 8", "G#8", "A 8", "A#8", "B 8", - "C 9", "C#9", "D 9", "D#9", "E 9", "F 9", "F#9", "G 9", "G#9", "A 9", "A#9", "B 9" -}; - -static const float notefreq[120] = -{ - 16.35f, 17.32f, 18.35f, 19.45f, 20.60f, 21.83f, 23.12f, 24.50f, 25.96f, 27.50f, 29.14f, 30.87f, - 32.70f, 34.65f, 36.71f, 38.89f, 41.20f, 43.65f, 46.25f, 49.00f, 51.91f, 55.00f, 58.27f, 61.74f, - 65.41f, 69.30f, 73.42f, 77.78f, 82.41f, 87.31f, 92.50f, 98.00f, 103.83f, 110.00f, 116.54f, 123.47f, - 130.81f, 138.59f, 146.83f, 155.56f, 164.81f, 174.61f, 185.00f, 196.00f, 207.65f, 220.00f, 233.08f, 246.94f, - 261.63f, 277.18f, 293.66f, 311.13f, 329.63f, 349.23f, 369.99f, 392.00f, 415.30f, 440.00f, 466.16f, 493.88f, - 523.25f, 554.37f, 587.33f, 622.25f, 659.26f, 698.46f, 739.99f, 783.99f, 830.61f, 880.00f, 932.33f, 987.77f, - 1046.50f, 1108.73f, 1174.66f, 1244.51f, 1318.51f, 1396.91f, 1479.98f, 1567.98f, 1661.22f, 1760.00f, 1864.66f, 1975.53f, - 2093.00f, 2217.46f, 2349.32f, 2489.02f, 2637.02f, 2793.83f, 2959.96f, 3135.96f, 3322.44f, 3520.00f, 3729.31f, 3951.07f, - 4186.01f, 4434.92f, 4698.64f, 4978.03f, 5274.04f, 5587.65f, 5919.91f, 6271.92f, 6644.87f, 7040.00f, 7458.62f, 7902.13f, - 8372.01f, 8869.84f, 9397.27f, 9956.06f, 10548.08f, 11175.30f, 11839.82f, 12543.85f, 13289.75f, 14080.00f, 14917.24f, 15804.26f -}; - -#define OUTPUTRATE 48000 -#define SPECTRUMSIZE 8192 -#define SPECTRUMRANGE ((float)OUTPUTRATE / 2.0f) /* 0 to nyquist */ - -#define BINSIZE (SPECTRUMRANGE / (float)SPECTRUMSIZE) - -int main(int argc, char *argv[]) -{ - FMOD::System *system = 0; - FMOD::Sound *sound = 0; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - FMOD_CREATESOUNDEXINFO exinfo; - int key, driver, recorddriver, numdrivers, count, outputfreq, bin; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - /* - System initialization - */ - printf("---------------------------------------------------------\n"); - printf("Select OUTPUT type\n"); - printf("---------------------------------------------------------\n"); - printf("1 : OSS - Open Sound System\n"); - printf("2 : ALSA - Advanced Linux Sound Architecture\n"); - printf("3 : ESD - Enlightenment Sound Daemon\n"); - printf("4 : PULSEAUDIO - Pulse Audio Sound Server\n"); - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - } while (key != 27 && key < '1' && key > '5'); - - switch (key) - { - case '1' : result = system->setOutput(FMOD_OUTPUTTYPE_OSS); - break; - case '2' : result = system->setOutput(FMOD_OUTPUTTYPE_ALSA); - break; - case '3' : result = system->setOutput(FMOD_OUTPUTTYPE_ESD); - break; - case '4' : result = system->setOutput(FMOD_OUTPUTTYPE_PULSEAUDIO); - break; - default : return 1; - } - ERRCHECK(result); - - /* - Enumerate playback devices - */ - - result = system->getNumDrivers(&numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Choose a PLAYBACK driver\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = system->getDriverInfo(count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - if (key == 27) - { - return 0; - } - driver = key - '1'; - } while (driver < 0 || driver >= numdrivers); - - result = system->setDriver(driver); - ERRCHECK(result); - - /* - Enumerate record devices - */ - - result = system->getRecordNumDrivers(&numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Choose a RECORD driver\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = system->getRecordDriverInfo(count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - recorddriver = 0; - do - { - key = getch(); - if (key == 27) - { - return 0; - } - recorddriver = key - '1'; - } while (recorddriver < 0 || recorddriver >= numdrivers); - - printf("\n"); - - result = system->setSoftwareFormat(OUTPUTRATE, FMOD_SOUND_FORMAT_PCM16, 1, 0, FMOD_DSP_RESAMPLER_LINEAR); - ERRCHECK(result); - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - system->getSoftwareFormat(&outputfreq, 0, 0, 0, 0, 0); - ERRCHECK(result); - - /* - Create a sound to record to. - */ - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.numchannels = 1; - exinfo.format = FMOD_SOUND_FORMAT_PCM16; - exinfo.defaultfrequency = OUTPUTRATE; - exinfo.length = exinfo.defaultfrequency * sizeof(short) * exinfo.numchannels * 5; - - result = system->createSound(0, FMOD_2D | FMOD_SOFTWARE | FMOD_LOOP_NORMAL | FMOD_OPENUSER, &exinfo, &sound); - ERRCHECK(result); - - /* - Start the interface - */ - printf("=========================================================================\n"); - printf("Pitch detection example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("=========================================================================\n"); - printf("\n"); - printf("Record something through the selected recording device and FMOD will\n"); - printf("Determine the pitch. Sustain the tone for at least a second to get an\n"); - printf("accurate reading.\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - result = system->recordStart(recorddriver, sound, true); - ERRCHECK(result); - - Sleep(200); /* Give it some time to record something */ - - result = system->playSound(FMOD_CHANNEL_REUSE, sound, false, &channel); - ERRCHECK(result); - - /* Dont hear what is being recorded otherwise it will feedback. Spectrum analysis is done before volume scaling in the DSP chain */ - result = channel->setVolume(0); - ERRCHECK(result); - - bin = 0; - - /* - Main loop. - */ - do - { - static float spectrum[SPECTRUMSIZE]; - float dominanthz = 0; - float max; - int dominantnote = 0; - float binsize = BINSIZE; - - if (kbhit()) - { - key = getch(); - } - - result = channel->getSpectrum(spectrum, SPECTRUMSIZE, 0, FMOD_DSP_FFT_WINDOW_TRIANGLE); - ERRCHECK(result); - - max = 0; - - for (count = 0; count < SPECTRUMSIZE; count++) - { - if (spectrum[count] > 0.01f && spectrum[count] > max) - { - max = spectrum[count]; - bin = count; - } - } - - dominanthz = (float)bin * BINSIZE; /* dominant frequency min */ - - dominantnote = 0; - for (count = 0; count < 120; count++) - { - if (dominanthz >= notefreq[count] && dominanthz < notefreq[count + 1]) - { - /* which is it closer to. This note or the next note */ - if (fabs(dominanthz - notefreq[count]) < fabs(dominanthz - notefreq[count+1])) - { - dominantnote = count; - } - else - { - dominantnote = count + 1; - } - break; - } - } - - printf("Detected rate : %7.1f -> %7.1f hz. Detected musical note. %-3s (%7.1f hz)\r", dominanthz, ((float)bin + 0.99f) * BINSIZE, note[dominantnote], notefreq[dominantnote]); - fflush(stdout); - - system->update(); - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/playlist/Makefile b/CocosDenshion/third_party/fmod/examples/playlist/Makefile deleted file mode 100644 index 965bf1fcf5..0000000000 --- a/CocosDenshion/third_party/fmod/examples/playlist/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -playlist_cpp: main.cpp - g++ -O3 -o playlist main.cpp ../../api/lib/libfmodex.so -pthread - -playlist_c: main.c - g++ -O3 -o playlist main.c ../../api/lib/libfmodex.so -pthread - -run: - ./playlist - -clean: - rm -f playlist diff --git a/CocosDenshion/third_party/fmod/examples/playlist/main.c b/CocosDenshion/third_party/fmod/examples/playlist/main.c deleted file mode 100644 index 636d5b91fc..0000000000 --- a/CocosDenshion/third_party/fmod/examples/playlist/main.c +++ /dev/null @@ -1,254 +0,0 @@ -/*=============================================================================================== - PlayList Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to load a playlist and play the sounds in a playlist. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system = 0; - FMOD_SOUND *playlist = 0; - FMOD_SOUND *sound = 0; - FMOD_CHANNEL *channel = 0; - FMOD_TAG tag; - FMOD_RESULT result; - FMOD_SOUND_TYPE soundtype; - FMOD_BOOL isplaylist = 0; - char *title = NULL; - int count = 0; - int key; - unsigned int version; - char file[128]; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/playlist.m3u", FMOD_DEFAULT, 0, &playlist); - ERRCHECK(result); - - result = FMOD_Sound_GetFormat(playlist, &soundtype, 0, 0, 0); - ERRCHECK(result); - - isplaylist = (soundtype == FMOD_SOUND_TYPE_PLAYLIST); - - printf("===================================================================\n"); - printf("PlayList Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===================================================================\n"); - printf("\n"); - printf("Press 'n' to play next sound in playlist\n"); - printf("Press 'space' to pause/unpause current sound\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - if (isplaylist) - { - printf("PLAYLIST loaded.\n"); - /* - Get the first song in the playlist, create the sound and then play it. - */ - result = FMOD_Sound_GetTag(playlist, "FILE", count, &tag); - ERRCHECK(result); - - sprintf(file, "../media/%s", (char *)tag.data); - - result = FMOD_System_CreateSound(system, file, FMOD_DEFAULT, 0, &sound); - ERRCHECK(result); - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, &channel); - ERRCHECK(result); - - FMOD_Sound_GetTag(playlist, "TITLE", count, &tag); - title = (char *)tag.data; - - count++; - } - else - { - printf("SOUND loaded.\n"); - - /* - This is just a normal sound, so just play it. - */ - sound = playlist; - - result = FMOD_Sound_SetMode(sound, FMOD_LOOP_NORMAL); - ERRCHECK(result); - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, &channel); - ERRCHECK(result); - } - - printf("\n"); - - /* - Main loop. - */ - do - { - FMOD_BOOL isplaying = 0; - - if (channel && isplaylist) - { - /* - When sound has finished playing, play the next sound in the playlist - */ - - FMOD_Channel_IsPlaying(channel, &isplaying); - if (!isplaying) - { - if (sound) - { - FMOD_Sound_Release(sound); - - sound = NULL; - } - - result = FMOD_Sound_GetTag(playlist, "FILE", count, &tag); - if (result != FMOD_OK) - { - count = 0; - } - else - { - printf("playing next song in playlist...\n"); - - sprintf(file, "../media/%s", (char *)tag.data); - - result = FMOD_System_CreateSound(system, file, FMOD_DEFAULT, 0, &sound); - ERRCHECK(result); - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, &channel); - ERRCHECK(result); - - FMOD_Sound_GetTag(playlist, "TITLE", count, &tag); - title = (char *)tag.data; - - count++; - } - } - } - - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'n' : - { - /* - Play the next song in the playlist - */ - if (channel && isplaylist) - { - FMOD_Channel_Stop(channel); - } - - break; - } - case ' ' : - { - if (channel) - { - FMOD_BOOL paused; - - FMOD_Channel_GetPaused(channel, &paused); - FMOD_Channel_SetPaused(channel, !paused); - } - } - } - } - - FMOD_System_Update(system); - - { - unsigned int ms = 0; - unsigned int lenms = 0; - FMOD_BOOL paused = 0; - - if (channel) - { - if (sound) - { - result = FMOD_Sound_GetLength(sound, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - - result = FMOD_Channel_GetPaused(channel, &paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s : %s\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : "Playing ", title); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - if (sound) - { - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - } - if (isplaylist) - { - result = FMOD_Sound_Release(playlist); - ERRCHECK(result); - } - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/playlist/main.cpp b/CocosDenshion/third_party/fmod/examples/playlist/main.cpp deleted file mode 100644 index 056a816352..0000000000 --- a/CocosDenshion/third_party/fmod/examples/playlist/main.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/*=============================================================================================== - PlayList Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to load a playlist and play the sounds in a playlist. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system = 0; - FMOD::Sound *playlist = 0; - FMOD::Sound *sound = 0; - FMOD::Channel *channel = 0; - FMOD_TAG tag; - FMOD_RESULT result; - FMOD_SOUND_TYPE soundtype; - bool isplaylist = false; - char *title = NULL; - int count = 0; - int key; - unsigned int version; - char file[128]; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->createSound("../media/playlist.m3u", FMOD_DEFAULT, 0, &playlist); - ERRCHECK(result); - - result = playlist->getFormat(&soundtype, 0, 0, 0); - ERRCHECK(result); - - isplaylist = (soundtype == FMOD_SOUND_TYPE_PLAYLIST); - - printf("===================================================================\n"); - printf("PlayList Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===================================================================\n"); - printf("\n"); - printf("Press 'n' to play next sound in playlist\n"); - printf("Press 'space' to pause/unpause current sound\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - if (isplaylist) - { - printf("PLAYLIST loaded.\n"); - /* - Get the first song in the playlist, create the sound and then play it. - */ - result = playlist->getTag("FILE", count, &tag); - ERRCHECK(result); - - sprintf(file, "../media/%s", (char *)tag.data); - - result = system->createSound(file, FMOD_DEFAULT, 0, &sound); - ERRCHECK(result); - - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - - playlist->getTag("TITLE", count, &tag); - title = (char *)tag.data; - - count++; - } - else - { - printf("SOUND loaded.\n"); - - /* - This is just a normal sound, so just play it. - */ - sound = playlist; - - result = sound->setMode(FMOD_LOOP_NORMAL); - ERRCHECK(result); - - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - } - - printf("\n"); - - /* - Main loop. - */ - do - { - bool isplaying = false; - - if (channel && isplaylist) - { - /* - When sound has finished playing, play the next sound in the playlist - */ - - channel->isPlaying(&isplaying); - if (!isplaying) - { - if (sound) - { - sound->release(); - - sound = NULL; - } - - result = playlist->getTag("FILE", count, &tag); - if (result != FMOD_OK) - { - count = 0; - } - else - { - printf("playing next song in playlist...\n"); - - sprintf(file, "../media/%s", (char *)tag.data); - - result = system->createSound(file, FMOD_DEFAULT, 0, &sound); - ERRCHECK(result); - - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - - playlist->getTag("TITLE", count, &tag); - title = (char *)tag.data; - - count++; - } - } - } - - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'n' : - { - /* - Play the next song in the playlist - */ - if (channel && isplaylist) - { - channel->stop(); - } - - break; - } - case ' ' : - { - if (channel) - { - bool paused; - - channel->getPaused(&paused); - channel->setPaused(!paused); - } - } - } - } - - system->update(); - - { - unsigned int ms = 0; - unsigned int lenms = 0; - bool paused = 0; - - if (channel) - { - if (sound) - { - result = sound->getLength(&lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - - result = channel->getPaused(&paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s : %s\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : "Playing ", title); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - if (sound) - { - result = sound->release(); - ERRCHECK(result); - } - if (isplaylist) - { - result = playlist->release(); - ERRCHECK(result); - } - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/playlist/playlist b/CocosDenshion/third_party/fmod/examples/playlist/playlist deleted file mode 100755 index f31d786e9d442ec1664a9511e90cfcbcd8f4f877..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21196 zcmd6Pe|%iUb?=qEHVbi(0uCj`fr}%@a$~P0|H5|6i-okp3i`1~Yhx0J@%fg8+=gPq0? zz3=zT%wwjt6%Un~esTQFVJAD2n$RBD} zB}**Zy4Y&4uCZoW)A5L9OSS?B$wmdHX?W&Cnu-(#9KOrvXSy6P6U*>e5;Ds|U8Z~g zn`JSvzE!8nj{!dRJ)fWHAynEh#gcYej$7*_%1@$<=`>&_^2Iio;;0ix+f1#1nM_&e z=Y`m@>p}lJppR6KGA2`gGs*#;bs73StncBEeP?2QWY)rDqHkd`wjh~E7Y76ROkj~J z1M5{_@zPtD4z+K73}_YC|0F?uQD%R}hV(`FuRY~9;Qw9)-{ygdKd-9(Q#E*~FP49% z3jS3UyrZiANEMu{foWdsVe^)!whorv#bi9T~+_fRpq}^)!!Sd@L#XOUshHA zxhj5kRl!~xAb&@z%D+)XKU_tBOBMY4Rrn89l|Kb|)r;_FxazF8CvO9M;E2ypoBset z>mz`-0XF5A1AgtRro7Jjc2#*7;N713$53(ac2)l}jDp9}pZ%y$dY56e9)>)Rz-KEM ze*=Mq`0r#B${Qv6`cs*hOLt^NKGn6Pt+TszS?^H3;HH)&(uqP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FSsv`^X;~9&xv8m1zi#eb+Yv5_qkK-0dN=jnj+F8qN96(;c$M6h&j2&09i4rs)9TfpBai6k$`sLsNMhOYWdV4cNH!WN#Ea?8 NfxbaY9j7E({{IPc**gFL diff --git a/CocosDenshion/third_party/fmod/examples/playsound/Makefile b/CocosDenshion/third_party/fmod/examples/playsound/Makefile deleted file mode 100644 index 02ae25b3b3..0000000000 --- a/CocosDenshion/third_party/fmod/examples/playsound/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -playsound_cpp: main.cpp - g++ -O3 -o playsound main.cpp ../../api/lib/libfmodex.so -pthread - -playsound_c: main.c - gcc -O3 -o playsound main.c ../../api/lib/libfmodex.so -pthread - -run: - ./playsound - -clean: - rm -f playsound diff --git a/CocosDenshion/third_party/fmod/examples/playsound/main.c b/CocosDenshion/third_party/fmod/examples/playsound/main.c deleted file mode 100644 index 56a4acaaf4..0000000000 --- a/CocosDenshion/third_party/fmod/examples/playsound/main.c +++ /dev/null @@ -1,184 +0,0 @@ -/*=============================================================================================== - PlaySound Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to simply load and play multiple sounds. This is about the simplest - use of FMOD. - This makes FMOD decode the into memory when it loads. If the sounds are big and possibly take - up a lot of ram, then it would be better to use the FMOD_CREATESTREAM flag so that it is - streamed in realtime as it plays. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound1, *sound2, *sound3; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/drumloop.wav", FMOD_SOFTWARE, 0, &sound1); - ERRCHECK(result); - result = FMOD_Sound_SetMode(sound1, FMOD_LOOP_OFF); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/jaguar.wav", FMOD_SOFTWARE, 0, &sound2); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/swish.wav", FMOD_SOFTWARE, 0, &sound3); - ERRCHECK(result); - - printf("===================================================================\n"); - printf("PlaySound Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===================================================================\n"); - printf("\n"); - printf("Press '1' to Play a mono sound using hardware mixing\n"); - printf("Press '2' to Play a mono sound using software mixing\n"); - printf("Press '3' to Play a stereo sound using hardware mixing\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case '1' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound1, 0, &channel); - ERRCHECK(result); - break; - } - case '2' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound2, 0, &channel); - ERRCHECK(result); - break; - } - case '3' : - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound3, 0, &channel); - ERRCHECK(result); - break; - } - } - } - - FMOD_System_Update(system); - - { - unsigned int ms = 0; - unsigned int lenms = 0; - int playing = 0; - int paused = 0; - int channelsplaying = 0; - - if (channel) - { - FMOD_SOUND *currentsound = 0; - - result = FMOD_Channel_IsPlaying(channel, &playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPaused(channel, &paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - FMOD_Channel_GetCurrentSound(channel, ¤tsound); - if (currentsound) - { - result = FMOD_Sound_GetLength(currentsound, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - } - - result = FMOD_Sound_GetLength(sound1, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - FMOD_System_GetChannelsPlaying(system, &channelsplaying); - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s : Channels Playing %2d\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped", channelsplaying); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound1); - ERRCHECK(result); - result = FMOD_Sound_Release(sound2); - ERRCHECK(result); - result = FMOD_Sound_Release(sound3); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/playsound/main.cpp b/CocosDenshion/third_party/fmod/examples/playsound/main.cpp deleted file mode 100644 index 9d979cee49..0000000000 --- a/CocosDenshion/third_party/fmod/examples/playsound/main.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/*=============================================================================================== - PlaySound Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to simply load and play multiple sounds. This is about the simplest - use of FMOD. - This makes FMOD decode the into memory when it loads. If the sounds are big and possibly take - up a lot of ram, then it would be better to use the FMOD_CREATESTREAM flag so that it is - streamed in realtime as it plays. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound1, *sound2, *sound3; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = system->setOutput(FMOD_OUTPUTTYPE_ALSA); - ERRCHECK(result); - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->createSound("../media/drumloop.wav", FMOD_SOFTWARE, 0, &sound1); - ERRCHECK(result); - result = sound1->setMode(FMOD_LOOP_OFF); - ERRCHECK(result); - - result = system->createSound("../media/jaguar.wav", FMOD_SOFTWARE, 0, &sound2); - ERRCHECK(result); - - result = system->createSound("../media/swish.wav", FMOD_SOFTWARE, 0, &sound3); - ERRCHECK(result); - - printf("===================================================================\n"); - printf("PlaySound Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===================================================================\n"); - printf("\n"); - printf("Press '1' to Play a mono sound using software mixing\n"); - printf("Press '2' to Play a mono sound using software mixing\n"); - printf("Press '3' to Play a stereo sound using software mixing\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case '1' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound1, 0, &channel); - ERRCHECK(result); - break; - } - case '2' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound2, 0, &channel); - ERRCHECK(result); - break; - } - case '3' : - { - result = system->playSound(FMOD_CHANNEL_FREE, sound3, 0, &channel); - ERRCHECK(result); - break; - } - } - } - - system->update(); - - { - unsigned int ms = 0; - unsigned int lenms = 0; - bool playing = 0; - bool paused = 0; - int channelsplaying = 0; - - if (channel) - { - FMOD::Sound *currentsound = 0; - - result = channel->isPlaying(&playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPaused(&paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - channel->getCurrentSound(¤tsound); - if (currentsound) - { - result = currentsound->getLength(&lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - } - - system->getChannelsPlaying(&channelsplaying); - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s : Channels Playing %2d\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped", channelsplaying); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound1->release(); - ERRCHECK(result); - result = sound2->release(); - ERRCHECK(result); - result = sound3->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/playsound/playsound b/CocosDenshion/third_party/fmod/examples/playsound/playsound deleted file mode 100755 index 4264b19a3d384c60bcc22a71c97e55b1f91357f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21100 zcmeHveRLhgm1oO(1{sX45R);9Aq|mZdt;s@e_=c(k&vE{5`7`b#tg)d)_X0zw%-@8 z`&kl)Gh;{A#EvoRO*k3yv8=seW-=QFoJl4zAOg@-MUqE@2y+6>UH-YC3-sR>gp_W&9Uk&V#NcohP6l! zwW*S|mTk?mmRs+&mROe{i)Cwffd*is0%0!lVt{(UF!15su?E6BffHDUYyl*eg}Q{V z{=Q`qSl?1zX_w`=wa%dY49W;+ffLv-wn50CP6llgI)D>Q z*}yA7+CqEQlV~5%gj<3szm4VRxeWh7lt=r=u@hJyiM1;0jjYP1Z^(N2@es0LqT#Z}y(L{2yNb)0cL?a`ed4|NWZ9%Rc+=ol8-+9KbfN z2C#1Qx&{dAlNT@Y~X344{t8#Xj-663_&=7VvJsdjanNGyr(L zPbF{bujn^IIZxleKa#f~a(@}_DKlQz1Fiu49+AjpDe0{O}#TquOi1zMUoNJdfCa)_btlr4MP4$)f>T&a9K}K~eIhHHrlYZcof@IRd z(&q>1)CWGmb#J|uOpZ-VB#Yo*$U9jtm`v_$CQVKi<8CaKO8UfFm|qMs7*(3M(4{n+ z?tZk8_VP*Ei8VT!E&CZTFP6M~Fq%wdb^t*aQagB`9Cf^`<--_KfhEG{iU?WxwAH?K zYuhc|$(HyU>(-v`TiTPW<7>ma=J0M!B$u?jDlQ++L9Q6qaQ-uxNh>QT%VLNG2>hqg zOXU6#7;@dT0pELk2P$1+eMYk;(RM z{(Fhfv7XWVPXEtX!zJhpec;?CH84e;`Ak9I$P@w0BBlsV7BhvH zTf!7A*h~=sG%-csvYaUv^_5J~<7TD^7S=LFu(E+E2C#`K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gM(Fqrk0Kh|M1kt7QKt_fHT?L#`J))b5<`U4wEM88<9JVk?j-2! z>nnt|zWp<#I z=k|}ZFGc9+`_F)G5Aw`K8o~^~@SA{-o@hOnA4sg90@yy=-37W`t(Nt9+?&hRH@`qi ze#Vwa_dZ?5gk=P-Ipk%oFSH_FH3(AD@M0>u70j|GIx&wRsB3|*0dNeoE!upP-*Y{d z^#~n=z6?KuM^pMO;`O>!`X_~}mg$ESu3DhKQ8-(N4B=N4t{SBOP&hTJ{Di`lHq9DZ zuPux7UX^ncYJMx6E4o^v6|N?f`EEnKLF>s-CHKydS2hkE(qi<(a? zs29oM2J=DT)C%TLh%+Kk^MGl+_UyEGg)@?XKL~LZahP?!UcQc^>{QV+;!v@O!ZE3F z(e4z^ugfU=Quwml z{23D1^#be5ywMlO^9|hdC7dRtEPoCuU+3X|j{P}-l<%+ZLPzSLzaIeSn<%EguK?$K zM`G2@S#13pDPu2%Uv2S4AtNtq&O0r>R2Rip0yp}roAWMf9dM%`8(;rv1#T`{$46`M zao~Kvm^0x@^#9{E<&Ob3_Q~?Uj+EP|^GprS@66EubA0c>cwdT?v;8+~@Wq(2#@_iI zlWQZ+gY^8KleviVHB@sE|3nS`=Qa3~HTa1d{GV#@H-JaK%W`?dNwK{Zz*{jsEJxOr za~4>PJIuxM3E)QljgbFzP5GbH;74lkmum3$Ly&xnn{B*f&LV3KaJ~voyQe>;`-*~Bf0Hw9n zeBOkgFVP=MN%`gE`97UTj#Pg;=DgpY87(F=XPpjRd~Q;s(Ijt z1pS36>5%%7GyJv|zeJ?Ia1><`e*Gw#Y4~c9R=(wBK5%sImz!E!BVRe9zpCPw^ww`! aAICS8lEqXq$dvOt;v*B5`ht=O_}>An8Lwmj diff --git a/CocosDenshion/third_party/fmod/examples/playstream/Makefile b/CocosDenshion/third_party/fmod/examples/playstream/Makefile deleted file mode 100644 index fd1ea53df3..0000000000 --- a/CocosDenshion/third_party/fmod/examples/playstream/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -playstream_cpp: main.cpp - g++ -O3 -o playstream main.cpp ../../api/lib/libfmodex.so -pthread - -playstream_c: main.c - g++ -O3 -o playstream main.c ../../api/lib/libfmodex.so -pthread - -run: - ./playstream - -clean: - rm -f playstream diff --git a/CocosDenshion/third_party/fmod/examples/playstream/main.c b/CocosDenshion/third_party/fmod/examples/playstream/main.c deleted file mode 100644 index eab0d6d12a..0000000000 --- a/CocosDenshion/third_party/fmod/examples/playstream/main.c +++ /dev/null @@ -1,149 +0,0 @@ -/*=============================================================================================== - PlayStream Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to simply play a stream, such as an mp3 or wav. - The stream behaviour is achieved by specifying FMOD_CREATESTREAM in the call to - FMOD_System_CreateSound. - This makes FMOD decode the file in realtime as it plays, instead of loading it all at once. - This uses far less memory, in exchange for a small runtime cpu hit. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = FMOD_System_Init(system, 1, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/wave.mp3", FMOD_SOFTWARE | FMOD_2D | FMOD_CREATESTREAM, 0, &sound); - ERRCHECK(result); - - printf("====================================================================\n"); - printf("PlayStream Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("====================================================================\n"); - printf("\n"); - printf("Press space to pause, Esc to quit\n"); - printf("\n"); - - /* - Play the sound. - */ - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, &channel); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - int paused; - FMOD_Channel_GetPaused(channel, &paused); - FMOD_Channel_SetPaused(channel, !paused); - break; - } - } - } - - FMOD_System_Update(system); - - if (channel) - { - unsigned int ms; - unsigned int lenms; - int playing; - int paused; - - FMOD_Channel_IsPlaying(channel, &playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPaused(channel, &paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Sound_GetLength(sound, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped"); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/playstream/main.cpp b/CocosDenshion/third_party/fmod/examples/playstream/main.cpp deleted file mode 100644 index 5fa8235a8d..0000000000 --- a/CocosDenshion/third_party/fmod/examples/playstream/main.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/*=============================================================================================== - PlayStream Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to simply play a stream, such as an mp3 or wav. - The stream behaviour is achieved by specifying FMOD_CREATESTREAM in the call to - System::createSound. - This makes FMOD decode the file in realtime as it plays, instead of loading it all at once. - This uses far less memory, in exchange for a small runtime cpu hit. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = system->init(1, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->createSound("../media/wave.mp3", FMOD_SOFTWARE | FMOD_2D | FMOD_CREATESTREAM, 0, &sound); - ERRCHECK(result); - - printf("====================================================================\n"); - printf("PlayStream Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("====================================================================\n"); - printf("\n"); - printf("Press space to pause, Esc to quit\n"); - printf("\n"); - - /* - Play the sound. - */ - - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - bool paused; - channel->getPaused(&paused); - channel->setPaused(!paused); - break; - } - } - } - - system->update(); - - if (channel) - { - unsigned int ms; - unsigned int lenms; - bool playing; - bool paused; - - channel->isPlaying(&playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE)) - { - ERRCHECK(result); - } - - result = channel->getPaused(&paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE)) - { - ERRCHECK(result); - } - - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE)) - { - ERRCHECK(result); - } - - result = sound->getLength(&lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE)) - { - ERRCHECK(result); - } - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped"); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/plugin_dev/codec_raw/Makefile b/CocosDenshion/third_party/fmod/examples/plugin_dev/codec_raw/Makefile deleted file mode 100644 index 458ad01437..0000000000 --- a/CocosDenshion/third_party/fmod/examples/plugin_dev/codec_raw/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -all: - g++ -shared -fPIC -o codec_raw.so main.c - -clean: - rm -f codec_raw.so diff --git a/CocosDenshion/third_party/fmod/examples/plugin_dev/codec_raw/main.c b/CocosDenshion/third_party/fmod/examples/plugin_dev/codec_raw/main.c deleted file mode 100644 index 9b585b481d..0000000000 --- a/CocosDenshion/third_party/fmod/examples/plugin_dev/codec_raw/main.c +++ /dev/null @@ -1,96 +0,0 @@ -/*=============================================================================================== - CODEC_RAW.SO - Copyright (c), Firelight Technologies Pty, Ltd 2006-2011. - -===============================================================================================*/ - -#include - -#include "../../../api/inc/fmod.h" -#include "../../../api/inc/fmod_errors.h" - -FMOD_RESULT F_CALLBACK rawopen(FMOD_CODEC_STATE *codec, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO *userexinfo); -FMOD_RESULT F_CALLBACK rawclose(FMOD_CODEC_STATE *codec); -FMOD_RESULT F_CALLBACK rawread(FMOD_CODEC_STATE *codec, void *buffer, unsigned int size, unsigned int *read); -FMOD_RESULT F_CALLBACK rawsetposition(FMOD_CODEC_STATE *codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype); - -FMOD_CODEC_DESCRIPTION rawcodec = -{ - "FMOD Raw player plugin example", // Name. - 0x00010000, // Version 0xAAAABBBB A = major, B = minor. - 0, // Don't force everything using this codec to be a stream - FMOD_TIMEUNIT_PCMBYTES, // The time format we would like to accept into setposition/getposition. - &rawopen, // Open callback. - &rawclose, // Close callback. - &rawread, // Read callback. - 0, // Getlength callback. (If not specified FMOD return the length in FMOD_TIMEUNIT_PCM, FMOD_TIMEUNIT_MS or FMOD_TIMEUNIT_PCMBYTES units based on the lengthpcm member of the FMOD_CODEC structure). - &rawsetposition, // Setposition callback. - 0, // Getposition callback. (only used for timeunit types that are not FMOD_TIMEUNIT_PCM, FMOD_TIMEUNIT_MS and FMOD_TIMEUNIT_PCMBYTES). - 0 // Sound create callback (don't need it) -}; - - -/* - FMODGetCodecDescription is mandatory for every fmod plugin. This is the symbol the registerplugin function searches for. - Must be declared with F_API to make it export as stdcall. - MUST BE EXTERN'ED AS C! C++ functions will be mangled incorrectly and not load in fmod. -*/ -#ifdef __cplusplus -extern "C" { -#endif - -F_DECLSPEC F_DLLEXPORT FMOD_CODEC_DESCRIPTION * F_API FMODGetCodecDescription() -{ - return &rawcodec; -} - -#ifdef __cplusplus -} -#endif - - -static FMOD_CODEC_WAVEFORMAT rawwaveformat; - -/* - The actual codec code. - - Note that the callbacks uses FMOD's supplied file system callbacks. - - This is important as even though you might want to open the file yourself, you would lose the following benefits. - 1. Automatic support of memory files, CDDA based files, and HTTP/TCPIP based files. - 2. "fileoffset" / "length" support when user calls System::createSound with FMOD_CREATESOUNDEXINFO structure. - 3. Buffered file access. - FMOD files are high level abstracts that support all sorts of 'file', they are not just disk file handles. - If you want FMOD to use your own filesystem (and potentially lose the above benefits) use System::setFileSystem. -*/ - -FMOD_RESULT F_CALLBACK rawopen(FMOD_CODEC_STATE *codec, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO *userexinfo) -{ - rawwaveformat.channels = 2; - rawwaveformat.format = FMOD_SOUND_FORMAT_PCM16; - rawwaveformat.frequency = 44100; - rawwaveformat.blockalign = rawwaveformat.channels * 2; /* 2 = 16bit pcm */ - rawwaveformat.lengthpcm = codec->filesize / rawwaveformat.blockalign; /* bytes converted to PCM samples */; - - codec->numsubsounds = 0; /* number of 'subsounds' in this sound. For most codecs this is 0, only multi sound codecs such as FSB or CDDA have subsounds. */ - codec->waveformat = &rawwaveformat; - codec->plugindata = 0; /* user data value */ - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK rawclose(FMOD_CODEC_STATE *codec) -{ - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK rawread(FMOD_CODEC_STATE *codec, void *buffer, unsigned int size, unsigned int *read) -{ - return codec->fileread(codec->filehandle, buffer, size, read, 0); -} - -FMOD_RESULT F_CALLBACK rawsetposition(FMOD_CODEC_STATE *codec, int subsound, unsigned int position, FMOD_TIMEUNIT postype) -{ - return codec->fileseek(codec->filehandle, position, 0); -} - diff --git a/CocosDenshion/third_party/fmod/examples/plugin_dev/dsp_gain/Makefile b/CocosDenshion/third_party/fmod/examples/plugin_dev/dsp_gain/Makefile deleted file mode 100644 index 86e326acec..0000000000 --- a/CocosDenshion/third_party/fmod/examples/plugin_dev/dsp_gain/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -all: - g++ -shared -fPIC -o dsp_gain.so main.c - -clean: - rm -f dsp_gain.so diff --git a/CocosDenshion/third_party/fmod/examples/plugin_dev/dsp_gain/main.c b/CocosDenshion/third_party/fmod/examples/plugin_dev/dsp_gain/main.c deleted file mode 100644 index d0b380f376..0000000000 --- a/CocosDenshion/third_party/fmod/examples/plugin_dev/dsp_gain/main.c +++ /dev/null @@ -1,181 +0,0 @@ -/*=============================================================================================== - DSP_GAIN.SO - Copyright (c), Firelight Technologies Pty, Ltd 2006-2011. - -===============================================================================================*/ - -#include -#include - -#include "../../../api/inc/fmod.h" -#include "../../../api/inc/fmod_errors.h" - -FMOD_RESULT F_CALLBACK dspcreate (FMOD_DSP_STATE *dsp); -FMOD_RESULT F_CALLBACK dsprelease (FMOD_DSP_STATE *dsp); -FMOD_RESULT F_CALLBACK dspreset (FMOD_DSP_STATE *dsp); -FMOD_RESULT F_CALLBACK dspread (FMOD_DSP_STATE *dsp, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels); -FMOD_RESULT F_CALLBACK dspsetparam(FMOD_DSP_STATE *dsp, int index, float value); -FMOD_RESULT F_CALLBACK dspgetparam(FMOD_DSP_STATE *dsp, int index, float *value, char *valuestr); - - -/* - DSP Parameter list. -*/ -FMOD_DSP_PARAMETERDESC dspparam[1] = -{ - { 0.0f, 1.0f, 1.0, "Level", "%", "Gain level" }, -}; - - -FMOD_DSP_DESCRIPTION dspgaindesc = -{ - "FMOD gain example", // name - 0x00010000, // version 0xAAAABBBB A = major, B = minor. - 0, // 0 = we can filter whatever you throw at us. To be most user friendly, always write a filter like this. - dspcreate, // - dsprelease, // - dspreset, // - dspread, // - 0, // This is for if you want to allow the plugin to seek, which doesnt really make sense in a gain filter so we'll just leave it out. - 1, // 1 parameter. "level" - dspparam, // pointer to the parameter list definition. - dspsetparam, // - dspgetparam, // - 0, // This is for if you want to pop up a dialog box to configure the plugin. Not doing that here. - 0, // This is for if you want to pop up a dialog box to configure the plugin. Not doing that here. - 0, // This is for if you want to pop up a dialog box to configure the plugin. Not doing that here. -}; - -/* - FMODGetDSPDescription is mandantory for every fmod plugin. This is the symbol the registerplugin function searches for. - Must be declared with F_API to make it export as stdcall. - MUST BE EXTERN'ED AS C! C++ functions will be mangled incorrectly and not load in fmod. -*/ -#ifdef __cplusplus -extern "C" { -#endif - -F_DECLSPEC F_DLLEXPORT FMOD_DSP_DESCRIPTION * F_API FMODGetDSPDescription() -{ - return &dspgaindesc; -} - -#ifdef __cplusplus -} -#endif - - -typedef struct dspgain_state -{ - float gain; -} dspgain_state; - - -FMOD_RESULT F_CALLBACK dspcreate(FMOD_DSP_STATE *dsp) -{ - dspgain_state *state; - - /* - If we were allocating memory for buffers etc, it would be done in this function. - */ - - state = (dspgain_state *)malloc(sizeof(dspgain_state)); - if (!state) - { - return FMOD_ERR_MEMORY; - } - - state->gain = dspparam[0].defaultval; - - dsp->plugindata = state; - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK dsprelease(FMOD_DSP_STATE *dsp) -{ - dspgain_state *state = (dspgain_state *)dsp->plugindata; - - /* - If memory was allocated in create, it would be freed in this function. - */ - - free(state); - - return FMOD_OK; -} - - -FMOD_RESULT F_CALLBACK dspreset(FMOD_DSP_STATE *dsp) -{ - dspgain_state *state = (dspgain_state *)dsp->plugindata; - - /* - This isnt really needed here. It is used to reset a filter back to it's default state. - */ - - state->gain = dspparam[0].defaultval; - - return FMOD_OK; -} - - -/* - This callback does the work. Modify data from inbuffer and send it to outbuffer. -*/ -FMOD_RESULT F_CALLBACK dspread(FMOD_DSP_STATE *dsp, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels) -{ - dspgain_state *state = (dspgain_state *)dsp->plugindata; - unsigned int count; - int count2; - int channels = inchannels; // outchannels and inchannels will always be the same because this is a flexible filter. - - for (count = 0; count < length; count++) - { - for (count2 = 0; count2 < channels; count2++) - { - outbuffer[(count * channels) + count2] = inbuffer[(count * channels) + count2] * state->gain; - } - } - - return FMOD_OK; -} - -/* - This callback is for when the user sets a parameter. It is automatically clamped between 0 and 1. -*/ -FMOD_RESULT F_CALLBACK dspsetparam(FMOD_DSP_STATE *dsp, int index, float value) -{ - dspgain_state *state = (dspgain_state *)dsp->plugindata; - - switch (index) - { - case 0: - { - state->gain = value; - break; - } - } - return FMOD_OK; -} - -/* - This callback is for when the user gets a parameter. The label for our only parameter is percent, - so when the string is requested print it out as 0 to 100. -*/ -FMOD_RESULT F_CALLBACK dspgetparam(FMOD_DSP_STATE *dsp, int index, float *value, char *valuestr) -{ - dspgain_state *state = (dspgain_state *)dsp->plugindata; - - switch (index) - { - case 0: - { - *value = state->gain; - sprintf(valuestr, "%.02f", state->gain * 100.0f); // our units are '%', so print it out as 0 to 100. - } - } - - return FMOD_OK; -} - diff --git a/CocosDenshion/third_party/fmod/examples/readtags/Makefile b/CocosDenshion/third_party/fmod/examples/readtags/Makefile deleted file mode 100644 index b30f2105b5..0000000000 --- a/CocosDenshion/third_party/fmod/examples/readtags/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -readtags_cpp: main.cpp - g++ -O3 -o readtags main.cpp ../../api/lib/libfmodex.so - -readtags_c: main.c - g++ -O3 -o readtags main.c ../../api/lib/libfmodex.so - -run: - ./readtags - -clean: - rm -f readtags diff --git a/CocosDenshion/third_party/fmod/examples/readtags/main.c b/CocosDenshion/third_party/fmod/examples/readtags/main.c deleted file mode 100644 index f164c6fd2e..0000000000 --- a/CocosDenshion/third_party/fmod/examples/readtags/main.c +++ /dev/null @@ -1,165 +0,0 @@ -/*=============================================================================================== - ReadTags Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to read tags from sound files -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound; - FMOD_RESULT result; - FMOD_TAG tag; - int numtags, numtagsupdated, count; - unsigned int version; - - printf("==================================================================\n"); - printf("ReadTags Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==================================================================\n\n"); - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = FMOD_System_Init(system, 100, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - /* - Open the specified file. Use FMOD_CREATESTREAM and FMOD_OPENONLY so it opens quickly - */ - result = FMOD_System_CreateSound(system, "../media/wave.mp3", FMOD_SOFTWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_OPENONLY, 0, &sound); - ERRCHECK(result); - - /* - Read and display all tags associated with this file - */ - for (;;) - { - /* - An index of -1 means "get the first tag that's new or updated". - If no tags are new or updated then getTag will return FMOD_ERR_TAGNOTFOUND. - This is the first time we've read any tags so they'll all be new but after we've read them, - they won't be new any more. - */ - if (FMOD_Sound_GetTag(sound, 0, -1, &tag) != FMOD_OK) - { - break; - } - if (tag.datatype == FMOD_TAGDATATYPE_STRING) - { - printf("%s = %s (%d bytes)\n", tag.name, tag.data, tag.datalen); - } - else - { - printf("%s = (%d bytes)\n", tag.name, tag.datalen); - } - } - printf("\n"); - - /* - Read all the tags regardless of whether they're updated or not. Also show the tag type. - */ - result = FMOD_Sound_GetNumTags(sound, &numtags, &numtagsupdated); - ERRCHECK(result); - for (count=0; count < numtags; count++) - { - result = FMOD_Sound_GetTag(sound, 0, count, &tag); - ERRCHECK(result); - - switch (tag.type) - { - case FMOD_TAGTYPE_UNKNOWN : - printf("FMOD_TAGTYPE_UNKNOWN "); - break; - - case FMOD_TAGTYPE_ID3V1 : - printf("FMOD_TAGTYPE_ID3V1 "); - break; - - case FMOD_TAGTYPE_ID3V2 : - printf("FMOD_TAGTYPE_ID3V2 "); - break; - - case FMOD_TAGTYPE_VORBISCOMMENT : - printf("FMOD_TAGTYPE_VORBISCOMMENT "); - break; - - case FMOD_TAGTYPE_SHOUTCAST : - printf("FMOD_TAGTYPE_SHOUTCAST "); - break; - - case FMOD_TAGTYPE_ICECAST : - printf("FMOD_TAGTYPE_ICECAST "); - break; - - case FMOD_TAGTYPE_ASF : - printf("FMOD_TAGTYPE_ASF "); - break; - - case FMOD_TAGTYPE_FMOD : - printf("FMOD_TAGTYPE_FMOD "); - break; - - case FMOD_TAGTYPE_USER : - printf("FMOD_TAGTYPE_USER "); - break; - } - - if (tag.datatype == FMOD_TAGDATATYPE_STRING) - { - printf("%s = %s (%d bytes)\n", tag.name, tag.data, tag.datalen); - } - else - { - printf("%s = ??? (%d bytes)\n", tag.name, tag.datalen); - } - } - printf("\n"); - - /* - Find a specific tag by name. Specify an index > 0 to get access to multiple tags of the same name. - */ - result = FMOD_Sound_GetTag(sound, "ARTIST", 0, &tag); - ERRCHECK(result); - printf("%s = %s (%d bytes)\n", tag.name, tag.data, tag.datalen); - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/readtags/main.cpp b/CocosDenshion/third_party/fmod/examples/readtags/main.cpp deleted file mode 100644 index 8a1ed8bdd7..0000000000 --- a/CocosDenshion/third_party/fmod/examples/readtags/main.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/*=============================================================================================== - ReadTags Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to read tags from sound files -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound; - FMOD_RESULT result; - FMOD_TAG tag; - int numtags, numtagsupdated, count; - unsigned int version; - - printf("==================================================================\n"); - printf("ReadTags Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==================================================================\n\n"); - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - result = system->init(100, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - /* - Open the specified file. Use FMOD_CREATESTREAM and FMOD_OPENONLY so it opens quickly - */ - result = system->createSound("../media/wave.mp3", FMOD_SOFTWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_OPENONLY, 0, &sound); - ERRCHECK(result); - - /* - Read and display all tags associated with this file - */ - for (;;) - { - /* - An index of -1 means "get the first tag that's new or updated". - If no tags are new or updated then getTag will return FMOD_ERR_TAGNOTFOUND. - This is the first time we've read any tags so they'll all be new but after we've read them, - they won't be new any more. - */ - if (sound->getTag(0, -1, &tag) != FMOD_OK) - { - break; - } - if (tag.datatype == FMOD_TAGDATATYPE_STRING) - { - printf("%s = %s (%d bytes)\n", tag.name, tag.data, tag.datalen); - } - else - { - printf("%s = (%d bytes)\n", tag.name, tag.datalen); - } - } - printf("\n"); - - /* - Read all the tags regardless of whether they're updated or not. Also show the tag type. - */ - result = sound->getNumTags(&numtags, &numtagsupdated); - ERRCHECK(result); - for (count=0; count < numtags; count++) - { - result = sound->getTag(0, count, &tag); - ERRCHECK(result); - - switch (tag.type) - { - case FMOD_TAGTYPE_UNKNOWN : - printf("FMOD_TAGTYPE_UNKNOWN "); - break; - - case FMOD_TAGTYPE_ID3V1 : - printf("FMOD_TAGTYPE_ID3V1 "); - break; - - case FMOD_TAGTYPE_ID3V2 : - printf("FMOD_TAGTYPE_ID3V2 "); - break; - - case FMOD_TAGTYPE_VORBISCOMMENT : - printf("FMOD_TAGTYPE_VORBISCOMMENT "); - break; - - case FMOD_TAGTYPE_SHOUTCAST : - printf("FMOD_TAGTYPE_SHOUTCAST "); - break; - - case FMOD_TAGTYPE_ICECAST : - printf("FMOD_TAGTYPE_ICECAST "); - break; - - case FMOD_TAGTYPE_ASF : - printf("FMOD_TAGTYPE_ASF "); - break; - - case FMOD_TAGTYPE_FMOD : - printf("FMOD_TAGTYPE_FMOD "); - break; - - case FMOD_TAGTYPE_USER : - printf("FMOD_TAGTYPE_USER "); - break; - } - - if (tag.datatype == FMOD_TAGDATATYPE_STRING) - { - printf("%s = %s (%d bytes)\n", tag.name, tag.data, tag.datalen); - } - else - { - printf("%s = ??? (%d bytes)\n", tag.name, tag.datalen); - } - } - printf("\n"); - - /* - Find a specific tag by name. Specify an index > 0 to get access to multiple tags of the same name. - */ - result = sound->getTag("ARTIST", 0, &tag); - ERRCHECK(result); - printf("%s = %s (%d bytes)\n", tag.name, tag.data, tag.datalen); - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/realtimestitching/Makefile b/CocosDenshion/third_party/fmod/examples/realtimestitching/Makefile deleted file mode 100644 index 38f43b13f0..0000000000 --- a/CocosDenshion/third_party/fmod/examples/realtimestitching/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -realtimestitching_cpp: main.cpp - g++ -O3 -o realtimestitching main.cpp ../../api/lib/libfmodex.so -pthread - -realtimestitching_c: main.c - g++ -O3 -o realtimestitching main.c ../../api/lib/libfmodex.so -pthread - -run: - ./realtimestitching - -clean: - rm -f realtimestitching diff --git a/CocosDenshion/third_party/fmod/examples/realtimestitching/main.c b/CocosDenshion/third_party/fmod/examples/realtimestitching/main.c deleted file mode 100644 index 52942f6c88..0000000000 --- a/CocosDenshion/third_party/fmod/examples/realtimestitching/main.c +++ /dev/null @@ -1,245 +0,0 @@ -/*=============================================================================================== - Real-time stitching example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how you can create your own multi-subsound stream, then in realtime replace - each the subsound as it plays them. Using a looping sentence, it will seamlessly stich between - 2 subsounds in this example, and each time it switches to a new sound, it will replace the old - one with another sound in our list. - - These sounds can go on forever as long as they are the same bitdepth (when decoded) and number - of channels (ie mono / stereo). The reason for this is the hardware channel cannot change - formats mid sentence, and using different hardware channels would mean it wouldn't be gapless. - -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -#define NUMSOUNDS 32 - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound; - FMOD_SOUND *subsound[2]; - FMOD_CREATESOUNDEXINFO exinfo; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - int key; - unsigned int subsoundid, sentenceid; - unsigned int version; - const char *soundname[NUMSOUNDS] = - { - "../media/e.ogg", /* Ma- */ - "../media/d.ogg", /* ry */ - "../media/c.ogg", /* had */ - "../media/d.ogg", /* a */ - "../media/e.ogg", /* lit- */ - "../media/e.ogg", /* tle */ - "../media/e.ogg", /* lamb, */ - "../media/e.ogg", /* ..... */ - "../media/d.ogg", /* lit- */ - "../media/d.ogg", /* tle */ - "../media/d.ogg", /* lamb, */ - "../media/d.ogg", /* ..... */ - "../media/e.ogg", /* lit- */ - "../media/e.ogg", /* tle */ - "../media/e.ogg", /* lamb, */ - "../media/e.ogg", /* ..... */ - - "../media/e.ogg", /* Ma- */ - "../media/d.ogg", /* ry */ - "../media/c.ogg", /* had */ - "../media/d.ogg", /* a */ - "../media/e.ogg", /* lit- */ - "../media/e.ogg", /* tle */ - "../media/e.ogg", /* lamb, */ - "../media/e.ogg", /* its */ - "../media/d.ogg", /* fleece */ - "../media/d.ogg", /* was */ - "../media/e.ogg", /* white */ - "../media/d.ogg", /* as */ - "../media/c.ogg", /* snow. */ - "../media/c.ogg", /* ..... */ - "../media/c.ogg", /* ..... */ - "../media/c.ogg", /* ..... */ - }; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 1, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - /* - Set up the FMOD_CREATESOUNDEXINFO structure for the user stream with room for 2 subsounds. (our subsound double buffer) - */ - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.defaultfrequency = 44100; - exinfo.numsubsounds = 2; - exinfo.numchannels = 1; - exinfo.format = FMOD_SOUND_FORMAT_PCM16; - - /* - Create the 'parent' stream that contains the substreams. Set it to loop so that it loops between subsound 0 and 1. - */ - result = FMOD_System_CreateStream(system, 0, FMOD_LOOP_NORMAL | FMOD_OPENUSER, &exinfo, &sound); - ERRCHECK(result); - - /* - Add 2 of our streams as children of the parent. They should be the same format (ie mono/stereo and bitdepth) as the parent sound. - When subsound 0 has finished and it is playing subsound 1, we will swap subsound 0 with a new sound, and the same for when subsound 1 has finished, - causing a continual double buffered flip, which means continuous sound. - */ - result = FMOD_System_CreateStream(system, soundname[0], FMOD_DEFAULT, 0, &subsound[0]); - ERRCHECK(result); - - result = FMOD_System_CreateStream(system, soundname[1], FMOD_DEFAULT, 0, &subsound[1]); - ERRCHECK(result); - - result = FMOD_Sound_SetSubSound(sound, 0, subsound[0]); - ERRCHECK(result); - - result = FMOD_Sound_SetSubSound(sound, 1, subsound[1]); - ERRCHECK(result); - - /* - Set up the gapless sentence to contain these first 2 streams. - */ - { - int soundlist[2] = { 0, 1 }; - - result = FMOD_Sound_SetSubSoundSentence(sound, soundlist, 2); - ERRCHECK(result); - } - - subsoundid = 0; - sentenceid = 2; /* The next sound to be appeneded to the stream. */ - - printf("=============================================================================\n"); - printf("Real-time stitching example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("=============================================================================\n"); - printf("\n"); - printf("Press space to pause, Esc to quit\n"); - printf("\n"); - - printf("Inserted subsound %d / 2 with sound %d / %d\n", 0, 0, NUMSOUNDS); - printf("Inserted subsound %d / 2 with sound %d / %d\n", 1, 1, NUMSOUNDS); - - /* - Play the sound. - */ - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, FALSE, &channel); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - unsigned int currentsubsoundid; - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - int paused; - FMOD_Channel_GetPaused(channel, &paused); - FMOD_Channel_SetPaused(channel, !paused); - break; - } - } - } - - FMOD_System_Update(system); - - /* - Replace the subsound that just finished with a new subsound, to create endless seamless stitching! - - Note that this polls the currently playing subsound using the FMOD_TIMEUNIT_BUFFERED flag. - Remember streams are decoded / buffered ahead in advance! - Don't use the 'audible time' which is FMOD_TIMEUNIT_SENTENCE_SUBSOUND by itself. When streaming, sound is - processed ahead of time, and things like stream buffer / sentence manipulation (as done below) is required - to be in 'buffered time', or else there will be synchronization problems and you might end up releasing a - sub-sound that is still playing! - */ - result = FMOD_Channel_GetPosition(channel, ¤tsubsoundid, (FMOD_TIMEUNIT)(FMOD_TIMEUNIT_SENTENCE_SUBSOUND | FMOD_TIMEUNIT_BUFFERED)); - ERRCHECK(result); - - if (currentsubsoundid != subsoundid) - { - /* - Release the sound that isn't playing any more. - */ - result = FMOD_Sound_Release(subsound[subsoundid]); - ERRCHECK(result); - - /* - Replace it with a new sound in our list. - */ - result = FMOD_System_CreateStream(system, soundname[sentenceid], FMOD_DEFAULT, 0, &subsound[subsoundid]); - ERRCHECK(result); - - result = FMOD_Sound_SetSubSound(sound, subsoundid, subsound[subsoundid]); - ERRCHECK(result); - - printf("Replacing subsound %d / 2 with sound %d / %d\n", subsoundid, sentenceid, NUMSOUNDS); - - sentenceid++; - if (sentenceid >= NUMSOUNDS) - { - sentenceid = 0; - } - - subsoundid = currentsubsoundid; - } - - Sleep(50); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); /* Freeing a parent subsound also frees its children. */ - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/realtimestitching/main.cpp b/CocosDenshion/third_party/fmod/examples/realtimestitching/main.cpp deleted file mode 100644 index 45115f0981..0000000000 --- a/CocosDenshion/third_party/fmod/examples/realtimestitching/main.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/*=============================================================================================== - Real-time stitching example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how you can create your own multi-subsound stream, then in realtime replace - each the subsound as it plays them. Using a looping sentence, it will seamlessly stich between - 2 subsounds in this example, and each time it switches to a new sound, it will replace the old - one with another sound in our list. - - These sounds can go on forever as long as they are the same bitdepth (when decoded) and number - of channels (ie mono / stereo). The reason for this is the hardware channel cannot change - formats mid sentence, and using different hardware channels would mean it wouldn't be gapless. - -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -#define NUMSOUNDS 32 - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound; - FMOD::Sound *subsound[2]; - FMOD_CREATESOUNDEXINFO exinfo; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - int key; - unsigned int subsoundid, sentenceid; - unsigned int version; - const char *soundname[NUMSOUNDS] = - { - "../media/e.ogg", /* Ma- */ - "../media/d.ogg", /* ry */ - "../media/c.ogg", /* had */ - "../media/d.ogg", /* a */ - "../media/e.ogg", /* lit- */ - "../media/e.ogg", /* tle */ - "../media/e.ogg", /* lamb, */ - "../media/e.ogg", /* ..... */ - "../media/d.ogg", /* lit- */ - "../media/d.ogg", /* tle */ - "../media/d.ogg", /* lamb, */ - "../media/d.ogg", /* ..... */ - "../media/e.ogg", /* lit- */ - "../media/e.ogg", /* tle */ - "../media/e.ogg", /* lamb, */ - "../media/e.ogg", /* ..... */ - - "../media/e.ogg", /* Ma- */ - "../media/d.ogg", /* ry */ - "../media/c.ogg", /* had */ - "../media/d.ogg", /* a */ - "../media/e.ogg", /* lit- */ - "../media/e.ogg", /* tle */ - "../media/e.ogg", /* lamb, */ - "../media/e.ogg", /* its */ - "../media/d.ogg", /* fleece */ - "../media/d.ogg", /* was */ - "../media/e.ogg", /* white */ - "../media/d.ogg", /* as */ - "../media/c.ogg", /* snow. */ - "../media/c.ogg", /* ..... */ - "../media/c.ogg", /* ..... */ - "../media/c.ogg", /* ..... */ - }; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(1, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - /* - Set up the FMOD_CREATESOUNDEXINFO structure for the user stream with room for 2 subsounds. (our subsound double buffer) - */ - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.defaultfrequency = 44100; - exinfo.numsubsounds = 2; - exinfo.numchannels = 1; - exinfo.format = FMOD_SOUND_FORMAT_PCM16; - - /* - Create the 'parent' stream that contains the substreams. Set it to loop so that it loops between subsound 0 and 1. - */ - result = system->createStream(0, FMOD_LOOP_NORMAL | FMOD_OPENUSER, &exinfo, &sound); - ERRCHECK(result); - - /* - Add 2 of our streams as children of the parent. They should be the same format (ie mono/stereo and bitdepth) as the parent sound. - When subsound 0 has finished and it is playing subsound 1, we will swap subsound 0 with a new sound, and the same for when subsound 1 has finished, - causing a continual double buffered flip, which means continuous sound. - */ - result = system->createStream(soundname[0], FMOD_DEFAULT, 0, &subsound[0]); - ERRCHECK(result); - - result = system->createStream(soundname[1], FMOD_DEFAULT, 0, &subsound[1]); - ERRCHECK(result); - - result = sound->setSubSound(0, subsound[0]); - ERRCHECK(result); - - result = sound->setSubSound(1, subsound[1]); - ERRCHECK(result); - - /* - Set up the gapless sentence to contain these first 2 streams. - */ - { - int soundlist[2] = { 0, 1 }; - - result = sound->setSubSoundSentence(soundlist, 2); - ERRCHECK(result); - } - - subsoundid = 0; - sentenceid = 2; /* The next sound to be appeneded to the stream. */ - - printf("=============================================================================\n"); - printf("Real-time stitching example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("=============================================================================\n"); - printf("\n"); - printf("Press space to pause, Esc to quit\n"); - printf("\n"); - - printf("Inserted subsound %d / 2 with sound %d / %d\n", 0, 0, NUMSOUNDS); - printf("Inserted subsound %d / 2 with sound %d / %d\n", 1, 1, NUMSOUNDS); - - /* - Play the sound. - */ - - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - unsigned int currentsubsoundid; - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - bool paused; - channel->getPaused(&paused); - channel->setPaused(!paused); - break; - } - } - } - - system->update(); - - /* - Replace the subsound that just finished with a new subsound, to create endless seamless stitching! - - Note that this polls the currently playing subsound using the FMOD_TIMEUNIT_BUFFERED flag. - Remember streams are decoded / buffered ahead in advance! - Don't use the 'audible time' which is FMOD_TIMEUNIT_SENTENCE_SUBSOUND by itself. When streaming, sound is - processed ahead of time, and things like stream buffer / sentence manipulation (as done below) is required - to be in 'buffered time', or else there will be synchronization problems and you might end up releasing a - sub-sound that is still playing! - */ - result = channel->getPosition(¤tsubsoundid, (FMOD_TIMEUNIT)(FMOD_TIMEUNIT_SENTENCE_SUBSOUND | FMOD_TIMEUNIT_BUFFERED)); - ERRCHECK(result); - - if (currentsubsoundid != subsoundid) - { - /* - Release the sound that isn't playing any more. - */ - result = subsound[subsoundid]->release(); - ERRCHECK(result); - - /* - Replace it with a new sound in our list. - */ - result = system->createStream(soundname[sentenceid], FMOD_DEFAULT, 0, &subsound[subsoundid]); - ERRCHECK(result); - - result = sound->setSubSound(subsoundid, subsound[subsoundid]); - ERRCHECK(result); - - printf("Replacing subsound %d / 2 with sound %d / %d\n", subsoundid, sentenceid, NUMSOUNDS); - - sentenceid++; - if (sentenceid >= NUMSOUNDS) - { - sentenceid = 0; - } - - subsoundid = currentsubsoundid; - } - - Sleep(50); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); /* Freeing a parent subsound also frees its children. */ - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/recording/Makefile b/CocosDenshion/third_party/fmod/examples/recording/Makefile deleted file mode 100644 index b8907706bb..0000000000 --- a/CocosDenshion/third_party/fmod/examples/recording/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -recording_cpp: main.cpp - g++ -O3 -o recording main.cpp ../../api/lib/libfmodex.so -pthread - -recording_c: main.c - g++ -O3 -o recording main.c ../../api/lib/libfmodex.so -pthread - -run: - ./recording - -clean: - rm -f recording diff --git a/CocosDenshion/third_party/fmod/examples/recording/main.c b/CocosDenshion/third_party/fmod/examples/recording/main.c deleted file mode 100644 index aa0414f83d..0000000000 --- a/CocosDenshion/third_party/fmod/examples/recording/main.c +++ /dev/null @@ -1,401 +0,0 @@ -/*=============================================================================================== - Record example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to record a sound, then write it to a wav file. - It then shows how to play a sound while it is being recorded to. Because it is recording, the - sound playback has to be delayed a little bit so that the playback doesn't play part of the - buffer that is still being written to. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -#if defined(WIN32) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #define __PACKED /* dummy */ -#else - #define __PACKED __attribute__((packed)) /* gcc packed */ -#endif - -/* -[ - [DESCRIPTION] - Writes out the contents of a record buffer to a file. - - [PARAMETERS] - - [RETURN_VALUE] - void - - [REMARKS] -] -*/ -void SaveToWav(FMOD_SOUND *sound) -{ - FILE *fp; - int channels, bits; - float rate; - void *ptr1, *ptr2; - unsigned int lenbytes, len1, len2; - - if (!sound) - { - return; - } - - FMOD_Sound_GetFormat (sound, 0, 0, &channels, &bits); - FMOD_Sound_GetDefaults(sound, &rate, 0, 0, 0); - FMOD_Sound_GetLength (sound, &lenbytes, FMOD_TIMEUNIT_PCMBYTES); - - { - #if defined(WIN32) || defined(_WIN64) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #pragma pack(1) - #endif - - /* - WAV Structures - */ - typedef struct - { - signed char id[4]; - int size; - } RiffChunk; - - struct - { - RiffChunk chunk __PACKED; - unsigned short wFormatTag __PACKED; /* format type */ - unsigned short nChannels __PACKED; /* number of channels (i.e. mono, stereo...) */ - unsigned int nSamplesPerSec __PACKED; /* sample rate */ - unsigned int nAvgBytesPerSec __PACKED; /* for buffer estimation */ - unsigned short nBlockAlign __PACKED; /* block size of data */ - unsigned short wBitsPerSample __PACKED; /* number of bits per sample of mono data */ - } __PACKED FmtChunk = { {{'f','m','t',' '}, sizeof(FmtChunk) - sizeof(RiffChunk) }, 1, channels, (int)rate, (int)rate * channels * bits / 8, 1 * channels * bits / 8, bits }; - - struct - { - RiffChunk chunk; - } DataChunk = { {{'d','a','t','a'}, lenbytes } }; - - struct - { - RiffChunk chunk; - signed char rifftype[4]; - } WavHeader = { {{'R','I','F','F'}, sizeof(FmtChunk) + sizeof(RiffChunk) + lenbytes }, {'W','A','V','E'} }; - - #if defined(WIN32) || defined(_WIN64) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #pragma pack() - #endif - - fp = fopen("record.wav", "wb"); - - /* - Write out the WAV header. - */ - fwrite(&WavHeader, sizeof(WavHeader), 1, fp); - fwrite(&FmtChunk, sizeof(FmtChunk), 1, fp); - fwrite(&DataChunk, sizeof(DataChunk), 1, fp); - - /* - Lock the sound to get access to the raw data. - */ - FMOD_Sound_Lock(sound, 0, lenbytes, &ptr1, &ptr2, &len1, &len2); - - /* - Write it to disk. - */ - fwrite(ptr1, len1, 1, fp); - - /* - Unlock the sound to allow FMOD to use it again. - */ - FMOD_Sound_Unlock(sound, ptr1, ptr2, len1, len2); - - fclose(fp); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system = 0; - FMOD_SOUND *sound = 0; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - FMOD_CREATESOUNDEXINFO exinfo; - int key, driver, recorddriver, numdrivers, count; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - /* - System initialization - */ - printf("---------------------------------------------------------\n"); - printf("Select OUTPUT type\n"); - printf("---------------------------------------------------------\n"); - printf("1 : OSS - Open Sound System\n"); - printf("2 : ALSA - Advanced Linux Sound Architecture\n"); - printf("3 : ESD - Enlightenment Sound Daemon\n"); - printf("4 : PULSEAUDIO - Pulse Audio Sound Server\n"); - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - } while (key != 27 && key < '1' && key > '5'); - - switch (key) - { - case '1' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_OSS); - break; - case '2' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_ALSA); - break; - case '3' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_ESD); - break; - case '4' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_PULSEAUDIO); - break; - default : return 1; - } - ERRCHECK(result); - - /* - Enumerate playback devices - */ - - result = FMOD_System_GetNumDrivers(system, &numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Choose a PLAYBACK driver\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = FMOD_System_GetDriverInfo(system, count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - if (key == 27) - { - return 0; - } - driver = key - '1'; - } while (driver < 0 || driver >= numdrivers); - - result = FMOD_System_SetDriver(system, driver); - ERRCHECK(result); - - /* - Enumerate record devices - */ - - result = FMOD_System_GetRecordNumDrivers(system, &numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Choose a RECORD driver\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = FMOD_System_GetRecordDriverInfo(system, count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - recorddriver = 0; - do - { - key = getch(); - if (key == 27) - { - return 0; - } - recorddriver = key - '1'; - } while (recorddriver < 0 || recorddriver >= numdrivers); - - printf("\n"); - - result = FMOD_System_SetRecordDriver(system, recorddriver, driver); - ERRCHECK(result); - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.numchannels = 2; - exinfo.format = FMOD_SOUND_FORMAT_PCM16; - exinfo.defaultfrequency = 44100; - exinfo.length = exinfo.defaultfrequency * sizeof(short) * exinfo.numchannels * 5; - - result = FMOD_System_CreateSound(system, 0, FMOD_2D | FMOD_SOFTWARE | FMOD_OPENUSER, &exinfo, &sound); - ERRCHECK(result); - - printf("===================================================================\n"); - printf("Recording example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===================================================================\n"); - printf("\n"); - printf("Press 'r' to record a 5 second segment of audio and write it to a wav file.\n"); - printf("Press 'p' to play the 5 second segment of audio.\n"); - printf("Press 'l' to turn looping on/off.\n"); - printf("Press 's' to stop recording and playback.\n"); - printf("Press 'w' to save the 5 second segment to a wav file.\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop. - */ - do - { - static FMOD_CHANNEL *channel = 0; - static int looping = 0; - int recording = 0; - int playing = 0; - unsigned int recordpos = 0; - unsigned int playpos = 0; - unsigned int length; - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'r' : - case 'R' : - { - result = FMOD_System_RecordStart(system, recorddriver, sound, looping); - ERRCHECK(result); - break; - } - case 'p' : - case 'P' : - { - if (looping) - { - FMOD_Sound_SetMode(sound, FMOD_LOOP_NORMAL); - } - else - { - FMOD_Sound_SetMode(sound, FMOD_LOOP_OFF); - } - ERRCHECK(result); - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_REUSE, sound, 0, &channel); - ERRCHECK(result); - break; - } - case 'l' : - case 'L' : - { - looping = !looping; - break; - } - case 's' : - case 'S' : - { - result = FMOD_System_RecordStop(system, recorddriver); - if (channel) - { - FMOD_Channel_Stop(channel); - channel = 0; - } - break; - } - case 'w' : - case 'W' : - { - printf("Writing to record.wav ... \r"); - - SaveToWav(sound); - Sleep(500); - - break; - } - } - } - - FMOD_Sound_GetLength(sound, &length, FMOD_TIMEUNIT_PCM); - ERRCHECK(result); - - FMOD_System_IsRecording(system, recorddriver, &recording); - ERRCHECK(result); - - FMOD_System_GetRecordPosition(system, recorddriver, &recordpos); - ERRCHECK(result); - - if (channel) - { - FMOD_Channel_IsPlaying(channel, &playing); - ERRCHECK(result); - - FMOD_Channel_GetPosition(channel, &playpos, FMOD_TIMEUNIT_PCM); - ERRCHECK(result); - } - - printf("State: %-19s. Record pos = %6d : Play pos = %6d : Loop %-3s\r", recording ? playing ? "Recording / playing" : "Recording" : playing ? "Playing" : "Idle", recordpos, playpos, looping ? "On" : "Off"); - fflush(stdout); - - FMOD_System_Update(system); - - fflush(stdout); - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/recording/main.cpp b/CocosDenshion/third_party/fmod/examples/recording/main.cpp deleted file mode 100644 index 74f45edd75..0000000000 --- a/CocosDenshion/third_party/fmod/examples/recording/main.cpp +++ /dev/null @@ -1,395 +0,0 @@ -/*=============================================================================================== - Record example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to record a sound, then write it to a wav file. - It then shows how to play a sound while it is being recorded to. Because it is recording, the - sound playback has to be delayed a little bit so that the playback doesn't play part of the - buffer that is still being written to. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -#if defined(WIN32) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #define __PACKED /* dummy */ -#else - #define __PACKED __attribute__((packed)) /* gcc packed */ -#endif - -/* -[ - [DESCRIPTION] - Writes out the contents of a record buffer to a file. - - [PARAMETERS] - - [RETURN_VALUE] - void - - [REMARKS] -] -*/ -void SaveToWav(FMOD::Sound *sound) -{ - FILE *fp; - int channels, bits; - float rate; - void *ptr1, *ptr2; - unsigned int lenbytes, len1, len2; - - if (!sound) - { - return; - } - - sound->getFormat (0, 0, &channels, &bits); - sound->getDefaults(&rate, 0, 0, 0); - sound->getLength (&lenbytes, FMOD_TIMEUNIT_PCMBYTES); - - { - #if defined(WIN32) || defined(_WIN64) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #pragma pack(1) - #endif - - /* - WAV Structures - */ - typedef struct - { - signed char id[4]; - int size; - } RiffChunk; - - struct - { - RiffChunk chunk __PACKED; - unsigned short wFormatTag __PACKED; /* format type */ - unsigned short nChannels __PACKED; /* number of channels (i.e. mono, stereo...) */ - unsigned int nSamplesPerSec __PACKED; /* sample rate */ - unsigned int nAvgBytesPerSec __PACKED; /* for buffer estimation */ - unsigned short nBlockAlign __PACKED; /* block size of data */ - unsigned short wBitsPerSample __PACKED; /* number of bits per sample of mono data */ - } __PACKED FmtChunk = { {{'f','m','t',' '}, sizeof(FmtChunk) - sizeof(RiffChunk) }, 1, channels, (int)rate, (int)rate * channels * bits / 8, 1 * channels * bits / 8, bits }; - - struct - { - RiffChunk chunk; - } DataChunk = { {{'d','a','t','a'}, lenbytes } }; - - struct - { - RiffChunk chunk; - signed char rifftype[4]; - } WavHeader = { {{'R','I','F','F'}, sizeof(FmtChunk) + sizeof(RiffChunk) + lenbytes }, {'W','A','V','E'} }; - - #if defined(WIN32) || defined(_WIN64) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #pragma pack() - #endif - - fp = fopen("record.wav", "wb"); - - /* - Write out the WAV header. - */ - fwrite(&WavHeader, sizeof(WavHeader), 1, fp); - fwrite(&FmtChunk, sizeof(FmtChunk), 1, fp); - fwrite(&DataChunk, sizeof(DataChunk), 1, fp); - - /* - Lock the sound to get access to the raw data. - */ - sound->lock(0, lenbytes, &ptr1, &ptr2, &len1, &len2); - - /* - Write it to disk. - */ - fwrite(ptr1, len1, 1, fp); - - /* - Unlock the sound to allow FMOD to use it again. - */ - sound->unlock(ptr1, ptr2, len1, len2); - - fclose(fp); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system = 0; - FMOD::Sound *sound = 0; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - FMOD_CREATESOUNDEXINFO exinfo; - int key, driver, recorddriver, numdrivers, count; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - /* - System initialization - */ - printf("---------------------------------------------------------\n"); - printf("Select OUTPUT type\n"); - printf("---------------------------------------------------------\n"); - printf("1 : OSS - Open Sound System\n"); - printf("2 : ALSA - Advanced Linux Sound Architecture\n"); - printf("3 : ESD - Enlightenment Sound Daemon\n"); - printf("4 : PULSEAUDIO - Pulse Audio Sound Server\n"); - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - } while (key != 27 && key < '1' && key > '5'); - - switch (key) - { - case '1' : result = system->setOutput(FMOD_OUTPUTTYPE_OSS); - break; - case '2' : result = system->setOutput(FMOD_OUTPUTTYPE_ALSA); - break; - case '3' : result = system->setOutput(FMOD_OUTPUTTYPE_ESD); - break; - case '4' : result = system->setOutput(FMOD_OUTPUTTYPE_PULSEAUDIO); - break; - default : return 1; - } - ERRCHECK(result); - - /* - Enumerate playback devices - */ - - result = system->getNumDrivers(&numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Choose a PLAYBACK driver\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = system->getDriverInfo(count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - if (key == 27) - { - return 0; - } - driver = key - '1'; - } while (driver < 0 || driver >= numdrivers); - - result = system->setDriver(driver); - ERRCHECK(result); - - /* - Enumerate record devices - */ - - result = system->getRecordNumDrivers(&numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Choose a RECORD driver\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = system->getRecordDriverInfo(count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - recorddriver = 0; - do - { - key = getch(); - if (key == 27) - { - return 0; - } - recorddriver = key - '1'; - } while (recorddriver < 0 || recorddriver >= numdrivers); - - printf("\n"); - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.numchannels = 2; - exinfo.format = FMOD_SOUND_FORMAT_PCM16; - exinfo.defaultfrequency = 44100; - exinfo.length = exinfo.defaultfrequency * sizeof(short) * exinfo.numchannels * 5; - - result = system->createSound(0, FMOD_2D | FMOD_SOFTWARE | FMOD_OPENUSER, &exinfo, &sound); - ERRCHECK(result); - - printf("===================================================================\n"); - printf("Recording example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("===================================================================\n"); - printf("\n"); - printf("Press 'r' to record a 5 second segment of audio and write it to a wav file.\n"); - printf("Press 'p' to play the 5 second segment of audio.\n"); - printf("Press 'l' to turn looping on/off.\n"); - printf("Press 's' to stop recording and playback.\n"); - printf("Press 'w' to save the 5 second segment to a wav file.\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Main loop. - */ - do - { - static FMOD::Channel *channel = 0; - static bool looping = false; - bool recording = false; - bool playing = false; - unsigned int recordpos = 0; - unsigned int playpos = 0; - unsigned int length; - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'r' : - case 'R' : - { - result = system->recordStart(recorddriver, sound, looping); - ERRCHECK(result); - break; - } - case 'p' : - case 'P' : - { - if (looping) - { - sound->setMode(FMOD_LOOP_NORMAL); - } - else - { - sound->setMode(FMOD_LOOP_OFF); - } - ERRCHECK(result); - - result = system->playSound(FMOD_CHANNEL_REUSE, sound, false, &channel); - ERRCHECK(result); - break; - } - case 'l' : - case 'L' : - { - looping = !looping; - break; - } - case 's' : - case 'S' : - { - result = system->recordStop(recorddriver); - if (channel) - { - channel->stop(); - channel = 0; - } - break; - } - case 'w' : - case 'W' : - { - printf("Writing to record.wav ... \r"); - - SaveToWav(sound); - Sleep(500); - break; - } - } - } - - sound->getLength(&length, FMOD_TIMEUNIT_PCM); - ERRCHECK(result); - - system->isRecording(recorddriver, &recording); - ERRCHECK(result); - - system->getRecordPosition(recorddriver, &recordpos); - ERRCHECK(result); - - if (channel) - { - channel->isPlaying(&playing); - ERRCHECK(result); - - channel->getPosition(&playpos, FMOD_TIMEUNIT_PCM); - ERRCHECK(result); - } - - printf("State: %-19s. Record pos = %6d : Play pos = %6d : Loop %-3s\r", recording ? playing ? "Recording / playing" : "Recording" : playing ? "Playing" : "Idle", recordpos, playpos, looping ? "On" : "Off"); - fflush(stdout); - - system->update(); - - fflush(stdout); - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/recordtodisk/Makefile b/CocosDenshion/third_party/fmod/examples/recordtodisk/Makefile deleted file mode 100644 index 7ae013409c..0000000000 --- a/CocosDenshion/third_party/fmod/examples/recordtodisk/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -recordtodisk_cpp: main.cpp - g++ -O3 -o recordtodisk main.cpp ../../api/lib/libfmodex.so -pthread - -recordtodisk_c: main.c - g++ -O3 -o recordtodisk main.c ../../api/lib/libfmodex.so -pthread - -run: - ./recordtodisk - -clean: - rm -f recordtodisk diff --git a/CocosDenshion/third_party/fmod/examples/recordtodisk/main.c b/CocosDenshion/third_party/fmod/examples/recordtodisk/main.c deleted file mode 100644 index 24671f4010..0000000000 --- a/CocosDenshion/third_party/fmod/examples/recordtodisk/main.c +++ /dev/null @@ -1,326 +0,0 @@ -/*=============================================================================================== - Record to disk example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to do a streaming record to disk. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -#if defined(WIN32) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #define __PACKED /* dummy */ -#else - #define __PACKED __attribute__((packed)) /* gcc packed */ -#endif - - -/* -[ - [DESCRIPTION] - Writes out the contents of a record buffer to a file. - - [PARAMETERS] - - [RETURN_VALUE] - void - - [REMARKS] -] -*/ -void WriteWavHeader(FILE *fp, FMOD_SOUND *sound, int length) -{ - int channels, bits; - float rate; - - if (!sound) - { - return; - } - - fseek(fp, 0, SEEK_SET); - - FMOD_Sound_GetFormat (sound, 0, 0, &channels, &bits); - FMOD_Sound_GetDefaults(sound, &rate, 0, 0, 0); - - { - #if defined(WIN32) || defined(_WIN64) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #pragma pack(1) - #endif - - /* - WAV Structures - */ - typedef struct - { - signed char id[4]; - int size; - } RiffChunk; - - struct - { - RiffChunk chunk __PACKED; - unsigned short wFormatTag __PACKED; /* format type */ - unsigned short nChannels __PACKED; /* number of channels (i.e. mono, stereo...) */ - unsigned int nSamplesPerSec __PACKED; /* sample rate */ - unsigned int nAvgBytesPerSec __PACKED; /* for buffer estimation */ - unsigned short nBlockAlign __PACKED; /* block size of data */ - unsigned short wBitsPerSample __PACKED; /* number of bits per sample of mono data */ - } __PACKED FmtChunk = { {{'f','m','t',' '}, sizeof(FmtChunk) - sizeof(RiffChunk) }, 1, channels, (int)rate, (int)rate * channels * bits / 8, 1 * channels * bits / 8, bits }; - - struct - { - RiffChunk chunk; - } DataChunk = { {{'d','a','t','a'}, length } }; - - struct - { - RiffChunk chunk; - signed char rifftype[4]; - } WavHeader = { {{'R','I','F','F'}, sizeof(FmtChunk) + sizeof(RiffChunk) + length }, {'W','A','V','E'} }; - - #if defined(WIN32) || defined(_WIN64) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #pragma pack() - #endif - - /* - Write out the WAV header. - */ - fwrite(&WavHeader, sizeof(WavHeader), 1, fp); - fwrite(&FmtChunk, sizeof(FmtChunk), 1, fp); - fwrite(&DataChunk, sizeof(DataChunk), 1, fp); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system = 0; - FMOD_SOUND *sound = 0; - FMOD_RESULT result; - FMOD_CREATESOUNDEXINFO exinfo; - int key, recorddriver, numdrivers, count; - unsigned int version; - FILE *fp; - unsigned int datalength = 0, soundlength; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - /* - System initialization - */ - printf("---------------------------------------------------------\n"); - printf("Select OUTPUT type\n"); - printf("---------------------------------------------------------\n"); - printf("1 : OSS - Open Sound System\n"); - printf("2 : ALSA - Advanced Linux Sound Architecture\n"); - printf("3 : ESD - Enlightenment Sound Daemon\n"); - printf("4 : PULSEAUDIO - Pulse Audio Sound Server\n"); - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - } while (key != 27 && key < '1' && key > '5'); - - switch (key) - { - case '1' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_OSS); - break; - case '2' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_ALSA); - break; - case '3' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_ESD); - break; - case '4' : result = FMOD_System_SetOutput(system, FMOD_OUTPUTTYPE_PULSEAUDIO); - break; - default : return 1; - } - ERRCHECK(result); - - /* - Enumerate record devices - */ - - result = FMOD_System_GetRecordNumDrivers(system, &numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Choose a RECORD driver\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = FMOD_System_GetRecordDriverInfo(system, count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - recorddriver = 0; - do - { - key = getch(); - if (key == 27) - { - return 0; - } - recorddriver = key - '1'; - } while (recorddriver < 0 || recorddriver >= numdrivers); - - printf("\n"); - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.numchannels = 2; - exinfo.format = FMOD_SOUND_FORMAT_PCM16; - exinfo.defaultfrequency = 44100; - exinfo.length = exinfo.defaultfrequency * sizeof(short) * exinfo.numchannels * 2; - - result = FMOD_System_CreateSound(system, 0, FMOD_2D | FMOD_SOFTWARE | FMOD_OPENUSER, &exinfo, &sound); - ERRCHECK(result); - - printf("========================================================================\n"); - printf("Record to disk example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("========================================================================\n"); - printf("\n"); - printf("Press a key to start recording to record.wav\n"); - printf("\n"); - - getch(); - - result = FMOD_System_RecordStart(system, recorddriver, sound, TRUE); - ERRCHECK(result); - - printf("Press 'Esc' to quit\n"); - printf("\n"); - - fp = fopen("record.wav", "wb"); - if (!fp) - { - printf("ERROR : could not open record.wav for writing.\n"); - return 1; - } - - /* - Write out the wav header. As we don't know the length yet it will be 0. - */ - WriteWavHeader(fp, sound, datalength); - - result = FMOD_Sound_GetLength(sound, &soundlength, FMOD_TIMEUNIT_PCM); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - static unsigned int lastrecordpos = 0; - unsigned int recordpos = 0; - - if (kbhit()) - { - key = getch(); - } - - FMOD_System_GetRecordPosition(system, recorddriver, &recordpos); - ERRCHECK(result); - - if (recordpos != lastrecordpos) - { - void *ptr1, *ptr2; - int blocklength; - unsigned int len1, len2; - - blocklength = (int)recordpos - (int)lastrecordpos; - if (blocklength < 0) - { - blocklength += soundlength; - } - - /* - Lock the sound to get access to the raw data. - */ - FMOD_Sound_Lock(sound, lastrecordpos * 4, blocklength * 4, &ptr1, &ptr2, &len1, &len2); /* *4 = stereo 16bit. 1 sample = 4 bytes. */ - - /* - Write it to disk. - */ - if (ptr1 && len1) - { - datalength += fwrite(ptr1, 1, len1, fp); - } - if (ptr2 && len2) - { - datalength += fwrite(ptr2, 1, len2, fp); - } - - /* - Unlock the sound to allow FMOD to use it again. - */ - FMOD_Sound_Unlock(sound, ptr1, ptr2, len1, len2); - } - - lastrecordpos = recordpos; - - printf("Record buffer pos = %6d : Record time = %02d:%02d\r", recordpos, datalength / exinfo.defaultfrequency / 4 / 60, (datalength / exinfo.defaultfrequency / 4) % 60); - fflush(stdout); - - FMOD_System_Update(system); - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Write back the wav header now that we know its length. - */ - WriteWavHeader(fp, sound, datalength); - - fclose(fp); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/recordtodisk/main.cpp b/CocosDenshion/third_party/fmod/examples/recordtodisk/main.cpp deleted file mode 100644 index fd14826c53..0000000000 --- a/CocosDenshion/third_party/fmod/examples/recordtodisk/main.cpp +++ /dev/null @@ -1,326 +0,0 @@ -/*=============================================================================================== - Record to disk example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to do a streaming record to disk. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -#if defined(WIN32) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #define __PACKED /* dummy */ -#else - #define __PACKED __attribute__((packed)) /* gcc packed */ -#endif - - -/* -[ - [DESCRIPTION] - Writes out the contents of a record buffer to a file. - - [PARAMETERS] - - [RETURN_VALUE] - void - - [REMARKS] -] -*/ -void WriteWavHeader(FILE *fp, FMOD::Sound *sound, int length) -{ - int channels, bits; - float rate; - - if (!sound) - { - return; - } - - fseek(fp, 0, SEEK_SET); - - sound->getFormat (0, 0, &channels, &bits); - sound->getDefaults(&rate, 0, 0, 0); - - { - #if defined(WIN32) || defined(_WIN64) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #pragma pack(1) - #endif - - /* - WAV Structures - */ - typedef struct - { - signed char id[4]; - int size; - } RiffChunk; - - struct - { - RiffChunk chunk __PACKED; - unsigned short wFormatTag __PACKED; /* format type */ - unsigned short nChannels __PACKED; /* number of channels (i.e. mono, stereo...) */ - unsigned int nSamplesPerSec __PACKED; /* sample rate */ - unsigned int nAvgBytesPerSec __PACKED; /* for buffer estimation */ - unsigned short nBlockAlign __PACKED; /* block size of data */ - unsigned short wBitsPerSample __PACKED; /* number of bits per sample of mono data */ - } __PACKED FmtChunk = { {{'f','m','t',' '}, sizeof(FmtChunk) - sizeof(RiffChunk) }, 1, channels, (int)rate, (int)rate * channels * bits / 8, 1 * channels * bits / 8, bits }; - - struct - { - RiffChunk chunk; - } DataChunk = { {{'d','a','t','a'}, length } }; - - struct - { - RiffChunk chunk; - signed char rifftype[4]; - } WavHeader = { {{'R','I','F','F'}, sizeof(FmtChunk) + sizeof(RiffChunk) + length }, {'W','A','V','E'} }; - - #if defined(WIN32) || defined(_WIN64) || defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) - #pragma pack() - #endif - - /* - Write out the WAV header. - */ - fwrite(&WavHeader, sizeof(WavHeader), 1, fp); - fwrite(&FmtChunk, sizeof(FmtChunk), 1, fp); - fwrite(&DataChunk, sizeof(DataChunk), 1, fp); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system = 0; - FMOD::Sound *sound = 0; - FMOD_RESULT result; - FMOD_CREATESOUNDEXINFO exinfo; - int key, recorddriver, numdrivers, count; - unsigned int version; - FILE *fp; - unsigned int datalength = 0, soundlength; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - /* - System initialization - */ - printf("---------------------------------------------------------\n"); - printf("Select OUTPUT type\n"); - printf("---------------------------------------------------------\n"); - printf("1 : OSS - Open Sound System\n"); - printf("2 : ALSA - Advanced Linux Sound Architecture\n"); - printf("3 : ESD - Enlightenment Sound Daemon\n"); - printf("4 : PULSEAUDIO - Pulse Audio Sound Server\n"); - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - do - { - key = getch(); - } while (key != 27 && key < '1' && key > '5'); - - switch (key) - { - case '1' : result = system->setOutput(FMOD_OUTPUTTYPE_OSS); - break; - case '2' : result = system->setOutput(FMOD_OUTPUTTYPE_ALSA); - break; - case '3' : result = system->setOutput(FMOD_OUTPUTTYPE_ESD); - break; - case '4' : result = system->setOutput(FMOD_OUTPUTTYPE_PULSEAUDIO); - break; - default : return 1; - } - ERRCHECK(result); - - /* - Enumerate record devices - */ - - result = system->getRecordNumDrivers(&numdrivers); - ERRCHECK(result); - - printf("---------------------------------------------------------\n"); - printf("Choose a RECORD driver\n"); - printf("---------------------------------------------------------\n"); - for (count=0; count < numdrivers; count++) - { - char name[256]; - - result = system->getRecordDriverInfo(count, name, 256, 0); - ERRCHECK(result); - - printf("%d : %s\n", count + 1, name); - } - printf("---------------------------------------------------------\n"); - printf("Press a corresponding number or ESC to quit\n"); - - recorddriver = 0; - do - { - key = getch(); - if (key == 27) - { - return 0; - } - recorddriver = key - '1'; - } while (recorddriver < 0 || recorddriver >= numdrivers); - - printf("\n"); - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - - exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); - exinfo.numchannels = 2; - exinfo.format = FMOD_SOUND_FORMAT_PCM16; - exinfo.defaultfrequency = 44100; - exinfo.length = exinfo.defaultfrequency * sizeof(short) * exinfo.numchannels * 2; - - result = system->createSound(0, FMOD_2D | FMOD_SOFTWARE | FMOD_OPENUSER, &exinfo, &sound); - ERRCHECK(result); - - printf("========================================================================\n"); - printf("Record to disk example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("========================================================================\n"); - printf("\n"); - printf("Press a key to start recording to record.wav\n"); - printf("\n"); - - getch(); - - result = system->recordStart(recorddriver, sound, true); - ERRCHECK(result); - - printf("Press 'Esc' to quit\n"); - printf("\n"); - - fp = fopen("record.wav", "wb"); - if (!fp) - { - printf("ERROR : could not open record.wav for writing.\n"); - return 1; - } - - /* - Write out the wav header. As we don't know the length yet it will be 0. - */ - WriteWavHeader(fp, sound, datalength); - - result = sound->getLength(&soundlength, FMOD_TIMEUNIT_PCM); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - static unsigned int lastrecordpos = 0; - unsigned int recordpos = 0; - - if (kbhit()) - { - key = getch(); - } - - system->getRecordPosition(recorddriver, &recordpos); - ERRCHECK(result); - - if (recordpos != lastrecordpos) - { - void *ptr1, *ptr2; - int blocklength; - unsigned int len1, len2; - - blocklength = (int)recordpos - (int)lastrecordpos; - if (blocklength < 0) - { - blocklength += soundlength; - } - - /* - Lock the sound to get access to the raw data. - */ - sound->lock(lastrecordpos * 4, blocklength * 4, &ptr1, &ptr2, &len1, &len2); /* *4 = stereo 16bit. 1 sample = 4 bytes. */ - - /* - Write it to disk. - */ - if (ptr1 && len1) - { - datalength += fwrite(ptr1, 1, len1, fp); - } - if (ptr2 && len2) - { - datalength += fwrite(ptr2, 1, len2, fp); - } - - /* - Unlock the sound to allow FMOD to use it again. - */ - sound->unlock(ptr1, ptr2, len1, len2); - } - - lastrecordpos = recordpos; - - printf("Record buffer pos = %6d : Record time = %02d:%02d\r", recordpos, datalength / exinfo.defaultfrequency / 4 / 60, (datalength / exinfo.defaultfrequency / 4) % 60); - fflush(stdout); - - system->update(); - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Write back the wav header now that we know its length. - */ - WriteWavHeader(fp, sound, datalength); - - fclose(fp); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/ripnetstream/Makefile b/CocosDenshion/third_party/fmod/examples/ripnetstream/Makefile deleted file mode 100644 index 996f54da2b..0000000000 --- a/CocosDenshion/third_party/fmod/examples/ripnetstream/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -ripnetstream_cpp: main.cpp - g++ -O3 -o ripnetstream main.cpp ../../api/lib/libfmodex.so - -ripnetstream_c: main.c - g++ -O3 -o ripnetstream main.c ../../api/lib/libfmodex.so - -run: - ./ripnetstream - -clean: - rm -f ripnetstream diff --git a/CocosDenshion/third_party/fmod/examples/ripnetstream/main.c b/CocosDenshion/third_party/fmod/examples/ripnetstream/main.c deleted file mode 100644 index 0f64c87052..0000000000 --- a/CocosDenshion/third_party/fmod/examples/ripnetstream/main.c +++ /dev/null @@ -1,332 +0,0 @@ -/*=============================================================================================== - RipNetStream Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to rip streaming audio from the internet to local files, using - System::attachFileSystem. - - This example also uses tags from the net stream to name the files as they are ripped. - - Some internet radio station only broadcast new tag information on fixed intervals. This - means that the rip might not be exactly in line with the filenames that are produced. - For example if a radio station only broadcast the track name every 10 seconds, and the - music changed half way inbetween this period, then the first file would contain 5 seconds - of the new song, and the second song would be missing the first 5 seconds of the track. - Silence detection might help this problem, but most radio stations do not offer silence - between tracks. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -FMOD_SOUND_TYPE gSoundType = FMOD_SOUND_TYPE_MPEG; -int gFileBufferSize = 128*1024; -char gCurrentTrackArtist[256]; -char gCurrentTrackTitle[256]; -int gUpdateFileName = FALSE; -char gOutputFileName[1024]; -FILE *gFileHandle = 0; - - -/* - File callbacks -*/ -FMOD_RESULT F_CALLBACK myopen(const char *name, int unicode, unsigned int *filesize, void **handle, void **userdata) -{ - gFileHandle = fopen(gOutputFileName, "wb"); - if (!gFileHandle) - { - return FMOD_ERR_FILE_NOTFOUND; - } - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK myclose(void *handle, void *userdata) -{ - if (!gFileHandle) - { - return FMOD_ERR_INVALID_PARAM; - } - - fclose(gFileHandle); - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK myread(void *handle, void *buffer, unsigned int sizebytes, unsigned int *bytesread, void *userdata) -{ - if (!gFileHandle) - { - return FMOD_ERR_INVALID_PARAM; - } - - /* - If the main thread detected a new tag name for artist / title, close the file and open a new one with the new name. - */ - if (gUpdateFileName) - { - char *ext; - - gUpdateFileName = FALSE; - - fclose(gFileHandle); - - switch (gSoundType) - { - case FMOD_SOUND_TYPE_MPEG: /* MP2/MP3 */ - { - ext = ".mp3"; - break; - } - case FMOD_SOUND_TYPE_OGGVORBIS: /* Ogg vorbis */ - { - ext = ".ogg"; - break; - } - default: - { - ext = ".unknown"; - break; - } - } - - /* - If it is the 'temp file name' then rename the file and append to it instead of starting a new file - */ - if (!strcmp(gOutputFileName, "output.mp3")) - { - sprintf(gOutputFileName, "%s%s%s%s", gCurrentTrackArtist, strlen(gCurrentTrackTitle) ? " - " : "", gCurrentTrackTitle, ext); - rename("output.mp3", gOutputFileName); - gFileHandle = fopen(gOutputFileName, "ab+"); - } - else - { - sprintf(gOutputFileName, "%s%s%s%s", gCurrentTrackArtist, strlen(gCurrentTrackTitle) ? " - " : "", gCurrentTrackTitle, ext); - gFileHandle = fopen(gOutputFileName, "wb"); - } - - if (!gFileHandle) - { - return FMOD_ERR_FILE_NOTFOUND; - } - } - - fwrite(buffer, 1, sizebytes, gFileHandle); - - return FMOD_OK; -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - memset(gCurrentTrackArtist, 0, 256); - memset(gCurrentTrackTitle, 0, 256); - strcpy(gOutputFileName, "output.mp3"); /* Start off like this then rename if a title tag comes along */ - - printf("======================================================================\n"); - printf("RipNetStream Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("======================================================================\n\n"); - - if (argc < 2) - { - printf("Usage: ripnetstream \n"); - return -1; - } - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 100, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - result = FMOD_System_SetStreamBufferSize(system, gFileBufferSize, FMOD_TIMEUNIT_RAWBYTES); - ERRCHECK(result); - - result = FMOD_System_AttachFileSystem(system, myopen, myclose, myread, 0); - ERRCHECK(result); - - printf("Buffering...\n\n"); - - result = FMOD_System_CreateSound(system, argv[1], FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING, 0, &sound); - ERRCHECK(result); - - /* - Main loop - */ - do - { - if (sound && !channel) - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, FALSE, &channel); - } - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - if (channel) - { - int paused; - FMOD_Channel_GetPaused(channel, &paused); - FMOD_Channel_SetPaused(channel, !paused); - } - break; - } - case 'm' : - case 'M' : - { - if (channel) - { - int mute; - FMOD_Channel_GetMute(channel, &mute); - FMOD_Channel_SetMute(channel, !mute); - } - break; - } - } - } - - FMOD_System_Update(system); - - if (channel) - { - unsigned int ms = 0; - int playing = FALSE; - int paused = FALSE; - int tagsupdated = 0; - - FMOD_Sound_GetNumTags(sound, 0, &tagsupdated); - - if (tagsupdated) - { - printf("\n"); - printf("\n"); - for (;;) - { - FMOD_TAG tag; - - if (FMOD_Sound_GetTag(sound, 0, -1, &tag) != FMOD_OK) - { - break; - } - - if (tag.datatype == FMOD_TAGDATATYPE_STRING) - { - printf("[%-11s] %s (%d bytes)\n", tag.name, tag.data, tag.datalen); - - FMOD_Sound_GetFormat(sound, &gSoundType, 0, 0, 0); - - if (!strcmp(tag.name, "ARTIST")) - { - if(strncmp(gCurrentTrackArtist, (const char *)tag.data, 256)) - { - strncpy(gCurrentTrackArtist, (const char *)tag.data, 256); - gUpdateFileName = TRUE; - } - } - if (!strcmp(tag.name, "TITLE")) - { - if (strncmp(gCurrentTrackTitle, (const char *)tag.data, 256)) - { - strncpy(gCurrentTrackTitle, (const char *)tag.data, 256); - gUpdateFileName = TRUE; - } - } - } - } - printf("\n"); - } - - result = FMOD_Channel_IsPlaying(channel, &playing); - if (result != FMOD_OK || !playing) - { - FMOD_Sound_Release(sound); - sound = 0; - channel = 0; - } - else - { - result = FMOD_Channel_GetPaused(channel, &paused); - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - printf("Time %02d:%02d:%02d : %s : Press SPACE to pause. 'm' to mute. ESC to quit.\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped"); - fflush(stdout); - } - } - - - if (sound) - { - FMOD_OPENSTATE openstate = FMOD_OPENSTATE_READY; - - FMOD_Sound_GetOpenState(sound, &openstate, 0, 0, 0); - - if (openstate == FMOD_OPENSTATE_ERROR) - { - FMOD_Sound_Release(sound); - sound = 0; - channel = 0; - } - } - - if (!sound) - { - printf("\n"); - printf("Error occurred or stream ended. Restarting stream..\n"); - result = FMOD_System_CreateSound(system, argv[1], FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING, 0, &sound); - ERRCHECK(result); - Sleep(1000); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/ripnetstream/main.cpp b/CocosDenshion/third_party/fmod/examples/ripnetstream/main.cpp deleted file mode 100644 index 64b3933ff6..0000000000 --- a/CocosDenshion/third_party/fmod/examples/ripnetstream/main.cpp +++ /dev/null @@ -1,332 +0,0 @@ -/*=============================================================================================== - RipNetStream Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to rip streaming audio from the internet to local files, using - System::attachFileSystem. - - This example also uses tags from the net stream to name the files as they are ripped. - - Some internet radio station only broadcast new tag information on fixed intervals. This - means that the rip might not be exactly in line with the filenames that are produced. - For example if a radio station only broadcast the track name every 10 seconds, and the - music changed half way inbetween this period, then the first file would contain 5 seconds - of the new song, and the second song would be missing the first 5 seconds of the track. - Silence detection might help this problem, but most radio stations do not offer silence - between tracks. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -FMOD_SOUND_TYPE gSoundType = FMOD_SOUND_TYPE_MPEG; -int gFileBufferSize = 128*1024; -char gCurrentTrackArtist[256]; -char gCurrentTrackTitle[256]; -bool gUpdateFileName = false; -char gOutputFileName[1024]; -FILE *gFileHandle = 0; - - -/* - File callbacks -*/ -FMOD_RESULT F_CALLBACK myopen(const char *name, int unicode, unsigned int *filesize, void **handle, void **userdata) -{ - gFileHandle = fopen(gOutputFileName, "wb"); - if (!gFileHandle) - { - return FMOD_ERR_FILE_NOTFOUND; - } - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK myclose(void *handle, void *userdata) -{ - if (!gFileHandle) - { - return FMOD_ERR_INVALID_PARAM; - } - - fclose(gFileHandle); - - return FMOD_OK; -} - -FMOD_RESULT F_CALLBACK myread(void *handle, void *buffer, unsigned int sizebytes, unsigned int *bytesread, void *userdata) -{ - if (!gFileHandle) - { - return FMOD_ERR_INVALID_PARAM; - } - - /* - If the main thread detected a new tag name for artist / title, close the file and open a new one with the new name. - */ - if (gUpdateFileName) - { - char *ext; - - gUpdateFileName = false; - - fclose(gFileHandle); - - switch (gSoundType) - { - case FMOD_SOUND_TYPE_MPEG: /* MP2/MP3 */ - { - ext = ".mp3"; - break; - } - case FMOD_SOUND_TYPE_OGGVORBIS: /* Ogg vorbis */ - { - ext = ".ogg"; - break; - } - default: - { - ext = ".unknown"; - break; - } - } - - /* - If it is the 'temp file name' then rename the file and append to it instead of starting a new file - */ - if (!strcmp(gOutputFileName, "output.mp3")) - { - sprintf(gOutputFileName, "%s%s%s%s", gCurrentTrackArtist, strlen(gCurrentTrackTitle) ? " - " : "", gCurrentTrackTitle, ext); - rename("output.mp3", gOutputFileName); - gFileHandle = fopen(gOutputFileName, "ab+"); - } - else - { - sprintf(gOutputFileName, "%s%s%s%s", gCurrentTrackArtist, strlen(gCurrentTrackTitle) ? " - " : "", gCurrentTrackTitle, ext); - gFileHandle = fopen(gOutputFileName, "wb"); - } - - if (!gFileHandle) - { - return FMOD_ERR_FILE_NOTFOUND; - } - } - - fwrite(buffer, 1, sizebytes, gFileHandle); - - return FMOD_OK; -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - int key; - unsigned int version; - - memset(gCurrentTrackArtist, 0, 256); - memset(gCurrentTrackTitle, 0, 256); - strcpy(gOutputFileName, "output.mp3"); /* Start off like this then rename if a title tag comes along */ - - printf("======================================================================\n"); - printf("RipNetStream Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("======================================================================\n\n"); - - if (argc < 2) - { - printf("Usage: ripnetstream \n"); - return -1; - } - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(100, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->setStreamBufferSize(gFileBufferSize, FMOD_TIMEUNIT_RAWBYTES); - ERRCHECK(result); - - result = system->attachFileSystem(myopen, myclose, myread, 0); - ERRCHECK(result); - - printf("Buffering...\n\n"); - - result = system->createSound(argv[1], FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING, 0, &sound); - ERRCHECK(result); - - /* - Main loop - */ - do - { - if (sound && !channel) - { - result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel); - } - - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - if (channel) - { - bool paused; - channel->getPaused(&paused); - channel->setPaused(!paused); - } - break; - } - case 'm' : - case 'M' : - { - if (channel) - { - bool mute; - channel->getMute(&mute); - channel->setMute(!mute); - } - break; - } - } - } - - system->update(); - - if (channel) - { - unsigned int ms = 0; - bool playing = false; - bool paused = false; - int tagsupdated = 0; - - sound->getNumTags(0, &tagsupdated); - - if (tagsupdated) - { - printf("\n"); - printf("\n"); - for (;;) - { - FMOD_TAG tag; - - if (sound->getTag(0, -1, &tag) != FMOD_OK) - { - break; - } - - if (tag.datatype == FMOD_TAGDATATYPE_STRING) - { - printf("[%-11s] %s (%d bytes)\n", tag.name, tag.data, tag.datalen); - - sound->getFormat(&gSoundType, 0, 0, 0); - - if (!strcmp(tag.name, "ARTIST")) - { - if (strncmp(gCurrentTrackArtist, (const char *)tag.data, 256)) - { - strncpy(gCurrentTrackArtist, (const char *)tag.data, 256); - gUpdateFileName = true; - } - } - if (!strcmp(tag.name, "TITLE")) - { - if (strncmp(gCurrentTrackTitle, (const char *)tag.data, 256)) - { - strncpy(gCurrentTrackTitle, (const char *)tag.data, 256); - gUpdateFileName = true; - } - } - } - } - printf("\n"); - } - - result = channel->isPlaying(&playing); - if (result != FMOD_OK || !playing) - { - sound->release(); - sound = 0; - channel = 0; - } - else - { - result = channel->getPaused(&paused); - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - printf("Time %02d:%02d:%02d : %s : Press SPACE to pause. 'm' to mute. ESC to quit.\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped"); - } - fflush(stdout); - } - - - if (sound) - { - FMOD_OPENSTATE openstate = FMOD_OPENSTATE_READY; - - sound->getOpenState(&openstate, 0, 0, 0); - - if (openstate == FMOD_OPENSTATE_ERROR) - { - sound->release(); - sound = 0; - channel = 0; - } - } - - if (!sound) - { - printf("\n"); - printf("Error occurred or stream ended. Restarting stream..\n"); - result = system->createSound(argv[1], FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING, 0, &sound); - ERRCHECK(result); - Sleep(1000); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} diff --git a/CocosDenshion/third_party/fmod/examples/submixing/Makefile b/CocosDenshion/third_party/fmod/examples/submixing/Makefile deleted file mode 100644 index 62b648c89e..0000000000 --- a/CocosDenshion/third_party/fmod/examples/submixing/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -submixing_cpp: main.cpp - g++ -O3 -o submixing main.cpp ../../api/lib/libfmodex.so -pthread - -submixing_c: main.c - g++ -O3 -o submixing main.c ../../api/lib/libfmodex.so -pthread - -run: - ./submixing - -clean: - rm -f submixing diff --git a/CocosDenshion/third_party/fmod/examples/submixing/main.c b/CocosDenshion/third_party/fmod/examples/submixing/main.c deleted file mode 100644 index 163faeefca..0000000000 --- a/CocosDenshion/third_party/fmod/examples/submixing/main.c +++ /dev/null @@ -1,269 +0,0 @@ -/*=============================================================================================== - Submixing Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to put channels into channel groups, so that you can affect a group - of channels at a time instead of just one channel at a time. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound[5]; - FMOD_CHANNEL *channel[5]; - FMOD_CHANNELGROUP *groupA, *groupB, *masterGroup; - FMOD_DSP *dspreverb, *dspflange, *dsplowpass; - FMOD_RESULT result; - int key, count; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/drumloop.wav", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound[0]); - ERRCHECK(result); - result = FMOD_System_CreateSound(system, "../media/jaguar.wav", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound[1]); - ERRCHECK(result); - result = FMOD_System_CreateSound(system, "../media/c.ogg", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound[2]); - ERRCHECK(result); - result = FMOD_System_CreateSound(system, "../media/d.ogg", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound[3]); - ERRCHECK(result); - result = FMOD_System_CreateSound(system, "../media/e.ogg", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound[4]); - ERRCHECK(result); - - result = FMOD_System_CreateChannelGroup(system, "Group A", &groupA); - ERRCHECK(result); - - result = FMOD_System_CreateChannelGroup(system, "Group B", &groupB); - ERRCHECK(result); - - result = FMOD_System_GetMasterChannelGroup(system, &masterGroup); - ERRCHECK(result); - - result = FMOD_ChannelGroup_AddGroup(masterGroup, groupA); - ERRCHECK(result); - - result = FMOD_ChannelGroup_AddGroup(masterGroup, groupB); - ERRCHECK(result); - - printf("======================================================================\n"); - printf("Sub-mixing example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("======================================================================\n"); - printf(" (drumloop.wav) \n"); - printf(" / \n"); - printf(" (groupA) \n"); - printf(" (reverb)/ \\ \n"); - printf(" / (jaguar.wav) \n"); - printf("(soundcard)--(lowpass)--(mastergroup) \n"); - printf(" \\ (c.ogg) \n"); - printf(" (flange) / \n"); - printf(" \\(groupB)--(d.ogg) \n"); - printf(" \\ \n"); - printf(" (e.ogg) \n"); - printf("Press 'A' to mute/unmute group A\n"); - printf("Press 'B' to mute/unmute group B\n"); - printf("\n"); - printf("Press 'R' to place reverb on group A\n"); - printf("Press 'F' to place flange on group B\n"); - printf("Press 'L' to place lowpass on master group (everything)\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Start all the sounds! - */ - for (count = 0; count < 5; count++) - { - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound[count], TRUE, &channel[count]); - ERRCHECK(result); - if (count < 2) - { - result = FMOD_Channel_SetChannelGroup(channel[count], groupA); - } - else - { - result = FMOD_Channel_SetChannelGroup(channel[count], groupB); - } - ERRCHECK(result); - result = FMOD_Channel_SetPaused(channel[count], FALSE); - ERRCHECK(result); - } - - /* - Create the DSP effects we want to apply to our submixes. - */ - result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_SFXREVERB, &dspreverb); - ERRCHECK(result); - - result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_FLANGE, &dspflange); - ERRCHECK(result); - result = FMOD_DSP_SetParameter(dspflange, FMOD_DSP_FLANGE_RATE, 1.0f); - ERRCHECK(result); - - result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_LOWPASS, &dsplowpass); - ERRCHECK(result); - result = FMOD_DSP_SetParameter(dsplowpass, FMOD_DSP_LOWPASS_CUTOFF, 500.0f); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'a' : - case 'A' : - { - static int mute = TRUE; - - FMOD_ChannelGroup_SetMute(groupA, mute); - - mute = !mute; - break; - } - case 'b' : - case 'B' : - { - static int mute = TRUE; - - FMOD_ChannelGroup_SetMute(groupB, mute); - - mute = !mute; - break; - } - case 'r' : - case 'R' : - { - static int reverb = TRUE; - - if (reverb) - { - FMOD_ChannelGroup_AddDSP(groupA, dspreverb, 0); - } - else - { - FMOD_DSP_Remove(dspreverb); - } - - reverb = !reverb; - break; - } - case 'f' : - case 'F' : - { - static int flange = TRUE; - - if (flange) - { - FMOD_ChannelGroup_AddDSP(groupB, dspflange, 0); - } - else - { - FMOD_DSP_Remove(dspflange); - } - - flange = !flange; - break; - } - case 'l' : - case 'L' : - { - static int lowpass = TRUE; - - if (lowpass) - { - FMOD_ChannelGroup_AddDSP(masterGroup, dsplowpass, 0); - } - else - { - FMOD_DSP_Remove(dsplowpass); - } - - lowpass = !lowpass; - break; - } - } - } - - FMOD_System_Update(system); - - { - int channelsplaying = 0; - - FMOD_System_GetChannelsPlaying(system, &channelsplaying); - - printf("Channels Playing %2d\r", channelsplaying); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - for (count = 0; count < 5; count++) - { - result = FMOD_Sound_Release(sound[count]); - ERRCHECK(result); - } - - result = FMOD_DSP_Release(dspreverb); - ERRCHECK(result); - result = FMOD_DSP_Release(dspflange); - ERRCHECK(result); - result = FMOD_DSP_Release(dsplowpass); - ERRCHECK(result); - - result = FMOD_ChannelGroup_Release(groupA); - ERRCHECK(result); - result = FMOD_ChannelGroup_Release(groupB); - ERRCHECK(result); - - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/submixing/main.cpp b/CocosDenshion/third_party/fmod/examples/submixing/main.cpp deleted file mode 100644 index 5d822fddc6..0000000000 --- a/CocosDenshion/third_party/fmod/examples/submixing/main.cpp +++ /dev/null @@ -1,269 +0,0 @@ -/*=============================================================================================== - Submixing Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to put channels into channel groups, so that you can affect a group - of channels at a time instead of just one channel at a time. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound[5]; - FMOD::Channel *channel[5]; - FMOD::ChannelGroup *groupA, *groupB, *masterGroup; - FMOD::DSP *dspreverb, *dspflange, *dsplowpass; - FMOD_RESULT result; - int key, count; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - result = system->createSound("../media/drumloop.wav", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound[0]); - ERRCHECK(result); - result = system->createSound("../media/jaguar.wav", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound[1]); - ERRCHECK(result); - result = system->createSound("../media/c.ogg", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound[2]); - ERRCHECK(result); - result = system->createSound("../media/d.ogg", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound[3]); - ERRCHECK(result); - result = system->createSound("../media/e.ogg", FMOD_SOFTWARE | FMOD_LOOP_NORMAL, 0, &sound[4]); - ERRCHECK(result); - - result = system->createChannelGroup("Group A", &groupA); - ERRCHECK(result); - - result = system->createChannelGroup("Group B", &groupB); - ERRCHECK(result); - - result = system->getMasterChannelGroup(&masterGroup); - ERRCHECK(result); - - result = masterGroup->addGroup(groupA); - ERRCHECK(result); - - result = masterGroup->addGroup(groupB); - ERRCHECK(result); - - printf("======================================================================\n"); - printf("Sub-mixing example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("======================================================================\n"); - printf(" (drumloop.wav) \n"); - printf(" / \n"); - printf(" (groupA) \n"); - printf(" (reverb)/ \\ \n"); - printf(" / (jaguar.wav) \n"); - printf("(soundcard)--(lowpass)--(mastergroup) \n"); - printf(" \\ (c.ogg) \n"); - printf(" (flange) / \n"); - printf(" \\(groupB)--(d.ogg) \n"); - printf(" \\ \n"); - printf(" (e.ogg) \n"); - printf("Press 'A' to mute/unmute group A\n"); - printf("Press 'B' to mute/unmute group B\n"); - printf("\n"); - printf("Press 'R' to place reverb on group A\n"); - printf("Press 'F' to place flange on group B\n"); - printf("Press 'L' to place lowpass on master group (everything)\n"); - printf("Press 'Esc' to quit\n"); - printf("\n"); - - /* - Start all the sounds! - */ - for (count = 0; count < 5; count++) - { - result = system->playSound(FMOD_CHANNEL_FREE, sound[count], true, &channel[count]); - ERRCHECK(result); - if (count < 2) - { - result = channel[count]->setChannelGroup(groupA); - } - else - { - result = channel[count]->setChannelGroup(groupB); - } - ERRCHECK(result); - result = channel[count]->setPaused(false); - ERRCHECK(result); - } - - /* - Create the DSP effects we want to apply to our submixes. - */ - result = system->createDSPByType(FMOD_DSP_TYPE_SFXREVERB, &dspreverb); - ERRCHECK(result); - - result = system->createDSPByType(FMOD_DSP_TYPE_FLANGE, &dspflange); - ERRCHECK(result); - result = dspflange->setParameter(FMOD_DSP_FLANGE_RATE, 1.0f); - ERRCHECK(result); - - result = system->createDSPByType(FMOD_DSP_TYPE_LOWPASS, &dsplowpass); - ERRCHECK(result); - result = dsplowpass->setParameter(FMOD_DSP_LOWPASS_CUTOFF, 500.0f); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case 'a' : - case 'A' : - { - static bool mute = true; - - groupA->setMute(mute); - - mute = !mute; - break; - } - case 'b' : - case 'B' : - { - static bool mute = true; - - groupB->setMute(mute); - - mute = !mute; - break; - } - case 'r' : - case 'R' : - { - static bool reverb = true; - - if (reverb) - { - groupA->addDSP(dspreverb, 0); - } - else - { - dspreverb->remove(); - } - - reverb = !reverb; - break; - } - case 'f' : - case 'F' : - { - static bool flange = true; - - if (flange) - { - groupB->addDSP(dspflange, 0); - } - else - { - dspflange->remove(); - } - - flange = !flange; - break; - } - case 'l' : - case 'L' : - { - static bool lowpass = true; - - if (lowpass) - { - masterGroup->addDSP(dsplowpass, 0); - } - else - { - dsplowpass->remove(); - } - - lowpass = !lowpass; - break; - } - } - } - - system->update(); - - { - int channelsplaying = 0; - - system->getChannelsPlaying(&channelsplaying); - - printf("Channels Playing %2d\r", channelsplaying); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - for (count = 0; count < 5; count++) - { - result = sound[count]->release(); - ERRCHECK(result); - } - - result = dspreverb->release(); - ERRCHECK(result); - result = dspflange->release(); - ERRCHECK(result); - result = dsplowpass->release(); - ERRCHECK(result); - - result = groupA->release(); - ERRCHECK(result); - result = groupB->release(); - ERRCHECK(result); - - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/useplugins/Makefile b/CocosDenshion/third_party/fmod/examples/useplugins/Makefile deleted file mode 100644 index a943087296..0000000000 --- a/CocosDenshion/third_party/fmod/examples/useplugins/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -useplugins_cpp: main.cpp - g++ -O3 -o useplugins main.cpp ../../api/lib/libfmodex.so -pthread - -useplugins_c: main.c - g++ -O3 -o useplugins main.c ../../api/lib/libfmodex.so -pthread - -run: - ./useplugins - -clean: - rm -f useplugins diff --git a/CocosDenshion/third_party/fmod/examples/useplugins/main.c b/CocosDenshion/third_party/fmod/examples/useplugins/main.c deleted file mode 100644 index d15c6ba7cb..0000000000 --- a/CocosDenshion/third_party/fmod/examples/useplugins/main.c +++ /dev/null @@ -1,249 +0,0 @@ -/*=============================================================================================== - Use Plugins Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to use FMODEXP.DLYLIB and its associated plugins. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system = 0; - FMOD_SOUND *sound = 0; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - int count; - int playing = FALSE; - int key; - unsigned int version; - int numoutputplugins = 0; - unsigned int handle = 0; - - /* - Global Settings - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - /* - Set the source directory for all of the FMOD plugins. - */ - result = FMOD_System_SetPluginPath(system, "../../api/plugins"); - ERRCHECK(result); - - /* - Display plugins - */ - { - int num; - char name[256]; - - printf("Codec plugins\n"); - printf("--------------\n"); - result = FMOD_System_GetNumPlugins(system, FMOD_PLUGINTYPE_CODEC, &num); - ERRCHECK(result); - for (count = 0; count < num; count++) - { - result = FMOD_System_GetPluginHandle(system, FMOD_PLUGINTYPE_CODEC, count, &handle); - ERRCHECK(result); - - result = FMOD_System_GetPluginInfo(system, handle, 0, name, 256, 0); - ERRCHECK(result); - - printf("%2d - %-30s", count + 1, name); - - if (count % 2) - { - printf("\n"); - } - } - printf("\n"); - if (count % 2) - { - printf("\n"); - } - - printf("DSP plugins\n"); - printf("--------------\n"); - result = FMOD_System_GetNumPlugins(system, FMOD_PLUGINTYPE_DSP, &num); - ERRCHECK(result); - for (count = 0; count < num; count++) - { - result = FMOD_System_GetPluginHandle(system, FMOD_PLUGINTYPE_DSP, count, &handle); - ERRCHECK(result); - - result = FMOD_System_GetPluginInfo(system, handle, 0, name, 256, 0); - ERRCHECK(result); - - printf("%2d - %-30s", count + 1, name); - - if (count % 2) - { - printf("\n"); - } - } - printf("\n"); - if (count % 2) - { - printf("\n"); - } - - printf("Output plugins\n"); - printf("--------------\n"); - result = FMOD_System_GetNumPlugins(system, FMOD_PLUGINTYPE_OUTPUT, &num); - ERRCHECK(result); - for (count = 0; count < num; count++) - { - result = FMOD_System_GetPluginHandle(system, FMOD_PLUGINTYPE_OUTPUT, count, &handle); - ERRCHECK(result); - - result = FMOD_System_GetPluginInfo(system, handle, 0, name, 256, 0); - ERRCHECK(result); - - printf("%2d - %-30s", count + 1, name); - - if (count % 2) - { - printf("\n"); - } - } - if (count % 2) - { - printf("\n"); - } - - numoutputplugins = num; - } - - /* - System initialization - */ - printf("-----------------------------------------------------------------------\n"); // print driver names - printf("Press a corresponding number for an OUTPUT PLUGIN to use or ESC to quit\n"); - - do - { - key = getch(); - } while (!(key == 27 || (key >= '1' && key <= '0' + numoutputplugins))); - - if (key == 27) - { - return 0; - } - - result = FMOD_System_GetPluginHandle(system, FMOD_PLUGINTYPE_OUTPUT, key - '1', &handle); - ERRCHECK(result); - - result = FMOD_System_SetOutputByPlugin(system, handle); - ERRCHECK(result); - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - result = FMOD_System_CreateSound(system, "../media/wave.mp3", FMOD_SOFTWARE | FMOD_CREATESTREAM, 0, &sound); - ERRCHECK(result); - - printf("Press a key to play sound to output device.\n"); - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, &channel); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - unsigned int ms = 0; - unsigned int lenms = 0; - int paused = FALSE; - int channelsplaying = 0; - FMOD_SOUND *currentsound = 0; - - FMOD_System_Update(system); - - playing = FALSE; - - result = FMOD_Channel_IsPlaying(channel, &playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPaused(channel, &paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - FMOD_Channel_GetCurrentSound(channel, ¤tsound); - if (currentsound) - { - result = FMOD_Sound_GetLength(currentsound, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - - FMOD_System_GetChannelsPlaying(system, &channelsplaying); - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s : Channels Playing %2d\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped", channelsplaying); - fflush(stdout); - - Sleep(5); - - if (kbhit()) - { - key = getch(); - if (key == 27) - { - break; - } - } - - } while (playing); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/useplugins/main.cpp b/CocosDenshion/third_party/fmod/examples/useplugins/main.cpp deleted file mode 100644 index 959e56fc90..0000000000 --- a/CocosDenshion/third_party/fmod/examples/useplugins/main.cpp +++ /dev/null @@ -1,249 +0,0 @@ -/*=============================================================================================== - Use Plugins Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how to use FMODEXP.DYLIB and its associated plugins. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system = 0; - FMOD::Sound *sound = 0; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - int count; - bool playing = false; - int key; - unsigned int version; - int numoutputplugins = 0; - unsigned int handle = 0; - - /* - Global Settings - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - getch(); - return 0; - } - - /* - Set the source directory for all of the FMOD plugins. - */ - result = system->setPluginPath("../../api/plugins"); - ERRCHECK(result); - - /* - Display plugins - */ - { - int num; - char name[256]; - - printf("Codec plugins\n"); - printf("--------------\n"); - result = system->getNumPlugins(FMOD_PLUGINTYPE_CODEC, &num); - ERRCHECK(result); - for (count = 0; count < num; count++) - { - result = system->getPluginHandle(FMOD_PLUGINTYPE_CODEC, count, &handle); - ERRCHECK(result); - - result = system->getPluginInfo(handle, 0, name, 256, 0); - ERRCHECK(result); - - printf("%2d - %-30s", count + 1, name); - - if (count % 2) - { - printf("\n"); - } - } - printf("\n"); - if (count % 2) - { - printf("\n"); - } - - printf("DSP plugins\n"); - printf("--------------\n"); - result = system->getNumPlugins(FMOD_PLUGINTYPE_DSP, &num); - ERRCHECK(result); - for (count = 0; count < num; count++) - { - result = system->getPluginHandle(FMOD_PLUGINTYPE_DSP, count, &handle); - ERRCHECK(result); - - result = system->getPluginInfo(handle, 0, name, 256, 0); - ERRCHECK(result); - - printf("%2d - %-30s", count + 1, name); - - if (count % 2) - { - printf("\n"); - } - } - printf("\n"); - if (count % 2) - { - printf("\n"); - } - - printf("Output plugins\n"); - printf("--------------\n"); - result = system->getNumPlugins(FMOD_PLUGINTYPE_OUTPUT, &num); - ERRCHECK(result); - for (count = 0; count < num; count++) - { - result = system->getPluginHandle(FMOD_PLUGINTYPE_OUTPUT, count, &handle); - ERRCHECK(result); - - result = system->getPluginInfo(handle, 0, name, 256, 0); - ERRCHECK(result); - - printf("%2d - %-30s", count + 1, name); - - if (count % 2) - { - printf("\n"); - } - } - if (count % 2) - { - printf("\n"); - } - - numoutputplugins = num; - } - - /* - System initialization - */ - printf("-----------------------------------------------------------------------\n"); // print driver names - printf("Press a corresponding number for an OUTPUT PLUGIN to use or ESC to quit\n"); - - do - { - key = getch(); - } while (!(key == 27 || (key >= '1' && key <= '0' + numoutputplugins))); - - if (key == 27) - { - return 0; - } - - result = system->getPluginHandle(FMOD_PLUGINTYPE_OUTPUT, key - '1', &handle); - ERRCHECK(result); - - result = system->setOutputByPlugin(handle); - ERRCHECK(result); - - result = system->init(32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - result = system->createSound("../media/wave.mp3", FMOD_SOFTWARE | FMOD_CREATESTREAM, 0, &sound); - ERRCHECK(result); - - printf("Press a key to play sound to output device.\n"); - - result = system->playSound(FMOD_CHANNEL_FREE, sound, 0, &channel); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - unsigned int ms = 0; - unsigned int lenms = 0; - bool paused = false; - int channelsplaying = 0; - FMOD::Sound *currentsound = 0; - - system->update(); - - playing = false; - - result = channel->isPlaying(&playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPaused(&paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - channel->getCurrentSound(¤tsound); - if (currentsound) - { - result = currentsound->getLength(&lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - } - - system->getChannelsPlaying(&channelsplaying); - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s : Channels Playing %2d\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped", channelsplaying); - fflush(stdout); - Sleep(5); - - if (kbhit()) - { - key = getch(); - if (key == 27) - { - break; - } - } - - } while (playing); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/usercreatedsound/Makefile b/CocosDenshion/third_party/fmod/examples/usercreatedsound/Makefile deleted file mode 100644 index 91ff1ee470..0000000000 --- a/CocosDenshion/third_party/fmod/examples/usercreatedsound/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -usercreatedsound_cpp: main.cpp - g++ -O3 -o usercreatedsound main.cpp ../../api/lib/libfmodex.so - -usercreatedsound_c: main.c - g++ -O3 -o usercreatedsound main.c ../../api/lib/libfmodex.so - -run: - ./usercreatedsound - -clean: - rm -f usercreatedsound diff --git a/CocosDenshion/third_party/fmod/examples/usercreatedsound/main.c b/CocosDenshion/third_party/fmod/examples/usercreatedsound/main.c deleted file mode 100644 index ddfe5474e9..0000000000 --- a/CocosDenshion/third_party/fmod/examples/usercreatedsound/main.c +++ /dev/null @@ -1,215 +0,0 @@ -/*=============================================================================================== - User Created Sound Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how create a sound with data filled by the user. - It shows a user created static sample, followed by a user created stream. - The former allocates all memory needed for the sound and is played back as a static sample, - while the latter streams the data in chunks as it plays, using far less memory. -===============================================================================================*/ -#include "../../api/inc/fmod.h" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include -#include - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -FMOD_RESULT F_CALLBACK pcmreadcallback(FMOD_SOUND *sound, void *data, unsigned int datalen) -{ - unsigned int count; - static float t1 = 0, t2 = 0; // time - static float v1 = 0, v2 = 0; // velocity - signed short *stereo16bitbuffer = (signed short *)data; - - for (count=0; count>2; count++) // >>2 = 16bit stereo (4 bytes per sample) - { - *stereo16bitbuffer++ = (signed short)(sin(t1) * 32767.0f); // left channel - *stereo16bitbuffer++ = (signed short)(sin(t2) * 32767.0f); // right channel - - t1 += 0.01f + v1; - t2 += 0.0142f + v2; - v1 += (float)(sin(t1) * 0.002f); - v2 += (float)(sin(t2) * 0.002f); - } - - return FMOD_OK; -} - - -FMOD_RESULT F_CALLBACK pcmsetposcallback(FMOD_SOUND *sound, int subsound, unsigned int position, FMOD_TIMEUNIT postype) -{ - /* - This is useful if the user calls FMOD_Sound_SetPosition and you want to seek your data accordingly. - */ - return FMOD_OK; -} - - -int main(int argc, char *argv[]) -{ - FMOD_SYSTEM *system; - FMOD_SOUND *sound; - FMOD_CHANNEL *channel = 0; - FMOD_RESULT result; - FMOD_MODE mode = FMOD_2D | FMOD_OPENUSER | FMOD_LOOP_NORMAL | FMOD_HARDWARE; - int key; - int channels = 2; - FMOD_CREATESOUNDEXINFO createsoundexinfo; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD_System_Create(&system); - ERRCHECK(result); - - result = FMOD_System_GetVersion(system, &version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NULL); - ERRCHECK(result); - - printf("============================================================================\n"); - printf("User Created Sound Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("============================================================================\n"); - printf("Sound played here is generated in realtime. It will either play as a stream\n"); - printf("which means it is continually filled as it is playing, or it will play as a \n"); - printf("static sample, which means it is filled once as the sound is created, then \n"); - printf("when played it will just play that short loop of data. \n"); - printf("============================================================================\n"); - printf("\n"); - - do - { - printf("Press 1 to play as a runtime decoded stream. (will carry on infinitely)\n"); - printf("Press 2 to play as a static in memory sample. (loops a short block of data)\n"); - printf("Press Esc to quit.\n\n"); - key = getch(); - - } while (key != 27 && key != '1' && key != '2'); - - if (key == 27) - { - return 0; - } - else if (key == '1') - { - mode |= FMOD_CREATESTREAM; - } - - memset(&createsoundexinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - createsoundexinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); /* required. */ - createsoundexinfo.decodebuffersize = 44100; /* Chunk size of stream update in samples. This will be the amount of data passed to the user callback. */ - createsoundexinfo.length = 44100 * channels * sizeof(signed short) * 5; /* Length of PCM data in bytes of whole song (for Sound::getLength) */ - createsoundexinfo.numchannels = channels; /* Number of channels in the sound. */ - createsoundexinfo.defaultfrequency = 44100; /* Default playback rate of sound. */ - createsoundexinfo.format = FMOD_SOUND_FORMAT_PCM16; /* Data format of sound. */ - createsoundexinfo.pcmreadcallback = pcmreadcallback; /* User callback for reading. */ - createsoundexinfo.pcmsetposcallback = pcmsetposcallback; /* User callback for seeking. */ - - result = FMOD_System_CreateSound(system, 0, mode, &createsoundexinfo, &sound); - ERRCHECK(result); - - printf("Press space to pause, Esc to quit\n"); - printf("\n"); - - /* - Play the sound. - */ - - result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, &channel); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - int paused; - FMOD_Channel_GetPaused(channel, &paused); - FMOD_Channel_SetPaused(channel, !paused); - break; - } - } - } - - FMOD_System_Update(system); - - if (channel) - { - unsigned int ms; - unsigned int lenms; - int playing; - int paused; - - FMOD_Channel_IsPlaying(channel, &playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPaused(channel, &paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Channel_GetPosition(channel, &ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = FMOD_Sound_GetLength(sound, &lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped"); - fflush(stdout); - } - - Sleep(10); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = FMOD_Sound_Release(sound); - ERRCHECK(result); - result = FMOD_System_Close(system); - ERRCHECK(result); - result = FMOD_System_Release(system); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/examples/usercreatedsound/main.cpp b/CocosDenshion/third_party/fmod/examples/usercreatedsound/main.cpp deleted file mode 100644 index d0acb53a25..0000000000 --- a/CocosDenshion/third_party/fmod/examples/usercreatedsound/main.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/*=============================================================================================== - User Created Sound Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - This example shows how create a sound with data filled by the user. - It shows a user created static sample, followed by a user created stream. - The former allocates all memory needed for the sound and is played back as a static sample, - while the latter streams the data in chunks as it plays, using far less memory. -===============================================================================================*/ -#include "../../api/inc/fmod.hpp" -#include "../../api/inc/fmod_errors.h" -#include "../common/wincompat.h" -#include -#include - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -FMOD_RESULT F_CALLBACK pcmreadcallback(FMOD_SOUND *sound, void *data, unsigned int datalen) -{ - unsigned int count; - static float t1 = 0, t2 = 0; // time - static float v1 = 0, v2 = 0; // velocity - signed short *stereo16bitbuffer = (signed short *)data; - - for (count=0; count>2; count++) // >>2 = 16bit stereo (4 bytes per sample) - { - *stereo16bitbuffer++ = (signed short)(sin(t1) * 32767.0f); // left channel - *stereo16bitbuffer++ = (signed short)(sin(t2) * 32767.0f); // right channel - - t1 += 0.01f + v1; - t2 += 0.0142f + v2; - v1 += (float)(sin(t1) * 0.002f); - v2 += (float)(sin(t2) * 0.002f); - } - - return FMOD_OK; -} - - -FMOD_RESULT F_CALLBACK pcmsetposcallback(FMOD_SOUND *sound, int subsound, unsigned int position, FMOD_TIMEUNIT postype) -{ - /* - This is useful if the user calls Sound::setPosition and you want to seek your data accordingly. - */ - return FMOD_OK; -} - - -int main(int argc, char *argv[]) -{ - FMOD::System *system; - FMOD::Sound *sound; - FMOD::Channel *channel = 0; - FMOD_RESULT result; - FMOD_MODE mode = FMOD_2D | FMOD_OPENUSER | FMOD_LOOP_NORMAL | FMOD_HARDWARE; - int key; - int channels = 2; - FMOD_CREATESOUNDEXINFO createsoundexinfo; - unsigned int version; - - /* - Create a System object and initialize. - */ - result = FMOD::System_Create(&system); - ERRCHECK(result); - - result = system->getVersion(&version); - ERRCHECK(result); - - if (version < FMOD_VERSION) - { - printf("Error! You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION); - return 0; - } - - result = system->init(32, FMOD_INIT_NORMAL, 0); - ERRCHECK(result); - - printf("============================================================================\n"); - printf("User Created Sound Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("============================================================================\n"); - printf("Sound played here is generated in realtime. It will either play as a stream\n"); - printf("which means it is continually filled as it is playing, or it will play as a \n"); - printf("static sample, which means it is filled once as the sound is created, then \n"); - printf("when played it will just play that short loop of data. \n"); - printf("============================================================================\n"); - printf("\n"); - - do - { - printf("Press 1 to play as a runtime decoded stream. (will carry on infinitely)\n"); - printf("Press 2 to play as a static in memory sample. (loops a short block of data)\n"); - printf("Press Esc to quit.\n\n"); - key = getch(); - - } while (key != 27 && key != '1' && key != '2'); - - if (key == 27) - { - return 0; - } - else if (key == '1') - { - mode |= FMOD_CREATESTREAM; - } - - memset(&createsoundexinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); - createsoundexinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); /* required. */ - createsoundexinfo.decodebuffersize = 44100; /* Chunk size of stream update in samples. This will be the amount of data passed to the user callback. */ - createsoundexinfo.length = 44100 * channels * sizeof(signed short) * 5; /* Length of PCM data in bytes of whole song (for Sound::getLength) */ - createsoundexinfo.numchannels = channels; /* Number of channels in the sound. */ - createsoundexinfo.defaultfrequency = 44100; /* Default playback rate of sound. */ - createsoundexinfo.format = FMOD_SOUND_FORMAT_PCM16; /* Data format of sound. */ - createsoundexinfo.pcmreadcallback = pcmreadcallback; /* User callback for reading. */ - createsoundexinfo.pcmsetposcallback = pcmsetposcallback; /* User callback for seeking. */ - - result = system->createSound(0, mode, &createsoundexinfo, &sound); - ERRCHECK(result); - - printf("Press space to pause, Esc to quit\n"); - printf("\n"); - - /* - Play the sound. - */ - - result = system->playSound(FMOD_CHANNEL_FREE, sound, 0, &channel); - ERRCHECK(result); - - /* - Main loop. - */ - do - { - if (kbhit()) - { - key = getch(); - - switch (key) - { - case ' ' : - { - bool paused; - channel->getPaused(&paused); - channel->setPaused(!paused); - break; - } - } - } - - system->update(); - - if (channel) - { - unsigned int ms; - unsigned int lenms; - bool playing; - bool paused; - - channel->isPlaying(&playing); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPaused(&paused); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = channel->getPosition(&ms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - result = sound->getLength(&lenms, FMOD_TIMEUNIT_MS); - if ((result != FMOD_OK) && (result != FMOD_ERR_INVALID_HANDLE) && (result != FMOD_ERR_CHANNEL_STOLEN)) - { - ERRCHECK(result); - } - - printf("Time %02d:%02d:%02d/%02d:%02d:%02d : %s\r", ms / 1000 / 60, ms / 1000 % 60, ms / 10 % 100, lenms / 1000 / 60, lenms / 1000 % 60, lenms / 10 % 100, paused ? "Paused " : playing ? "Playing" : "Stopped"); - fflush(stdout); - } - - Sleep(20); - - } while (key != 27); - - printf("\n"); - - /* - Shut down - */ - result = sound->release(); - ERRCHECK(result); - result = system->close(); - ERRCHECK(result); - result = system->release(); - ERRCHECK(result); - - return 0; -} - - diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/README.TXT b/CocosDenshion/third_party/fmod/fmoddesignerapi/README.TXT deleted file mode 100644 index f6dacfe968..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/README.TXT +++ /dev/null @@ -1,57 +0,0 @@ ----------------------------------------------------------------------------- - FMOD Designer 4.36.01 - Copyright (c) Firelight Technologies Pty, Ltd, - 2004-2011 ----------------------------------------------------------------------------- - - http://www.fmod.org - - ----------------------------------------------------------------------------- -Engine sounds by Greg Hill - Soundwave Concepts. ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- -Platform specific issues. ----------------------------------------------------------------------------- - -Report all bugs to support@fmod.org. - - ----------------------------------------------------------------------------- -FMOD End User License Agreement ----------------------------------------------------------------------------- - -FMOD's names, sources, documentation and binaries contained within the -distributed archive are copyright © Firelight Technologies, Pty, Ltd. -1994-2011. - -The contents of the FMOD distribution archive may not be redistributed, -reproduced, modified, transmitted, broadcast, published or adapted in any -way, shape or form, without the prior written consent of the owner, -Firelight Technologies, be it by tangible or non tangible media. - -The fmod.dll file may be redistributed without the authors prior permission, -and must remain unmodified. The use of dll 'static linking' tools that aim -to hide the fmod library are forbidden. - -FMOD may not be used in a commercial product, or product that directly or -indirectly receives income with the aid of the FMOD sound library, without -a commercial license from Firelight Technologies. Releasing a product -without a commercial license in this instance is a breach of the FMOD EULA -and parties who violate this license will be prosecuted under the full -extent of the law. - - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event.h b/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event.h deleted file mode 100644 index 06125021d8..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event.h +++ /dev/null @@ -1,1244 +0,0 @@ -/*$ preserve start $*/ - -/* ============================================================================================ */ -/* FMOD Ex - Main C/C++ event/data driven system header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2011. */ -/* */ -/* This header is the base header for all other FMOD EventSystem headers. If you are */ -/* programming in C use this exclusively, or if you are programming C++ use this in */ -/* conjunction with FMOD_EVENT.HPP */ -/* ============================================================================================ */ - -#ifndef __FMOD_EVENT_H__ -#define __FMOD_EVENT_H__ - -#ifndef _FMOD_H -#include "fmod.h" -#endif - -/* - FMOD EventSystem version number. Check this against FMOD::EventSystem::getVersion. - 0xaaaabbcc -> aaaa = major version number. bb = minor version number. cc = development version number. -*/ - -#define FMOD_EVENT_VERSION 0x00043601 - -/* - FMOD event types -*/ - -typedef struct FMOD_EVENTSYSTEM FMOD_EVENTSYSTEM; -typedef struct FMOD_EVENTPROJECT FMOD_EVENTPROJECT; -typedef struct FMOD_EVENTGROUP FMOD_EVENTGROUP; -typedef struct FMOD_EVENTCATEGORY FMOD_EVENTCATEGORY; -typedef struct FMOD_EVENT FMOD_EVENT; -typedef struct FMOD_EVENTPARAMETER FMOD_EVENTPARAMETER; -typedef struct FMOD_EVENTREVERB FMOD_EVENTREVERB; -typedef struct FMOD_EVENTQUEUE FMOD_EVENTQUEUE; -typedef struct FMOD_EVENTQUEUEENTRY FMOD_EVENTQUEUEENTRY; -typedef struct FMOD_MUSICPROMPT FMOD_MUSICPROMPT; -typedef struct FMOD_MUSICSYSTEM FMOD_MUSICSYSTEM; -typedef unsigned int FMOD_EVENT_INITFLAGS; -typedef unsigned int FMOD_EVENT_MODE; -typedef unsigned int FMOD_EVENT_STATE; -typedef unsigned int FMOD_MUSIC_ID; -typedef FMOD_MUSIC_ID FMOD_MUSIC_CUE_ID; -typedef FMOD_MUSIC_ID FMOD_MUSIC_PARAM_ID; - - -/* -[DEFINE] -[ - [NAME] - FMOD_EVENT_INITFLAGS - - [DESCRIPTION] - Initialization flags. Use them with EventSystem::init in the eventflags parameter to change various behaviour. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - EventSystem::init - EventSystem::getEventByGUID - FMOD_EVENT_SOUNDDEFINFO - FMOD_EVENT_CALLBACKTYPE -] -*/ -#define FMOD_EVENT_INIT_NORMAL 0x00000000 /* All platforms - Initialize normally */ -#define FMOD_EVENT_INIT_USER_ASSETMANAGER 0x00000001 /* All platforms - All wave data loading/freeing will be referred back to the programmer through the FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE/FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE callback */ -#define FMOD_EVENT_INIT_FAIL_ON_MAXSTREAMS 0x00000002 /* All platforms - Events will fail if "Max streams" was reached when playing streamed banks, instead of going virtual. */ -#define FMOD_EVENT_INIT_DONTUSENAMES 0x00000004 /* All platforms - All event/eventgroup/eventparameter/eventcategory/eventreverb names will be discarded on load. Use getXXXByIndex to access them. This may potentially save a lot of memory at runtime. */ -#define FMOD_EVENT_INIT_UPPERCASE_FILENAMES 0x00000008 /* All platforms - All FSB filenames will be translated to upper case before being used. */ -#define FMOD_EVENT_INIT_LOWERCASE_FILENAMES 0x00000080 /* All platforms - All FSB filenames will be translated to lower case before being used. */ -#define FMOD_EVENT_INIT_SEARCH_PLUGINS 0x00000010 /* All platforms - Search the current directory for dsp/codec plugins on EventSystem::init. */ -#define FMOD_EVENT_INIT_USE_GUIDS 0x00000020 /* All platforms - Build an event GUID table when loading FEVs so that EventSystem::getEventByGUID can be used. */ -#define FMOD_EVENT_INIT_DETAILED_SOUNDDEF_INFO 0x00000040 /* All platforms - Pass an FMOD_EVENT_SOUNDDEFINFO struct to FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEX callbacks rather than just the sound definition name (uses more memory for sound definition waveform names). */ -#define FMOD_EVENT_INIT_RESETPARAMSTOMINIMUM 0x00000100 /* All platforms - Reset parameters to minimum value when getting an event instance instead of using the INFO_ONLY event's values. */ -#define FMOD_EVENT_INIT_ELEVATION_AFFECTS_LISTENER_ANGLE 0x00000200 /* All platforms - The listener angle event parameters will be affected by elevation, and not just horizontal components. */ -#define FMOD_EVENT_INIT_DONTUSELOWMEM 0x00000400 /* All platforms - Instruct the event system to NOT use FMOD_LOWMEM when it opens .FSB files. Specify this flag if you need access to the names of individual subsounds in loaded .FSB files. Specifying this flag will make the event system use more memory. */ - -/* [DEFINE_END] */ - - -/* -[DEFINE] -[ - [NAME] - FMOD_EVENT_MODE - - [DESCRIPTION] - Event data loading bitfields. Bitwise OR them together for controlling how event data is loaded. - - [REMARKS] - FMOD_EVENT_NONBLOCKING_THREAD0-4. This flag extends FMOD_EVENT_NONBLOCKING to allow multiple asynchronous loads to happen on different threads at the same time.
- FMOD_EVENT_NONBLOCKING by itself will always execute on thread 0 by default. Up to 5 simultaneous threads for loading at once are supported.
- Only 1 flag should be specified at a time. If multiple flags are specified an FMOD_ERR_INVALID_PARAM error will be returned.
- FMOD_EVENT_NONBLOCKING_THREAD0-4 can be specified without the FMOD_EVENT_NONBLOCKING flag being used (it automatically includes it) - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - EventGroup::loadEventData - EventGroup::getEvent - EventGroup::getEventByIndex -] -*/ -#define FMOD_EVENT_DEFAULT 0x00000000 /* FMOD_EVENT_DEFAULT specifies default loading behaviour i.e. event data for the whole group is NOT cached and the function that initiated the loading process will block until loading is complete. */ -#define FMOD_EVENT_NONBLOCKING 0x00000001 /* For loading event data asynchronously. FMOD will use a thread to load the data. Use Event::getState to find out when loading is complete. */ -#define FMOD_EVENT_ERROR_ON_DISKACCESS 0x00000002 /* For EventGroup::getEvent / EventGroup::getEventByIndex. If EventGroup::loadEventData has accidently been forgotten this flag will return an FMOD_ERR_FILE_UNWANTED if the getEvent function tries to load data. */ -#define FMOD_EVENT_INFOONLY 0x00000004 /* For EventGroup::getEvent / EventGroup::getEventByIndex. Don't allocate instances or load data, just get a handle to allow user to get information from the event. */ -#define FMOD_EVENT_USERDSP 0x00000008 /* For EventGroup::getEvent / EventGroup::getEventByIndex. Tells FMOD that you plan to add your own DSP effects to this event's ChannelGroup at runtime. Omitting this flag will yield a small memory gain. */ - -#define FMOD_EVENT_NONBLOCKING_THREAD0 (FMOD_EVENT_NONBLOCKING) /* FMOD_EVENT_NONBLOCKING, execute on thread 0. See remarks. (default) */ -#define FMOD_EVENT_NONBLOCKING_THREAD1 (FMOD_EVENT_NONBLOCKING | 0x00010000) /* FMOD_EVENT_NONBLOCKING, execute on thread 1. See remarks. */ -#define FMOD_EVENT_NONBLOCKING_THREAD2 (FMOD_EVENT_NONBLOCKING | 0x00020000) /* FMOD_EVENT_NONBLOCKING, execute on thread 2. See remarks. */ -#define FMOD_EVENT_NONBLOCKING_THREAD3 (FMOD_EVENT_NONBLOCKING | 0x00040000) /* FMOD_EVENT_NONBLOCKING, execute on thread 3. See remarks. */ -#define FMOD_EVENT_NONBLOCKING_THREAD4 (FMOD_EVENT_NONBLOCKING | 0x00080000) /* FMOD_EVENT_NONBLOCKING, execute on thread 4. See remarks. */ -/* [DEFINE_END] */ - - -/* -[DEFINE] -[ - [NAME] - FMOD_EVENT_STATE - - [DESCRIPTION] - These values describe what state an event is in. - - [REMARKS] - The flags below can be combined to set multiple states at once. Use bitwise AND operations to test for these. - An example of a combined flag set would be FMOD_EVENT_STATE_READY | FMOD_EVENT_STATE_PLAYING. - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - Event::getState - FMOD_EVENT_MODE -] -*/ -#define FMOD_EVENT_STATE_READY 0x00000001 /* Event is ready to play. */ -#define FMOD_EVENT_STATE_LOADING 0x00000002 /* Loading in progress. */ -#define FMOD_EVENT_STATE_ERROR 0x00000004 /* Failed to open - file not found, out of memory etc. See return value of Event::getState for what happened. */ -#define FMOD_EVENT_STATE_PLAYING 0x00000008 /* Event has been started. This will still be true even if there are no sounds active. Event::stop must be called or the event must stop itself using a 'one shot and stop event' parameter mode. */ -#define FMOD_EVENT_STATE_CHANNELSACTIVE 0x00000010 /* Event has active voices. Use this if you want to detect if sounds are playing in the event or not. */ -#define FMOD_EVENT_STATE_INFOONLY 0x00000020 /* Event was loaded with the FMOD_EVENT_INFOONLY flag. */ -#define FMOD_EVENT_STATE_STARVING 0x00000040 /* Event is streaming but not being fed data in time, so may be stuttering. */ -/* [DEFINE_END] */ - - -/* -[ENUM] -[ - [DESCRIPTION] - Property indices for Event::getPropertyByIndex. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - Event::getPropertyByIndex -] -*/ -typedef enum -{ - FMOD_EVENTPROPERTY_NAME = 0, /* Type : char * - (Readonly) Name of event. */ - FMOD_EVENTPROPERTY_VOLUME, /* Type : float - Relative volume of event. */ - FMOD_EVENTPROPERTY_VOLUMERANDOMIZATION, /* Type : float - Random deviation in volume of event. */ - FMOD_EVENTPROPERTY_PITCH, /* Type : float - Relative pitch of event in raw underlying units. */ - FMOD_EVENTPROPERTY_PITCH_OCTAVES, /* Type : float - Relative pitch of event in octaves. */ - FMOD_EVENTPROPERTY_PITCH_SEMITONES, /* Type : float - Relative pitch of event in semitones. */ - FMOD_EVENTPROPERTY_PITCH_TONES, /* Type : float - Relative pitch of event in tones. */ - FMOD_EVENTPROPERTY_PITCHRANDOMIZATION, /* Type : float - Random deviation in pitch of event in raw underlying units. */ - FMOD_EVENTPROPERTY_PITCHRANDOMIZATION_OCTAVES, /* Type : float - Random deviation in pitch of event in octaves. */ - FMOD_EVENTPROPERTY_PITCHRANDOMIZATION_SEMITONES, /* Type : float - Random deviation in pitch of event in semitones. */ - FMOD_EVENTPROPERTY_PITCHRANDOMIZATION_TONES, /* Type : float - Random deviation in pitch of event in tones. */ - FMOD_EVENTPROPERTY_PRIORITY, /* Type : int - Playback priority of event. */ - FMOD_EVENTPROPERTY_MAX_PLAYBACKS, /* Type : int - (Readonly) Maximum simultaneous playbacks of event. */ - FMOD_EVENTPROPERTY_MAX_PLAYBACKS_BEHAVIOR, /* Type : int - 1 = steal oldest, 2 = steal newest, 3 = steal quietest, 4 = just fail, 5 = just fail if quietest. */ - FMOD_EVENTPROPERTY_MODE, /* Type : FMOD_MODE - Either FMOD_3D or FMOD_2D. */ - FMOD_EVENTPROPERTY_3D_IGNORE_GEOMETRY, /* Type : int - Ignore geometry for that event. 1 = yes, 0 = no. */ - FMOD_EVENTPROPERTY_3D_ROLLOFF, /* Type : FMOD_MODE - Either FMOD_3D_INVERSEROLLOFF, FMOD_3D_LINEARROLLOFF, FMOD_3D_LINEARSQUAREROLLOFF, or none for custom rolloff. */ - FMOD_EVENTPROPERTY_3D_MINDISTANCE, /* Type : float - Minimum 3d distance of event. */ - FMOD_EVENTPROPERTY_3D_MAXDISTANCE, /* Type : float - Maximum 3d distance of event. Means different things depending on EVENTPROPERTY_3D_ROLLOFF. If event has custom rolloff, setting FMOD_EVENTPROPERTY_3D_MAXDISTANCE will scale the range of all distance parameters in this event e.g. set this property to 2.0 to double the range of all distance parameters, set it to 0.5 to halve the range of all distance parameters. */ - FMOD_EVENTPROPERTY_3D_POSITION, /* Type : FMOD_MODE - Either FMOD_3D_HEADRELATIVE or FMOD_3D_WORLDRELATIVE. */ - FMOD_EVENTPROPERTY_3D_CONEINSIDEANGLE, /* Type : float - Event cone inside angle. 0 to 360. */ - FMOD_EVENTPROPERTY_3D_CONEOUTSIDEANGLE, /* Type : float - Event cone outside angle. 0 to 360. */ - FMOD_EVENTPROPERTY_3D_CONEOUTSIDEVOLUME, /* Type : float - Event cone outside volume. 0 to 1.0. */ - FMOD_EVENTPROPERTY_3D_DOPPLERSCALE, /* Type : float - Doppler scale where 0 = no doppler, 1.0 = normal doppler, 2.0 = double doppler etc. */ - FMOD_EVENTPROPERTY_3D_SPEAKERSPREAD, /* Type : float - Angle of spread for stereo/mutlichannel source. 0 to 360. */ - FMOD_EVENTPROPERTY_3D_PANLEVEL, /* Type : float - 0 = sound pans according to speaker levels, 1 = sound pans according to 3D position. */ - FMOD_EVENTPROPERTY_SPEAKER_L, /* Type : float - 2D event volume for front left speaker. */ - FMOD_EVENTPROPERTY_SPEAKER_C, /* Type : float - 2D event volume for front center speaker. */ - FMOD_EVENTPROPERTY_SPEAKER_R, /* Type : float - 2D event volume for front right speaker. */ - FMOD_EVENTPROPERTY_SPEAKER_LS, /* Type : float - 2D event volume for side left speaker. */ - FMOD_EVENTPROPERTY_SPEAKER_RS, /* Type : float - 2D event volume for side right speaker. */ - FMOD_EVENTPROPERTY_SPEAKER_LR, /* Type : float - 2D event volume for back left speaker. */ - FMOD_EVENTPROPERTY_SPEAKER_RR, /* Type : float - 2D event volume for back right speaker. */ - FMOD_EVENTPROPERTY_SPEAKER_LFE, /* Type : float - 2D event volume for low frequency speaker. */ - FMOD_EVENTPROPERTY_REVERBWETLEVEL, /* Type : float - Reverb gain for this event where 0 = full reverb, -60 = no reverb. */ - FMOD_EVENTPROPERTY_ONESHOT, /* Type : int - Oneshot event - stops when no channels playing. 1 = yes, it's a oneshot 0 = no. it's not a oneshot. */ - FMOD_EVENTPROPERTY_FADEIN, /* Type : int - Time in milliseconds over which to fade this event in when programmer starts it. 0 = no fade in. Cannot be set while the event is playing. */ - FMOD_EVENTPROPERTY_FADEOUT, /* Type : int - Time in milliseconds over which to fade this event out when programmer stops it. 0 = no fade out. Cannot be set while the event is playing. */ - FMOD_EVENTPROPERTY_REVERBDRYLEVEL, /* Type : float - Dry reverb gain for this event where 0 = full dry, -60 = no dry. */ - FMOD_EVENTPROPERTY_TIMEOFFSET, /* Type : float - Time offset of sound start in seconds. */ - FMOD_EVENTPROPERTY_SPAWNINTENSITY, /* Type : float - Multiplier for spawn frequency of all sounds in this event. */ - FMOD_EVENTPROPERTY_SPAWNINTENSITY_RANDOMIZATION, /* Type : float - Random deviation in spawn intensity of event. */ - FMOD_EVENTPROPERTY_WII_CONTROLLERSPEAKERS, /* Type : int - Wii only. Use FMOD_WII_CONTROLLER flags defined in fmodwii.h to set which Wii Controller Speaker(s) to play this event on. */ - FMOD_EVENTPROPERTY_3D_POSRANDOMIZATION_MIN, /* Type : unsigned int - Minimum radius of random deviation in the 3D position of event. */ - FMOD_EVENTPROPERTY_3D_POSRANDOMIZATION_MAX, /* Type : unsigned int - Maximum radius of random deviation in the 3D position of event. */ - FMOD_EVENTPROPERTY_EVENTTYPE, /* Type : int - (Readonly) 0 = simple event, 1 = complex event */ - FMOD_EVENTPROPERTY_STEAL_PRIORITY, /* Type : int - 0 to 10000. How important this event is in relation to other events in the project. This event will never steal an event with a higher steal priority than this. */ - FMOD_EVENTPROPERTY_EFFECTS_AFFECT_REVERB, /* Type : int - 0 = default (no), 1 = yes. Alternate routing for reverb path of an event so it goes from the layer dsp unit instead of the channel. */ - FMOD_EVENTPROPERTY_WILL_TERMINATE, /* Type : int - (Readonly) 0 = no, 1 = yes, 2 = unknown (current event state is too complex). Whether this event will terminate (stop playing) by itself. If called on an event instance with this_instance = true, the prediction is based on the current state of that instance. This means parameter values, keyoffs etc. come into play. */ - FMOD_EVENTPROPERTY_DSPCLOCKSTART_HI, /* Type : unsigned int - High 32 bits of a 64 bit DSP clock value, for a start time for any sound in this event. */ - FMOD_EVENTPROPERTY_DSPCLOCKSTART_LO, /* Type : unsigned int - Low 32 bits of a 64 bit DSP clock value, for a start time for any sound in this event. */ - FMOD_EVENTPROPERTY_3D_AUTO_DISTANCE_FILTERING, /* Type : int - 0 = default (no), 1 = yes. Whether to automaically apply the distance effect to sounds in this event. */ - FMOD_EVENTPROPERTY_3D_AUTO_DISTANCE_CENTRE_FREQ, /* Type : float - 10 to 22050. The centre frequency for the distance effect.*/ - FMOD_EVENTPROPERTY_USER_BASE /* User created events start from here onwards. */ -} FMOD_EVENT_PROPERTY; - - -/* -[ENUM] -[ - [DESCRIPTION] - Event property types. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - Event::getPropertyByIndex - Event::getPropertyInfo -] -*/ -typedef enum -{ - FMOD_EVENTPROPERTY_TYPE_INT = 0, /* Property is an int, unsigned int or other type of equivalent sizee e.g. FMOD_MODE. */ - FMOD_EVENTPROPERTY_TYPE_FLOAT, /* Property is a float. */ - FMOD_EVENTPROPERTY_TYPE_STRING /* Property is a char *. */ -} FMOD_EVENTPROPERTY_TYPE; - - -/* -[ENUM] -[ - [DESCRIPTION] - Pitch units for Event::setPitch and EventCategory::setPitch. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - Event::setPitch - EventCategory::setPitch -] -*/ -typedef enum -{ - FMOD_EVENT_PITCHUNITS_RAW = 0, /* Pitch is specified in raw underlying units. */ - FMOD_EVENT_PITCHUNITS_OCTAVES, /* Pitch is specified in units of octaves. */ - FMOD_EVENT_PITCHUNITS_SEMITONES, /* Pitch is specified in units of semitones. */ - FMOD_EVENT_PITCHUNITS_TONES /* Pitch is specified in units of tones. */ -} FMOD_EVENT_PITCHUNITS; - - -/* -[ENUM] -[ - [DESCRIPTION] - Flags to pass to EventGroup::loadEventData to determine what to load at the time of calling. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - EventGroup::loadEventData -] -*/ -typedef enum -{ - FMOD_EVENT_RESOURCE_STREAMS_AND_SAMPLES, /* Open all streams and load all banks into memory, under this group (recursive) */ - FMOD_EVENT_RESOURCE_STREAMS, /* Open all streams under this group (recursive). No samples are loaded. */ - FMOD_EVENT_RESOURCE_SAMPLES /* Load all banks into memory, under this group (recursive). No streams are opened. */ -} FMOD_EVENT_RESOURCE; - - -/* -[ENUM] -[ - [DESCRIPTION] - These callback types are used with FMOD_EVENT_CALLBACK. - - [REMARKS] - Note! Currently the user must call EventSystem::update for these callbacks to trigger!

- - When the event callback is called, 'param1' and 'param2' mean different things depending on the type of callback. Here is an explanation of what these parameters - mean in what context :

 

- - FMOD_EVENT_CALLBACKTYPE_SYNCPOINT -

- param1 = (char *) name of sync point
- param2 = (unsigned int) PCM offset of sync point.
-

- An FMOD_EVENT_CALLBACKTYPE_SYNCPOINT callback is generated from 'markers' embedded in .wav files. - These can be created by placing 'markers' in the original source wavs using a tool such as Sound Forge or Cooledit. - The wavs are then compiled into .FSB files when compiling the audio data using the FMOD designer tool. - Callbacks will be automatically generated at the correct place in the timeline when these markers are encountered - which makes it useful for synchronization, lip syncing etc. -

 

- - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START -

- param1 = (char *) name of sound definition being started
- param2 = (int) index of wave being started inside sound definition (ie for multi wave sound definitions)
-

- An FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START callback is generated each time a sound definition is played in an event. - This happens every time a sound definition starts due to the event parameter entering the region specified in the - layer created by the sound designer. - This also happens when sounds are randomly respawned using the random respawn feature in the sound definition - properties in FMOD designer. -

 

- - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END -

- param1 = (char *) name of sound definition being stopped
- param2 = (int) index of wave being stopped inside sound definition (ie for multi wave sound definitions)
-

- An FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END callback is generated when a one-shot sound definition inside an event ends, - or when a looping sound definition stops due to the event parameter leaving the region specified in the layer created - by the sound designer. -

 

- - FMOD_EVENT_CALLBACKTYPE_STOLEN -

- param1 = 0
- param2 = 0
-

- An FMOD_EVENT_CALLBACKTYPE_STOLEN callback is generated when a getEventXXX call needs to steal an event instance that is in use because - the event's "Max playbacks" has been exceeded. This callback is called before the event is stolen and before the event - is stopped (if it is playing). An FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED callback will be generated when the stolen event is stopped i.e. after - the FMOD_EVENT_CALLBACKTYPE_STOLEN. If the callback function returns FMOD_ERR_EVENT_FAILED, the event will not - be stolen, and the returned value will be passed back as the return value of the getEventXXX call that triggered the steal attempt. -

 

- - FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED -

- param1 = 0
- param2 = 0
-

- An FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED callback is generated whenever an event is stopped for any reason including when the user - calls Event::stop(). -

 

- - FMOD_EVENT_CALLBACKTYPE_NET_MODIFIED -

- param1 = (FMOD_EVENT_PROPERTY) which property was modified
- param2 = (float) the new property value
-

- An FMOD_EVENT_CALLBACKTYPE_NET_MODIFIED callback is generated when someone has connected to your running application with - FMOD Designer and changed a property within this event, for example volume or pitch. -

 

- - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE -

- param1 = (char *) name of sound definition
- param2 [in] = (int *) pointer to index of sound definition entry
- param2 [out] = (FMOD::Sound **) pointer to a valid lower level API FMOD Sound handle
-

- An FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE callback is generated when a "programmer" sound needs to be loaded. -

 

- - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE -

- param1 = (char *) name of sound definition
- param2 = (FMOD::Sound *) the FMOD sound handle that was previously created in FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE
-

- An FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE callback is generated when a "programmer" sound needs to be unloaded. -

 

- - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO -

- param1 = (char *) name of sound definition
- param2 = (FMOD::Sound *) the FMOD sound handle that FMOD will use for this sound definition
-

- An FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO callback is generated when a sound definition is loaded. It can be used to find - information about the specific sound that will be played. -

 

- - FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED -

- param1 = 0
- param2 = 0
-

- An FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED callback is generated whenever an event is started. This callback will be called before any sounds in the event have begun to play. -

 

- - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEX -

- param1 = (char *) name of sound definition if FMOD_EVENT_INIT_DETAILED_SOUNDDEF_INFO was not specified
- param1 = (FMOD_EVENT_SOUNDDEFINFO *) sound definition info struct if FMOD_EVENT_INIT_DETAILED_SOUNDDEF_INFO was specified
- param2 [in] = (int *) pointer to number of entries in this sound definition
- *param2 [out] = (int) index of sound definition entry to select
-

- An FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEX callback is generated when a sound definition entry needs to be chosen from a "ProgrammerSelected" sound definition. -

 

- - FMOD_EVENT_CALLBACKTYPE_OCCLUSION -

- param1 = (float *) pointer to a floating point direct value that can be read and modified after the geometry engine has calculated it for this event's channel.
- param2 = (float *) pointer to a floating point reverb value that can be read and modified after the geometry engine has calculated it for this event's channel.
-

- An FMOD_EVENT_CALLBACKTYPE_OCCLUSION callback is generated whenever an channel has its occlusion updated via the geometry system. -

 

- - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - Event::setCallback - FMOD_EVENT_CALLBACK - FMOD_EVENT_SOUNDDEFINFO - FMOD_EVENT_INITFLAGS - EventSystem::update -] -*/ -typedef enum -{ - FMOD_EVENT_CALLBACKTYPE_SYNCPOINT, /* Called when a syncpoint is encountered. Can be from wav file markers. */ - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START, /* Called when a sound definition inside an event is triggered. */ - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END, /* Called when a sound definition inside an event ends or is stopped. */ - FMOD_EVENT_CALLBACKTYPE_STOLEN, /* Called when a getEventXXX call steals an event instance that is in use. */ - FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED, /* Called when an event is stopped for any reason. */ - FMOD_EVENT_CALLBACKTYPE_NET_MODIFIED, /* Called when a property of the event has been modified by a network-connected host. */ - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE, /* Called when a programmer sound definition entry is loaded. */ - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE, /* Called when a programmer sound definition entry is unloaded. */ - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO, /* Called when a sound definition entry is loaded. */ - FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED, /* Called when an event is started. */ - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEX, /* Called when a sound definition entry needs to be chosen from a "ProgrammerSelected" sound definition. */ - FMOD_EVENT_CALLBACKTYPE_OCCLUSION /* Called when an event's channel is occluded with the geometry engine. */ -} FMOD_EVENT_CALLBACKTYPE; - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Structure containing realtime information about a wavebank. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - EventSystem::getInfo - FMOD_EVENT_SYSTEMINFO -] -*/ -typedef struct FMOD_EVENT_WAVEBANKINFO -{ - char name[256]; /* [out] Name of this wave bank. */ - int streamrefcnt; /* [out] Number of stream references to this wave bank made by events in this event system. */ - int samplerefcnt; /* [out] Number of sample references to this wave bank made by events in this event system. */ - int numstreams; /* [out] Number of times this wave bank has been opened for streaming. */ - int maxstreams; /* [out] Maximum number of times this wave bank will be opened for streaming. */ - int streamsinuse; /* [out] Number of streams currently in use. */ - unsigned int streammemory; /* [out] Amount of memory (in bytes) used by streams. */ - unsigned int samplememory; /* [out] Amount of memory (in bytes) used by samples. */ - int type; /* [out] 0 = stream from disk, 1 = load into memory, 2 = decompress into memory. */ -} FMOD_EVENT_WAVEBANKINFO; - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Structure containing realtime information about an event system. - - [REMARKS] - On entry, numplayingevents should be set to the number of elements in the playingevents array. If the actual - number of playing events is greater than numplayingevents then the playingevents array will be filled with - numplayingevents entries and numplayingevents will be set to the actual number of playing events on exit. - In short, if numplayingevents on exit > numplayingevents on entry then the playingevents array wasn't large - enough and some events were unable to be added to the array. - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - EventSystem::getInfo - EventProject::getInfo - FMOD_EVENT_WAVEBANKINFO -] -*/ -typedef struct FMOD_EVENT_SYSTEMINFO -{ -#ifdef __cplusplus - FMOD_EVENT_SYSTEMINFO() : numevents(0), numinstances(0), maxwavebanks(0), wavebankinfo(0), numplayingevents(0), playingevents(0) {} -#endif - - int numevents; /* [out] Total number of events in all event groups in this event system. */ - int numinstances; /* [out] Total number of event instances in all event groups in this event system. */ - int maxwavebanks; /* [in/out] Out, number of wavebanks loaded by the EventSystem. In. Maximum size of array of wavebankinfo structures supplied by user. Optional. */ - FMOD_EVENT_WAVEBANKINFO *wavebankinfo; /* [in] Pointer to array FMOD_EVENT_WAVEBANKINFO structures (max size defined by maxwavebanks). FMOD will fill these in with detailed information on each wave bank. Optional. */ - int numplayingevents; /* [in/out] On entry, maximum number of entries in playingevents array. On exit, actual number of entries in playingevents array, or if playingevents is null, then it is just the number of currently playing events. Optional. */ - FMOD_EVENT **playingevents; /* [in/out] Pointer to an array that will be filled with the event handles of all playing events. Optional. Specify 0 if not needed. Must be used in conjunction with numplayingevents. */ - int numloadsqueued[5]; /* [out] Current number of sound banks queued for loading due to using FMOD_EVENT_NONBLOCKING flag. Note there are 5 because there are 5 possible loading threads. Add all values together for total. */ -} FMOD_EVENT_SYSTEMINFO; - - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Structure containing realtime information about an event project. - - [REMARKS] - On entry, numplayingevents should be set to the number of elements in the playingevents array. If the actual - number of playing events is greater than numplayingevents then the playingevents array will be filled with - numplayingevents entries and numplayingevents will be set to the actual number of playing events on exit. - In short, if numplayingevents on exit > numplayingevents on entry then the playingevents array wasn't large - enough and some events were unable to be added to the array. - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - EventProject::getInfo - EventSystem::getInfo - FMOD_EVENT_WAVEBANKINFO -] -*/ -typedef struct FMOD_EVENT_PROJECTINFO -{ -#ifdef __cplusplus - FMOD_EVENT_PROJECTINFO() : index(0), numevents(0), numinstances(0), maxwavebanks(0), wavebankinfo(0), numplayingevents(0), playingevents(0) {} -#endif - - int index; /* [out] Index of the project. */ - char name[256]; /* [out] Name of the project. */ - int numevents; /* [out] Total number of events in all event groups in this event project. */ - int numinstances; /* [out] Total number of event instances in all event groups in this event project. */ - int maxwavebanks; /* [in/out] Out, number of wavebanks loaded by the EventProject. In. Maximum size of array of wavebankinfo structures supplied by user. Optional. */ - FMOD_EVENT_WAVEBANKINFO *wavebankinfo; /* [in] Pointer to array FMOD_EVENT_WAVEBANKINFO structures (max size defined by maxwavebanks). FMOD will fill these in with detailed information on each wave bank. Optional. */ - int numplayingevents; /* [in/out] On entry, maximum number of entries in playingevents array. On exit, actual number of entries in playingevents array, or if playingevents is null, then it is just the number of currently playing events. Optional. */ - FMOD_EVENT **playingevents; /* [in/out] Pointer to an array that will be filled with the event handles of all playing events. Optional. Specify 0 if not needed. Must be used in conjunction with numplayingevents. */ - -} FMOD_EVENT_PROJECTINFO; - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Structure containing extended information about an event. - - [REMARKS] - This structure is optional! Specify 0 or NULL in Event::getInfo if you don't need it!
- This structure has members that need to be initialized before Event::getInfo is called. Always initialize this structure before calling Event::getInfo! - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - Event::getInfo - FMOD_GUID -] -*/ -typedef struct FMOD_EVENT_INFO -{ -#ifdef __cplusplus - FMOD_EVENT_INFO() : memoryused(0), positionms(0), lengthms(0), channelsplaying(0), instancesactive(0), maxwavebanks(0), wavebankinfo(0), projectid(0), systemid(0), audibility(0), numinstances(0), instances(0), guid(0) {} -#endif - - int memoryused; /* This member has been deprecated. */ - int positionms; /* [out] Time passed in playback of this event instance in milliseconds. */ - int lengthms; /* [out] Length in milliseconds of this event. Note: lengthms will be -1 if the length of the event can't be determined i.e. if it has looping sounds. */ - int channelsplaying; /* [out] Number of channels currently playing in this event instance. */ - int instancesactive; /* [out] Number of event instances currently in use. */ - int maxwavebanks; /* [in/out] Out, number of wavebanks refered to by this event. In. Maximum size of array of wavebankinfo structures supplied by user. Optional. */ - FMOD_EVENT_WAVEBANKINFO *wavebankinfo; /* [in] Pointer to array FMOD_EVENT_WAVEBANKINFO structures (max size defined by maxwavebanks). FMOD will fill these in with detailed information on each wave bank. Optional. */ - unsigned int projectid; /* [out] The runtime 'EventProject' wide unique identifier for this event. */ - unsigned int systemid; /* [out] The runtime 'EventSystem' wide unique identifier for this event. This is calculated when single or multiple projects are loaded. */ - float audibility; /* [out] current audibility of event. */ - int numinstances; /* [in/out] On entry, maximum number of entries in instances array. On exit, actual number of entries in instances array, or if instances is null, then it is just the number of instances of this event. Optional. */ - FMOD_EVENT **instances; /* [in/out] Pointer to an array that will be filled with the current reference-counted event handles of all instances of this event. Optional. Specify 0 if not needed. Must be used in conjunction with numinstances. Note: Due to reference counting, the event instance handles returned here may be different between subsequent calls to this function. If you use these event handles, make sure your code is prepared for them to be invalid! */ - FMOD_GUID *guid; /* [out] Pointer to a structure that will be filled with the event's GUID. Optional. Specify 0 if not needed. */ - -} FMOD_EVENT_INFO; - - -/* -[ENUM] -[ - [DESCRIPTION] - Sound definition entry types for FMOD_EVENT_SOUNDDEFINFO. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - FMOD_EVENT_SOUNDDEFINFO - FMOD_EVENT_CALLBACK - FMOD_EVENT_CALLBACKTYPE -] -*/ -typedef enum -{ - FMOD_EVENT_SOUNDDEF_ENTRYTYPE_WAVETABLE, /* Waveform. */ - FMOD_EVENT_SOUNDDEF_ENTRYTYPE_OSCILLATOR, /* Oscillator. */ - FMOD_EVENT_SOUNDDEF_ENTRYTYPE_NULL, /* "Don't play" entry. */ - FMOD_EVENT_SOUNDDEF_ENTRYTYPE_PROGRAMMER /* Programmer sound. */ -} FMOD_EVENT_SOUNDDEF_ENTRYTYPE; - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Structure containing information about a sound definition. - - [REMARKS] - This structure is passed as the param1 argument of all - FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEX callbacks if - FMOD_EVENT_INIT_DETAILED_SOUNDDEF_INFO was passed to EventSystem::init. - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - FMOD_EVENT_CALLBACK - FMOD_EVENT_CALLBACKTYPE - EventSystem::init - FMOD_EVENT_INITFLAGS - FMOD_EVENT_SOUNDDEF_ENTRYTYPE -] -*/ -typedef struct FMOD_EVENT_SOUNDDEFINFO -{ -#ifdef __cplusplus - FMOD_EVENT_SOUNDDEFINFO() : name(0), numentries(0), entrynames(0), entrytypes(0) {} -#endif - - char *name; /* The name of the sound definition. */ - int numentries; /* The number of entries in the sound definition. */ - const char **entrynames; /* The names of the entries in the sound definition (an array of size numentries). Note that entrynames[i] will be null if entrytypes[i] is not FMOD_EVENT_SOUNDDEF_ENTRYTYPE_WAVETABLE. */ - FMOD_EVENT_SOUNDDEF_ENTRYTYPE *entrytypes; /* The types of the entries in the sound definition (an array of size numentries). */ - -} FMOD_EVENT_SOUNDDEFINFO; - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Use this structure with EventSystem::load when more control is needed over loading. - - [REMARKS] - This structure is optional! Specify 0 or NULL in EventSystem::load if you don't need it!
-
- Members marked with [in] mean the user sets the value before passing it to the function.
- Members marked with [out] mean FMOD sets the value to be used after the function exits.
- Use sounddefentrylimit to limit the number of sound definition entries - and therefore the amount of wave data - loaded for each sound definition. This feature allows the programmer to implement a "low detail" setting at runtime without needing a seperate "low detail" set of assets. - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - EventSystem::load -] -*/ -typedef struct FMOD_EVENT_LOADINFO -{ -#ifdef __cplusplus - FMOD_EVENT_LOADINFO() : size(0), encryptionkey(0), sounddefentrylimit(0), loadfrommemory_length(0), override_category_vals(0), sizeof_instancepool_simple(0) {} -#endif - - unsigned int size; /* [in] Size of this structure. This is used so the structure can be expanded in the future and still work on older versions of FMOD Ex. */ - char *encryptionkey; /* [in] Optional. Specify 0 to ignore. Key, or 'password' to decrypt a bank. A sound designer may have encrypted the audio data to protect their sound data from 'rippers'. */ - float sounddefentrylimit; /* [in] Optional. Specify 0 to ignore. A value between 0 -> 1 that is multiplied with the number of sound definition entries in each sound definition in the project being loaded in order to programmatically reduce the number of sound definition entries used at runtime. */ - unsigned int loadfrommemory_length; /* [in] Optional. Specify 0 to ignore. Length of memory buffer pointed to by name_or_data parameter passed to EventSystem::load. If this field is non-zero then the name_or_data parameter passed to EventSystem::load will be interpreted as a pointer to a memory buffer containing the .fev data to load. If this field is zero the name_or_data parameter is interpreted as the filename of the .fev file to load. */ - FMOD_BOOL override_category_vals; /* [in] Optional. If this member is set to true, newly-loaded categories will impart their properties (volume, pitch etc.) to existing categories of the same name. */ - unsigned int sizeof_instancepool_simple; /* [in] Optional. Specify 0 to ignore. If this value is non-zero, FMOD will create an instance pool for simple events with "sizeof_instancepool_simple" entries. Note: Event instance pools currently work for simple events only. Complex events will behave as normal and not be pooled. */ - -} FMOD_EVENT_LOADINFO; - - -typedef FMOD_RESULT (F_CALLBACK *FMOD_EVENT_CALLBACK) (FMOD_EVENT *event, FMOD_EVENT_CALLBACKTYPE type, void *param1, void *param2, void *userdata); - - -/* -[ENUM] -[ - [DESCRIPTION] - These callback types are used with FMOD_EVENTQUEUE_CALLBACK. - - [REMARKS] - Note! Currently the user must call EventSystem::update for these callbacks to trigger!

- - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - EventQueue::setCallback - FMOD_EVENTQUEUE_CALLBACK - EventSystem::update -] -*/ -typedef enum -{ - FMOD_EVENTQUEUE_CALLBACKTYPE_PREPARE, /* Called when an entry is being prepared for playback */ - FMOD_EVENTQUEUE_CALLBACKTYPE_ABOUTTOPLAY, /* Called when an entry is about to play */ - FMOD_EVENTQUEUE_CALLBACKTYPE_FINISHED, /* Called when an entry has finished playing */ - FMOD_EVENTQUEUE_CALLBACKTYPE_EXPIRED /* Called when an entry has expired before being played. See EventQueueEntry::setExpiryTime */ - -} FMOD_EVENTQUEUE_CALLBACKTYPE; - - -typedef FMOD_RESULT (F_CALLBACK *FMOD_EVENTQUEUE_CALLBACK)(FMOD_EVENTQUEUE_CALLBACKTYPE type, FMOD_EVENTQUEUE *queue, FMOD_EVENTQUEUEENTRY *entry, void *callbackuserdata); - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Structure containing realtime information about the music system. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - MusicSystem::getInfo -] -*/ -typedef struct FMOD_MUSIC_INFO -{ - FMOD_BOOL starving; /* [out] True if any streams in the music system are starving. */ - FMOD_BOOL all_samples_loaded; /* [out] True if all non-streaming samples in the music system are loaded, false otherwise. */ -} FMOD_MUSIC_INFO; - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Structure used to hold information about music system entites. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - FMOD_MUSIC_ITERATOR -] -*/ -typedef struct FMOD_MUSIC_ENTITY -{ - const char* name; /* The name of the music entity as a null terminated string. */ - FMOD_MUSIC_ID id; /* The ID of the music entity. */ -} FMOD_MUSIC_ENTITY; - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Structure used to enumerate entities in the music system. - - [REMARKS] - The music system provides methods to initialize and advance iterators. Iterator members should never need to be set manually. - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - FMOD_MUSIC_ENTITY - MusicSystem::getCues - MusicSystem::getParameters -] -*/ -typedef struct FMOD_MUSIC_ITERATOR -{ - const FMOD_MUSIC_ENTITY* value; /* The music entity the iterator points to. A null value indicates an invalid iterator. */ - const char* filter; /* The string used to filter music entities. */ -} FMOD_MUSIC_ITERATOR; - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Structure containing information about a music sample, for use with - FMOD_MUSIC_CALLBACKTYPE_SEGMENT_CREATE and FMOD_MUSIC_CALLBACKTYPE_SEGMENT_RELEASE. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - FMOD_MUSIC_CALLBACK - FMOD_MUSIC_CALLBACKTYPE -] -*/ -typedef struct FMOD_MUSIC_SAMPLE_INFO -{ - unsigned int segment_id; /* The ID of the parent segment. */ - unsigned int index; /* The index of the sample within the parent segment. */ - const char *filename; /* The filename of the sample.
Note: If the sample was built by a version of FMOD Designer before 4.29.09, this field will be 0. */ -} FMOD_MUSIC_SAMPLE_INFO; - - -/* -[STRUCTURE] -[ - [DESCRIPTION] - Structure containing information about a music segment, for use with - FMOD_MUSIC_CALLBACKTYPE_CHANNEL_CREATED and FMOD_MUSIC_CALLBACKTYPE_CHANNEL_DESTROYED. - - [REMARKS] - - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - FMOD_MUSIC_CALLBACK - FMOD_MUSIC_CALLBACKTYPE -] -*/ -typedef struct FMOD_MUSIC_SEGMENT_INFO -{ - unsigned int segment_id; /* The ID of the segment. */ - unsigned int theme_id; /* The ID of the parent theme. */ -} FMOD_MUSIC_SEGMENT_INFO; - - -/* -[ENUM] -[ - [DESCRIPTION] - These callback types are used with FMOD_MUSIC_CALLBACK. - - [REMARKS] - Note! Currently the user must call EventSystem::update for these callbacks to trigger!
- - [PLATFORMS] - Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android - - [SEE_ALSO] - MusicSystem::setCallback - FMOD_MUSIC_CALLBACK - EventSystem::update -] -*/ -typedef enum -{ - FMOD_MUSIC_CALLBACKTYPE_SEGMENT_START, /* Called when a segment is started. */ - FMOD_MUSIC_CALLBACKTYPE_SEGMENT_END, /* Called when a segment ends. */ - FMOD_MUSIC_CALLBACKTYPE_SAMPLE_CREATE, /* Called when a segment needs a sound created. */ - FMOD_MUSIC_CALLBACKTYPE_SAMPLE_RELEASE, /* Called when a segment is finished with a sound. */ - FMOD_MUSIC_CALLBACKTYPE_CHANNEL_CREATED, /* Called when a channel is created to play a segment. */ - FMOD_MUSIC_CALLBACKTYPE_CHANNEL_DESTROYED, /* Called when a segment channel is destroyed. */ - FMOD_MUSIC_CALLBACKTYPE_RESET, /* Called when the system is reset */ - FMOD_MUSIC_CALLBACKTYPE_BEAT /* Called each time a beat is passed (based on segment tempo and time signature) */ -} FMOD_MUSIC_CALLBACKTYPE; - - -typedef FMOD_RESULT (F_CALLBACK *FMOD_MUSIC_CALLBACK) (FMOD_MUSIC_CALLBACKTYPE type, void *param1, void *param2, void *userdata); - - -/* ========================================================================================== */ -/* FUNCTION PROTOTYPES */ -/* ========================================================================================== */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* - FMOD EventSystem factory functions. Use this to create an FMOD EventSystem Instance. Below you will see FMOD_EventSystem_Init/Release to get started. -*/ - -FMOD_RESULT F_API FMOD_EventSystem_Create(FMOD_EVENTSYSTEM **eventsystem); - -/*$ preserve end $*/ - -/* - 'EventSystem' API -*/ - -/* - Initialization / system functions. -*/ - -FMOD_RESULT F_API FMOD_EventSystem_Init (FMOD_EVENTSYSTEM *eventsystem, int maxchannels, FMOD_INITFLAGS flags, void *extradriverdata, FMOD_EVENT_INITFLAGS eventflags); -FMOD_RESULT F_API FMOD_EventSystem_Release (FMOD_EVENTSYSTEM *eventsystem); -FMOD_RESULT F_API FMOD_EventSystem_Update (FMOD_EVENTSYSTEM *eventsystem); -FMOD_RESULT F_API FMOD_EventSystem_SetMediaPath (FMOD_EVENTSYSTEM *eventsystem, const char *path); -FMOD_RESULT F_API FMOD_EventSystem_SetPluginPath (FMOD_EVENTSYSTEM *eventsystem, const char *path); -FMOD_RESULT F_API FMOD_EventSystem_GetVersion (FMOD_EVENTSYSTEM *eventsystem, unsigned int *version); -FMOD_RESULT F_API FMOD_EventSystem_GetInfo (FMOD_EVENTSYSTEM *eventsystem, FMOD_EVENT_SYSTEMINFO *info); -FMOD_RESULT F_API FMOD_EventSystem_GetSystemObject (FMOD_EVENTSYSTEM *eventsystem, FMOD_SYSTEM **system); -FMOD_RESULT F_API FMOD_EventSystem_GetMusicSystem (FMOD_EVENTSYSTEM *eventsystem, FMOD_MUSICSYSTEM **musicsystem); -FMOD_RESULT F_API FMOD_EventSystem_SetLanguage (FMOD_EVENTSYSTEM *eventsystem, const char *language); -FMOD_RESULT F_API FMOD_EventSystem_GetLanguage (FMOD_EVENTSYSTEM *eventsystem, char *language); - -/* - FEV load/unload. -*/ - -FMOD_RESULT F_API FMOD_EventSystem_Load (FMOD_EVENTSYSTEM *eventsystem, const char *name_or_data, FMOD_EVENT_LOADINFO *loadinfo, FMOD_EVENTPROJECT **project); -FMOD_RESULT F_API FMOD_EventSystem_Unload (FMOD_EVENTSYSTEM *eventsystem); - -/* - Event,EventGroup,EventCategory Retrieval. -*/ - -FMOD_RESULT F_API FMOD_EventSystem_GetProject (FMOD_EVENTSYSTEM *eventsystem, const char *name, FMOD_EVENTPROJECT **project); -FMOD_RESULT F_API FMOD_EventSystem_GetProjectByIndex (FMOD_EVENTSYSTEM *eventsystem, int index, FMOD_EVENTPROJECT **project); -FMOD_RESULT F_API FMOD_EventSystem_GetNumProjects (FMOD_EVENTSYSTEM *eventsystem, int *numprojects); -FMOD_RESULT F_API FMOD_EventSystem_GetCategory (FMOD_EVENTSYSTEM *eventsystem, const char *name, FMOD_EVENTCATEGORY **category); -FMOD_RESULT F_API FMOD_EventSystem_GetCategoryByIndex(FMOD_EVENTSYSTEM *eventsystem, int index, FMOD_EVENTCATEGORY **category); -FMOD_RESULT F_API FMOD_EventSystem_GetMusicCategory (FMOD_EVENTSYSTEM *eventsystem, FMOD_EVENTCATEGORY **category); -FMOD_RESULT F_API FMOD_EventSystem_GetNumCategories (FMOD_EVENTSYSTEM *eventsystem, int *numcategories); -FMOD_RESULT F_API FMOD_EventSystem_GetGroup (FMOD_EVENTSYSTEM *eventsystem, const char *name, FMOD_BOOL cacheevents, FMOD_EVENTGROUP **group); -FMOD_RESULT F_API FMOD_EventSystem_GetEvent (FMOD_EVENTSYSTEM *eventsystem, const char *name, FMOD_EVENT_MODE mode, FMOD_EVENT **event); -FMOD_RESULT F_API FMOD_EventSystem_GetEventBySystemID(FMOD_EVENTSYSTEM *eventsystem, unsigned int systemid, FMOD_EVENT_MODE mode, FMOD_EVENT **event); -FMOD_RESULT F_API FMOD_EventSystem_GetEventByGUID (FMOD_EVENTSYSTEM *eventsystem, const FMOD_GUID *guid, FMOD_EVENT_MODE mode, FMOD_EVENT **event); -FMOD_RESULT F_API FMOD_EventSystem_GetEventByGUIDString(FMOD_EVENTSYSTEM *eventsystem, const char *guid, FMOD_EVENT_MODE mode, FMOD_EVENT **event); -FMOD_RESULT F_API FMOD_EventSystem_GetNumEvents (FMOD_EVENTSYSTEM *eventsystem, int *numevents); - -/* - Reverb interfaces. -*/ - -FMOD_RESULT F_API FMOD_EventSystem_SetReverbProperties(FMOD_EVENTSYSTEM *eventsystem, const FMOD_REVERB_PROPERTIES *props); -FMOD_RESULT F_API FMOD_EventSystem_GetReverbProperties(FMOD_EVENTSYSTEM *eventsystem, FMOD_REVERB_PROPERTIES *props); - -FMOD_RESULT F_API FMOD_EventSystem_GetReverbPreset (FMOD_EVENTSYSTEM *eventsystem, const char *name, FMOD_REVERB_PROPERTIES *props, int *index); -FMOD_RESULT F_API FMOD_EventSystem_GetReverbPresetByIndex(FMOD_EVENTSYSTEM *eventsystem, const int index, FMOD_REVERB_PROPERTIES *props, char **name); -FMOD_RESULT F_API FMOD_EventSystem_GetNumReverbPresets(FMOD_EVENTSYSTEM *eventsystem, int *numpresets); - -FMOD_RESULT F_API FMOD_EventSystem_CreateReverb (FMOD_EVENTSYSTEM *eventsystem, FMOD_EVENTREVERB **reverb); -FMOD_RESULT F_API FMOD_EventSystem_SetReverbAmbientProperties(FMOD_EVENTSYSTEM *eventsystem, FMOD_REVERB_PROPERTIES *props); -FMOD_RESULT F_API FMOD_EventSystem_GetReverbAmbientProperties(FMOD_EVENTSYSTEM *eventsystem, FMOD_REVERB_PROPERTIES *props); - -/* - Event queue interfaces. -*/ - -FMOD_RESULT F_API FMOD_EventSystem_CreateEventQueue (FMOD_EVENTSYSTEM *eventsystem, FMOD_EVENTQUEUE **queue); -FMOD_RESULT F_API FMOD_EventSystem_CreateEventQueueEntry(FMOD_EVENTSYSTEM *eventsystem, FMOD_EVENT *event, FMOD_EVENTQUEUEENTRY **entry); - -/* - 3D Listener interface. -*/ - -FMOD_RESULT F_API FMOD_EventSystem_Set3DNumListeners (FMOD_EVENTSYSTEM *eventsystem, int numlisteners); -FMOD_RESULT F_API FMOD_EventSystem_Get3DNumListeners (FMOD_EVENTSYSTEM *eventsystem, int *numlisteners); -FMOD_RESULT F_API FMOD_EventSystem_Set3DListenerAttributes(FMOD_EVENTSYSTEM *eventsystem, int listener, const FMOD_VECTOR *pos, const FMOD_VECTOR *vel, const FMOD_VECTOR *forward, const FMOD_VECTOR *up); -FMOD_RESULT F_API FMOD_EventSystem_Get3DListenerAttributes(FMOD_EVENTSYSTEM *eventsystem, int listener, FMOD_VECTOR *pos, FMOD_VECTOR *vel, FMOD_VECTOR *forward, FMOD_VECTOR *up); - -/* - Get/set user data -*/ - -FMOD_RESULT F_API FMOD_EventSystem_SetUserData (FMOD_EVENTSYSTEM *eventsystem, void *userdata); -FMOD_RESULT F_API FMOD_EventSystem_GetUserData (FMOD_EVENTSYSTEM *eventsystem, void **userdata); - -/* - Pre-loading FSB files (from disk or from memory, use FMOD_OPENMEMORY_POINT to point to pre-loaded memory). -*/ - -FMOD_RESULT F_API FMOD_EventSystem_PreloadFSB (FMOD_EVENTSYSTEM *eventsystem, const char *filename, int streaminstance, FMOD_SOUND *sound); -FMOD_RESULT F_API FMOD_EventSystem_UnloadFSB (FMOD_EVENTSYSTEM *eventsystem, const char *filename, int streaminstance); - -FMOD_RESULT F_API FMOD_EventSystem_GetMemoryInfo (FMOD_EVENTSYSTEM *eventsystem, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - -/* - 'EventProject' API -*/ - -FMOD_RESULT F_API FMOD_EventProject_Release (FMOD_EVENTPROJECT *eventproject); -FMOD_RESULT F_API FMOD_EventProject_GetInfo (FMOD_EVENTPROJECT *eventproject, FMOD_EVENT_PROJECTINFO *info); -FMOD_RESULT F_API FMOD_EventProject_GetGroup (FMOD_EVENTPROJECT *eventproject, const char *name, FMOD_BOOL cacheevents, FMOD_EVENTGROUP **group); -FMOD_RESULT F_API FMOD_EventProject_GetGroupByIndex (FMOD_EVENTPROJECT *eventproject, int index, FMOD_BOOL cacheevents, FMOD_EVENTGROUP **group); -FMOD_RESULT F_API FMOD_EventProject_GetNumGroups (FMOD_EVENTPROJECT *eventproject, int *numgroups); -FMOD_RESULT F_API FMOD_EventProject_GetEvent (FMOD_EVENTPROJECT *eventproject, const char *name, FMOD_EVENT_MODE mode, FMOD_EVENT **event); -FMOD_RESULT F_API FMOD_EventProject_GetEventByProjectID(FMOD_EVENTPROJECT *eventproject, unsigned int projectid, FMOD_EVENT_MODE mode, FMOD_EVENT **event); -FMOD_RESULT F_API FMOD_EventProject_GetNumEvents (FMOD_EVENTPROJECT *eventproject, int *numevents); -FMOD_RESULT F_API FMOD_EventProject_LoadSampleData (FMOD_EVENTPROJECT *eventproject, int *eventid_array, int sizeof_eventid_array, char **groupname_array, int sizeof_groupname_array, FMOD_EVENT_MODE eventmode); -FMOD_RESULT F_API FMOD_EventProject_StopAllEvents (FMOD_EVENTPROJECT *eventproject, FMOD_BOOL immediate); -FMOD_RESULT F_API FMOD_EventProject_CancelAllLoads (FMOD_EVENTPROJECT *eventproject); -FMOD_RESULT F_API FMOD_EventProject_SetUserData (FMOD_EVENTPROJECT *eventproject, void *userdata); -FMOD_RESULT F_API FMOD_EventProject_GetUserData (FMOD_EVENTPROJECT *eventproject, void **userdata); - -FMOD_RESULT F_API FMOD_EventProject_GetMemoryInfo (FMOD_EVENTPROJECT *eventproject, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - -/* - 'EventGroup' API -*/ - -FMOD_RESULT F_API FMOD_EventGroup_GetInfo (FMOD_EVENTGROUP *eventgroup, int *index, char **name); -FMOD_RESULT F_API FMOD_EventGroup_LoadEventData (FMOD_EVENTGROUP *eventgroup, FMOD_EVENT_RESOURCE resource, FMOD_EVENT_MODE mode); -FMOD_RESULT F_API FMOD_EventGroup_FreeEventData (FMOD_EVENTGROUP *eventgroup, FMOD_EVENT *event, FMOD_BOOL waituntilready); -FMOD_RESULT F_API FMOD_EventGroup_GetGroup (FMOD_EVENTGROUP *eventgroup, const char *name, FMOD_BOOL cacheevents, FMOD_EVENTGROUP **group); -FMOD_RESULT F_API FMOD_EventGroup_GetGroupByIndex (FMOD_EVENTGROUP *eventgroup, int index, FMOD_BOOL cacheevents, FMOD_EVENTGROUP **group); -FMOD_RESULT F_API FMOD_EventGroup_GetParentGroup (FMOD_EVENTGROUP *eventgroup, FMOD_EVENTGROUP **group); -FMOD_RESULT F_API FMOD_EventGroup_GetParentProject (FMOD_EVENTGROUP *eventgroup, FMOD_EVENTPROJECT **project); -FMOD_RESULT F_API FMOD_EventGroup_GetNumGroups (FMOD_EVENTGROUP *eventgroup, int *numgroups); -FMOD_RESULT F_API FMOD_EventGroup_GetEvent (FMOD_EVENTGROUP *eventgroup, const char *name, FMOD_EVENT_MODE mode, FMOD_EVENT **event); -FMOD_RESULT F_API FMOD_EventGroup_GetEventByIndex (FMOD_EVENTGROUP *eventgroup, int index, FMOD_EVENT_MODE mode, FMOD_EVENT **event); -FMOD_RESULT F_API FMOD_EventGroup_GetNumEvents (FMOD_EVENTGROUP *eventgroup, int *numevents); -FMOD_RESULT F_API FMOD_EventGroup_GetProperty (FMOD_EVENTGROUP *eventgroup, const char *propertyname, void *value); -FMOD_RESULT F_API FMOD_EventGroup_GetPropertyByIndex (FMOD_EVENTGROUP *eventgroup, int propertyindex, void *value); -FMOD_RESULT F_API FMOD_EventGroup_GetNumProperties (FMOD_EVENTGROUP *eventgroup, int *numproperties); -FMOD_RESULT F_API FMOD_EventGroup_GetState (FMOD_EVENTGROUP *eventgroup, FMOD_EVENT_STATE *state); -FMOD_RESULT F_API FMOD_EventGroup_SetUserData (FMOD_EVENTGROUP *eventgroup, void *userdata); -FMOD_RESULT F_API FMOD_EventGroup_GetUserData (FMOD_EVENTGROUP *eventgroup, void **userdata); - -FMOD_RESULT F_API FMOD_EventGroup_GetMemoryInfo (FMOD_EVENTGROUP *eventgroup, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - -/* - 'EventCategory' API -*/ - -FMOD_RESULT F_API FMOD_EventCategory_GetInfo (FMOD_EVENTCATEGORY *eventcategory, int *index, char **name); -FMOD_RESULT F_API FMOD_EventCategory_GetCategory (FMOD_EVENTCATEGORY *eventcategory, const char *name, FMOD_EVENTCATEGORY **category); -FMOD_RESULT F_API FMOD_EventCategory_GetCategoryByIndex(FMOD_EVENTCATEGORY *eventcategory, int index, FMOD_EVENTCATEGORY **category); -FMOD_RESULT F_API FMOD_EventCategory_GetNumCategories(FMOD_EVENTCATEGORY *eventcategory, int *numcategories); -FMOD_RESULT F_API FMOD_EventCategory_GetEventByIndex (FMOD_EVENTCATEGORY *eventcategory, int index, FMOD_EVENT_MODE mode, FMOD_EVENT **event); -FMOD_RESULT F_API FMOD_EventCategory_GetNumEvents (FMOD_EVENTCATEGORY *eventcategory, int *numevents); -FMOD_RESULT F_API FMOD_EventCategory_GetParentCategory(FMOD_EVENTCATEGORY *eventcategory, FMOD_EVENTCATEGORY **category); - -FMOD_RESULT F_API FMOD_EventCategory_StopAllEvents (FMOD_EVENTCATEGORY *eventcategory); -FMOD_RESULT F_API FMOD_EventCategory_SetVolume (FMOD_EVENTCATEGORY *eventcategory, float volume); -FMOD_RESULT F_API FMOD_EventCategory_GetVolume (FMOD_EVENTCATEGORY *eventcategory, float *volume); -FMOD_RESULT F_API FMOD_EventCategory_SetPitch (FMOD_EVENTCATEGORY *eventcategory, float pitch, FMOD_EVENT_PITCHUNITS units); -FMOD_RESULT F_API FMOD_EventCategory_GetPitch (FMOD_EVENTCATEGORY *eventcategory, float *pitch, FMOD_EVENT_PITCHUNITS units); -FMOD_RESULT F_API FMOD_EventCategory_SetPaused (FMOD_EVENTCATEGORY *eventcategory, FMOD_BOOL paused); -FMOD_RESULT F_API FMOD_EventCategory_GetPaused (FMOD_EVENTCATEGORY *eventcategory, FMOD_BOOL *paused); -FMOD_RESULT F_API FMOD_EventCategory_SetMute (FMOD_EVENTCATEGORY *eventcategory, FMOD_BOOL mute); -FMOD_RESULT F_API FMOD_EventCategory_GetMute (FMOD_EVENTCATEGORY *eventcategory, FMOD_BOOL *mute); -FMOD_RESULT F_API FMOD_EventCategory_GetChannelGroup (FMOD_EVENTCATEGORY *eventcategory, FMOD_CHANNELGROUP **channelgroup); -FMOD_RESULT F_API FMOD_EventCategory_SetUserData (FMOD_EVENTCATEGORY *eventcategory, void *userdata); -FMOD_RESULT F_API FMOD_EventCategory_GetUserData (FMOD_EVENTCATEGORY *eventcategory, void **userdata); - -FMOD_RESULT F_API FMOD_EventCategory_GetMemoryInfo (FMOD_EVENTCATEGORY *eventcategory, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - -/* - 'Event' API -*/ - -FMOD_RESULT F_API FMOD_Event_Release (FMOD_EVENT *event, FMOD_BOOL freeeventdata, FMOD_BOOL waituntilready); - -FMOD_RESULT F_API FMOD_Event_Start (FMOD_EVENT *event); -FMOD_RESULT F_API FMOD_Event_Stop (FMOD_EVENT *event, FMOD_BOOL immediate); - -FMOD_RESULT F_API FMOD_Event_GetInfo (FMOD_EVENT *event, int *index, char **name, FMOD_EVENT_INFO *info); -FMOD_RESULT F_API FMOD_Event_GetState (FMOD_EVENT *event, FMOD_EVENT_STATE *state); -FMOD_RESULT F_API FMOD_Event_GetParentGroup (FMOD_EVENT *event, FMOD_EVENTGROUP **group); -FMOD_RESULT F_API FMOD_Event_GetChannelGroup (FMOD_EVENT *event, FMOD_CHANNELGROUP **channelgroup); -FMOD_RESULT F_API FMOD_Event_SetCallback (FMOD_EVENT *event, FMOD_EVENT_CALLBACK callback, void *userdata); - -FMOD_RESULT F_API FMOD_Event_GetParameter (FMOD_EVENT *event, const char *name, FMOD_EVENTPARAMETER **parameter); -FMOD_RESULT F_API FMOD_Event_GetParameterByIndex (FMOD_EVENT *event, int index, FMOD_EVENTPARAMETER **parameter); -FMOD_RESULT F_API FMOD_Event_GetNumParameters (FMOD_EVENT *event, int *numparameters); -FMOD_RESULT F_API FMOD_Event_GetProperty (FMOD_EVENT *event, const char *propertyname, void *value, FMOD_BOOL this_instance); -FMOD_RESULT F_API FMOD_Event_GetPropertyByIndex (FMOD_EVENT *event, int propertyindex, void *value, FMOD_BOOL this_instance); -FMOD_RESULT F_API FMOD_Event_SetProperty (FMOD_EVENT *event, const char *propertyname, void *value, FMOD_BOOL this_instance); -FMOD_RESULT F_API FMOD_Event_SetPropertyByIndex (FMOD_EVENT *event, int propertyindex, void *value, FMOD_BOOL this_instance); -FMOD_RESULT F_API FMOD_Event_GetNumProperties (FMOD_EVENT *event, int *numproperties); -FMOD_RESULT F_API FMOD_Event_GetPropertyInfo (FMOD_EVENT *event, int *propertyindex, char **propertyname, FMOD_EVENTPROPERTY_TYPE *type); -FMOD_RESULT F_API FMOD_Event_GetCategory (FMOD_EVENT *event, FMOD_EVENTCATEGORY **category); - -FMOD_RESULT F_API FMOD_Event_SetVolume (FMOD_EVENT *event, float volume); -FMOD_RESULT F_API FMOD_Event_GetVolume (FMOD_EVENT *event, float *volume); -FMOD_RESULT F_API FMOD_Event_SetPitch (FMOD_EVENT *event, float pitch, FMOD_EVENT_PITCHUNITS units); -FMOD_RESULT F_API FMOD_Event_GetPitch (FMOD_EVENT *event, float *pitch, FMOD_EVENT_PITCHUNITS units); -FMOD_RESULT F_API FMOD_Event_SetPaused (FMOD_EVENT *event, FMOD_BOOL paused); -FMOD_RESULT F_API FMOD_Event_GetPaused (FMOD_EVENT *event, FMOD_BOOL *paused); -FMOD_RESULT F_API FMOD_Event_SetMute (FMOD_EVENT *event, FMOD_BOOL mute); -FMOD_RESULT F_API FMOD_Event_GetMute (FMOD_EVENT *event, FMOD_BOOL *mute); -FMOD_RESULT F_API FMOD_Event_Set3DAttributes (FMOD_EVENT *event, const FMOD_VECTOR *position, const FMOD_VECTOR *velocity, const FMOD_VECTOR *orientation); -FMOD_RESULT F_API FMOD_Event_Get3DAttributes (FMOD_EVENT *event, FMOD_VECTOR *position, FMOD_VECTOR *velocity, FMOD_VECTOR *orientation); -FMOD_RESULT F_API FMOD_Event_Set3DOcclusion (FMOD_EVENT *event, float directocclusion, float reverbocclusion); -FMOD_RESULT F_API FMOD_Event_Get3DOcclusion (FMOD_EVENT *event, float *directocclusion, float *reverbocclusion); -FMOD_RESULT F_API FMOD_Event_SetReverbProperties (FMOD_EVENT *event, const FMOD_REVERB_CHANNELPROPERTIES *props); -FMOD_RESULT F_API FMOD_Event_GetReverbProperties (FMOD_EVENT *event, FMOD_REVERB_CHANNELPROPERTIES *props); -FMOD_RESULT F_API FMOD_Event_SetUserData (FMOD_EVENT *event, void *userdata); -FMOD_RESULT F_API FMOD_Event_GetUserData (FMOD_EVENT *event, void **userdata); - -FMOD_RESULT F_API FMOD_Event_GetMemoryInfo (FMOD_EVENT *event, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - -/* - 'EventParameter' API -*/ - -FMOD_RESULT F_API FMOD_EventParameter_GetInfo (FMOD_EVENTPARAMETER *eventparameter, int *index, char **name); -FMOD_RESULT F_API FMOD_EventParameter_GetRange (FMOD_EVENTPARAMETER *eventparameter, float *rangemin, float *rangemax); -FMOD_RESULT F_API FMOD_EventParameter_SetValue (FMOD_EVENTPARAMETER *eventparameter, float value); -FMOD_RESULT F_API FMOD_EventParameter_GetValue (FMOD_EVENTPARAMETER *eventparameter, float *value); -FMOD_RESULT F_API FMOD_EventParameter_SetVelocity (FMOD_EVENTPARAMETER *eventparameter, float value); -FMOD_RESULT F_API FMOD_EventParameter_GetVelocity (FMOD_EVENTPARAMETER *eventparameter, float *value); -FMOD_RESULT F_API FMOD_EventParameter_SetSeekSpeed (FMOD_EVENTPARAMETER *eventparameter, float value); -FMOD_RESULT F_API FMOD_EventParameter_GetSeekSpeed (FMOD_EVENTPARAMETER *eventparameter, float *value); -FMOD_RESULT F_API FMOD_EventParameter_SetUserData (FMOD_EVENTPARAMETER *eventparameter, void *userdata); -FMOD_RESULT F_API FMOD_EventParameter_GetUserData (FMOD_EVENTPARAMETER *eventparameter, void **userdata); -FMOD_RESULT F_API FMOD_EventParameter_KeyOff (FMOD_EVENTPARAMETER *eventparameter); - -FMOD_RESULT F_API FMOD_EventParameter_GetMemoryInfo (FMOD_EVENTPARAMETER *eventparameter, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - -/* - 'EventReverb' API -*/ - -FMOD_RESULT F_API FMOD_EventReverb_Release (FMOD_EVENTREVERB *eventreverb); -FMOD_RESULT F_API FMOD_EventReverb_Set3DAttributes (FMOD_EVENTREVERB *eventreverb, const FMOD_VECTOR *position, float mindistance, float maxdistance); -FMOD_RESULT F_API FMOD_EventReverb_Get3DAttributes (FMOD_EVENTREVERB *eventreverb, FMOD_VECTOR *position, float *mindistance, float *maxdistance); -FMOD_RESULT F_API FMOD_EventReverb_SetProperties (FMOD_EVENTREVERB *eventreverb, const FMOD_REVERB_PROPERTIES *props); -FMOD_RESULT F_API FMOD_EventReverb_GetProperties (FMOD_EVENTREVERB *eventreverb, FMOD_REVERB_PROPERTIES *props); -FMOD_RESULT F_API FMOD_EventReverb_SetActive (FMOD_EVENTREVERB *eventreverb, FMOD_BOOL active); -FMOD_RESULT F_API FMOD_EventReverb_GetActive (FMOD_EVENTREVERB *eventreverb, FMOD_BOOL *active); -FMOD_RESULT F_API FMOD_EventReverb_SetUserData (FMOD_EVENTREVERB *eventreverb, void *userdata); -FMOD_RESULT F_API FMOD_EventReverb_GetUserData (FMOD_EVENTREVERB *eventreverb, void **userdata); - -FMOD_RESULT F_API FMOD_EventReverb_GetMemoryInfo (FMOD_EVENTREVERB *eventreverb, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - -/* - 'EventQueue' API -*/ - -FMOD_RESULT F_API FMOD_EventQueue_Release (FMOD_EVENTQUEUE *eventqueue); -FMOD_RESULT F_API FMOD_EventQueue_Add (FMOD_EVENTQUEUE *eventqueue, FMOD_EVENTQUEUEENTRY *entry, FMOD_BOOL allow_duplicates); -FMOD_RESULT F_API FMOD_EventQueue_Remove (FMOD_EVENTQUEUE *eventqueue, FMOD_EVENTQUEUEENTRY *entry); -FMOD_RESULT F_API FMOD_EventQueue_RemoveHead (FMOD_EVENTQUEUE *eventqueue); -FMOD_RESULT F_API FMOD_EventQueue_Clear (FMOD_EVENTQUEUE *eventqueue, FMOD_BOOL stopallevents); -FMOD_RESULT F_API FMOD_EventQueue_FindFirstEntry (FMOD_EVENTQUEUE *eventqueue, FMOD_EVENTQUEUEENTRY **entry); -FMOD_RESULT F_API FMOD_EventQueue_FindNextEntry (FMOD_EVENTQUEUE *eventqueue, FMOD_EVENTQUEUEENTRY **entry); -FMOD_RESULT F_API FMOD_EventQueue_SetPaused (FMOD_EVENTQUEUE *eventqueue, FMOD_BOOL paused); -FMOD_RESULT F_API FMOD_EventQueue_GetPaused (FMOD_EVENTQUEUE *eventqueue, FMOD_BOOL *paused); -FMOD_RESULT F_API FMOD_EventQueue_IncludeDuckingCategory(FMOD_EVENTQUEUE *eventqueue, FMOD_EVENTCATEGORY *category, float ducked_volume, float unducked_volume, unsigned int duck_time, unsigned int unduck_time); -FMOD_RESULT F_API FMOD_EventQueue_ExcludeDuckingCategory(FMOD_EVENTQUEUE *eventqueue, FMOD_EVENTCATEGORY *category); -FMOD_RESULT F_API FMOD_EventQueue_SetCallback (FMOD_EVENTQUEUE *eventqueue, FMOD_EVENTQUEUE_CALLBACK callback, void *callbackuserdata); -FMOD_RESULT F_API FMOD_EventQueue_SetUserData (FMOD_EVENTQUEUE *eventqueue, void *userdata); -FMOD_RESULT F_API FMOD_EventQueue_GetUserData (FMOD_EVENTQUEUE *eventqueue, void **userdata); -FMOD_RESULT F_API FMOD_EventQueue_Dump (FMOD_EVENTQUEUE *eventqueue); - -FMOD_RESULT F_API FMOD_EventQueue_GetMemoryInfo (FMOD_EVENTQUEUE *eventqueue, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - -/* - 'EventQueueEntry' API -*/ - -FMOD_RESULT F_API FMOD_EventQueueEntry_Release (FMOD_EVENTQUEUEENTRY *eventqueueentry); -FMOD_RESULT F_API FMOD_EventQueueEntry_GetInfoOnlyEvent(FMOD_EVENTQUEUEENTRY *eventqueueentry, FMOD_EVENT **infoonlyevent); -FMOD_RESULT F_API FMOD_EventQueueEntry_GetRealEvent (FMOD_EVENTQUEUEENTRY *eventqueueentry, FMOD_EVENT **realevent); -FMOD_RESULT F_API FMOD_EventQueueEntry_SetPriority (FMOD_EVENTQUEUEENTRY *eventqueueentry, unsigned char priority); -FMOD_RESULT F_API FMOD_EventQueueEntry_GetPriority (FMOD_EVENTQUEUEENTRY *eventqueueentry, unsigned char *priority); -FMOD_RESULT F_API FMOD_EventQueueEntry_SetExpiryTime (FMOD_EVENTQUEUEENTRY *eventqueueentry, unsigned int expirytime); -FMOD_RESULT F_API FMOD_EventQueueEntry_GetExpiryTime (FMOD_EVENTQUEUEENTRY *eventqueueentry, unsigned int *expirytime); -FMOD_RESULT F_API FMOD_EventQueueEntry_SetDelayTime (FMOD_EVENTQUEUEENTRY *eventqueueentry, unsigned int delay); -FMOD_RESULT F_API FMOD_EventQueueEntry_GetDelayTime (FMOD_EVENTQUEUEENTRY *eventqueueentry, unsigned int *delay); -FMOD_RESULT F_API FMOD_EventQueueEntry_SetInterrupt (FMOD_EVENTQUEUEENTRY *eventqueueentry, FMOD_BOOL interrupt); -FMOD_RESULT F_API FMOD_EventQueueEntry_GetInterrupt (FMOD_EVENTQUEUEENTRY *eventqueueentry, FMOD_BOOL *interrupt); -FMOD_RESULT F_API FMOD_EventQueueEntry_SetCrossfadeTime(FMOD_EVENTQUEUEENTRY *eventqueueentry, int crossfade); -FMOD_RESULT F_API FMOD_EventQueueEntry_GetCrossfadeTime(FMOD_EVENTQUEUEENTRY *eventqueueentry, int *crossfade); -FMOD_RESULT F_API FMOD_EventQueueEntry_SetUserData (FMOD_EVENTQUEUEENTRY *eventqueueentry, void *userdata); -FMOD_RESULT F_API FMOD_EventQueueEntry_GetUserData (FMOD_EVENTQUEUEENTRY *eventqueueentry, void **userdata); - -FMOD_RESULT F_API FMOD_EventQueueEntry_GetMemoryInfo (FMOD_EVENTQUEUEENTRY *eventqueueentry, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - -/* - 'MusicSystem' API -*/ - -FMOD_RESULT F_API FMOD_MusicSystem_Reset (FMOD_MUSICSYSTEM *musicsystem); -FMOD_RESULT F_API FMOD_MusicSystem_SetVolume (FMOD_MUSICSYSTEM *musicsystem, float volume); -FMOD_RESULT F_API FMOD_MusicSystem_GetVolume (FMOD_MUSICSYSTEM *musicsystem, float *volume); -FMOD_RESULT F_API FMOD_MusicSystem_SetReverbProperties(FMOD_MUSICSYSTEM *musicsystem, const FMOD_REVERB_CHANNELPROPERTIES *props); -FMOD_RESULT F_API FMOD_MusicSystem_GetReverbProperties(FMOD_MUSICSYSTEM *musicsystem, FMOD_REVERB_CHANNELPROPERTIES *props); -FMOD_RESULT F_API FMOD_MusicSystem_SetPaused (FMOD_MUSICSYSTEM *musicsystem, FMOD_BOOL paused); -FMOD_RESULT F_API FMOD_MusicSystem_GetPaused (FMOD_MUSICSYSTEM *musicsystem, FMOD_BOOL *paused); -FMOD_RESULT F_API FMOD_MusicSystem_SetMute (FMOD_MUSICSYSTEM *musicsystem, FMOD_BOOL mute); -FMOD_RESULT F_API FMOD_MusicSystem_GetMute (FMOD_MUSICSYSTEM *musicsystem, FMOD_BOOL *mute); -FMOD_RESULT F_API FMOD_MusicSystem_GetInfo (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_INFO *info); -FMOD_RESULT F_API FMOD_MusicSystem_PromptCue (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_CUE_ID id); -FMOD_RESULT F_API FMOD_MusicSystem_PrepareCue (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_CUE_ID id, FMOD_MUSICPROMPT **prompt); -FMOD_RESULT F_API FMOD_MusicSystem_GetParameterValue (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_PARAM_ID id, float *parameter); -FMOD_RESULT F_API FMOD_MusicSystem_SetParameterValue (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_PARAM_ID id, float parameter); - -FMOD_RESULT F_API FMOD_MusicSystem_GetCues (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_ITERATOR *it, const char *filter); -FMOD_RESULT F_API FMOD_MusicSystem_GetNextCue (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_ITERATOR *it); -FMOD_RESULT F_API FMOD_MusicSystem_GetParameters (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_ITERATOR *it, const char *filter); -FMOD_RESULT F_API FMOD_MusicSystem_GetNextParameter (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_ITERATOR *it); - -FMOD_RESULT F_API FMOD_MusicSystem_LoadSoundData (FMOD_MUSICSYSTEM *musicsystem, FMOD_EVENT_RESOURCE resource, FMOD_EVENT_MODE mode); -FMOD_RESULT F_API FMOD_MusicSystem_FreeSoundData (FMOD_MUSICSYSTEM *musicsystem, FMOD_BOOL waituntilready); - -FMOD_RESULT F_API FMOD_MusicSystem_SetCallback (FMOD_MUSICSYSTEM *musicsystem, FMOD_MUSIC_CALLBACK callback, void *userdata); - -FMOD_RESULT F_API FMOD_MusicSystem_GetMemoryInfo (FMOD_MUSICSYSTEM *musicsystem, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - -/* - 'MusicPrompt' API -*/ - -FMOD_RESULT F_API FMOD_MusicPrompt_Release (FMOD_MUSICPROMPT *musicprompt); -FMOD_RESULT F_API FMOD_MusicPrompt_Begin (FMOD_MUSICPROMPT *musicprompt); -FMOD_RESULT F_API FMOD_MusicPrompt_End (FMOD_MUSICPROMPT *musicprompt); -FMOD_RESULT F_API FMOD_MusicPrompt_IsActive (FMOD_MUSICPROMPT *musicprompt, FMOD_BOOL *active); - -FMOD_RESULT F_API FMOD_MusicPrompt_GetMemoryInfo (FMOD_MUSICPROMPT *musicprompt, unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); -/*$ preserve start $*/ - -#ifdef __cplusplus -} -#endif - - -#endif - -/*$ preserve end $*/ diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event.hpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event.hpp deleted file mode 100644 index b419d6df39..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event.hpp +++ /dev/null @@ -1,395 +0,0 @@ -/* - fmod_event.hpp - Data-driven event classes - Copyright (c), Firelight Technologies Pty, Ltd. 2004-2011. - - This header is the base header for all other FMOD EventSystem headers. If you are programming in C use FMOD_EVENT.H -*/ - -#ifndef __FMOD_EVENT_HPP__ -#define __FMOD_EVENT_HPP__ - -#ifndef _FMOD_HPP -#include "fmod.hpp" -#endif -#ifndef __FMOD_EVENT_H__ -#include "fmod_event.h" -#endif - -namespace FMOD -{ - class EventSystem; - class EventCategory; - class EventProject; - class EventGroup; - class Event; - class EventParameter; - class EventReverb; - class EventQueue; - class EventQueueEntry; - class MusicSystem; - class MusicPrompt; - - /* - FMOD EventSystem factory functions. - */ - inline FMOD_RESULT EventSystem_Create(EventSystem **eventsystem) { return FMOD_EventSystem_Create((FMOD_EVENTSYSTEM **)eventsystem); } - - /* - 'EventSystem' API - */ - class EventSystem - { - public : - - // Initialization / system functions. - FMOD_RESULT F_API init (int maxchannels, FMOD_INITFLAGS flags, void *extradriverdata, FMOD_EVENT_INITFLAGS eventflags = FMOD_EVENT_INIT_NORMAL); - FMOD_RESULT F_API release (); - FMOD_RESULT F_API update (); - FMOD_RESULT F_API setMediaPath (const char *path); - FMOD_RESULT F_API setPluginPath (const char *path); - FMOD_RESULT F_API getVersion (unsigned int *version); - FMOD_RESULT F_API getInfo (FMOD_EVENT_SYSTEMINFO *info); - FMOD_RESULT F_API getSystemObject (System **system); - FMOD_RESULT F_API getMusicSystem (MusicSystem **musicsystem); - FMOD_RESULT F_API setLanguage (const char *language); - FMOD_RESULT F_API getLanguage (char *language); - - // FEV load/unload. - FMOD_RESULT F_API load (const char *name_or_data, FMOD_EVENT_LOADINFO *loadinfo, EventProject **project); - FMOD_RESULT F_API unload (); - - // Event,EventGroup,EventCategory Retrieval. - FMOD_RESULT F_API getProject (const char *name, EventProject **project); - FMOD_RESULT F_API getProjectByIndex (int index, EventProject **project); - FMOD_RESULT F_API getNumProjects (int *numprojects); - FMOD_RESULT F_API getCategory (const char *name, EventCategory **category); - FMOD_RESULT F_API getCategoryByIndex (int index, EventCategory **category); - FMOD_RESULT F_API getMusicCategory (EventCategory **category); - FMOD_RESULT F_API getNumCategories (int *numcategories); - FMOD_RESULT F_API getGroup (const char *name, bool cacheevents, EventGroup **group); - FMOD_RESULT F_API getEvent (const char *name, FMOD_EVENT_MODE mode, Event **event); - FMOD_RESULT F_API getEventBySystemID (unsigned int systemid, FMOD_EVENT_MODE mode, Event **event); - FMOD_RESULT F_API getEventByGUID (const FMOD_GUID *guid, FMOD_EVENT_MODE mode, Event **event); - FMOD_RESULT F_API getEventByGUIDString (const char *guid, FMOD_EVENT_MODE mode, Event **event); - FMOD_RESULT F_API getNumEvents (int *numevents); - - // Reverb interfaces. - FMOD_RESULT F_API setReverbProperties (const FMOD_REVERB_PROPERTIES *props); - FMOD_RESULT F_API getReverbProperties (FMOD_REVERB_PROPERTIES *props); - - FMOD_RESULT F_API getReverbPreset (const char *name, FMOD_REVERB_PROPERTIES *props, int *index = 0); - FMOD_RESULT F_API getReverbPresetByIndex (const int index, FMOD_REVERB_PROPERTIES *props, char **name = 0); - FMOD_RESULT F_API getNumReverbPresets (int *numpresets); - - FMOD_RESULT F_API createReverb (EventReverb **reverb); - FMOD_RESULT F_API setReverbAmbientProperties(FMOD_REVERB_PROPERTIES *props); - FMOD_RESULT F_API getReverbAmbientProperties(FMOD_REVERB_PROPERTIES *props); - - // Event queue interfaces. - FMOD_RESULT F_API createEventQueue (EventQueue **queue); - FMOD_RESULT F_API createEventQueueEntry (Event *event, EventQueueEntry **entry); - - // 3D Listener interface. - FMOD_RESULT F_API set3DNumListeners (int numlisteners); - FMOD_RESULT F_API get3DNumListeners (int *numlisteners); - FMOD_RESULT F_API set3DListenerAttributes (int listener, const FMOD_VECTOR *pos, const FMOD_VECTOR *vel, const FMOD_VECTOR *forward, const FMOD_VECTOR *up); - FMOD_RESULT F_API get3DListenerAttributes (int listener, FMOD_VECTOR *pos, FMOD_VECTOR *vel, FMOD_VECTOR *forward, FMOD_VECTOR *up); - - // Get/set user data - FMOD_RESULT F_API setUserData (void *userdata); - FMOD_RESULT F_API getUserData (void **userdata); - - // Pre-loading FSB files (from disk or from memory, use FMOD_OPENMEMORY_POINT to point to pre-loaded memory). - FMOD_RESULT F_API preloadFSB (const char *filename, int streaminstance, Sound *sound); - FMOD_RESULT F_API unloadFSB (const char *filename, int streaminstance); - - FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - }; - - /* - 'EventProject' API - */ - class EventProject - { - public : - - virtual FMOD_RESULT F_API release () = 0; - virtual FMOD_RESULT F_API getInfo (FMOD_EVENT_PROJECTINFO *info) = 0; - virtual FMOD_RESULT F_API getGroup (const char *name, bool cacheevents, EventGroup **group) = 0; - virtual FMOD_RESULT F_API getGroupByIndex (int index, bool cacheevents, EventGroup **group) = 0; - virtual FMOD_RESULT F_API getNumGroups (int *numgroups) = 0; - virtual FMOD_RESULT F_API getEvent (const char *name, FMOD_EVENT_MODE mode, Event **event) = 0; - virtual FMOD_RESULT F_API getEventByProjectID(unsigned int projectid, FMOD_EVENT_MODE mode, Event **event) = 0; - virtual FMOD_RESULT F_API getNumEvents (int *numevents) = 0; - virtual FMOD_RESULT F_API loadSampleData (int *eventid_array, int sizeof_eventid_array, char **groupname_array, int sizeof_groupname_array, FMOD_EVENT_MODE eventmode) = 0; - virtual FMOD_RESULT F_API stopAllEvents (bool immediate = false) = 0; - virtual FMOD_RESULT F_API cancelAllLoads () = 0; - virtual FMOD_RESULT F_API setUserData (void *userdata) = 0; - virtual FMOD_RESULT F_API getUserData (void **userdata) = 0; - - virtual FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) = 0; - virtual ~EventProject(){}; - }; - - /* - 'EventGroup' API - */ - class EventGroup - { - public : - - virtual FMOD_RESULT F_API getInfo (int *index, char **name) = 0; - virtual FMOD_RESULT F_API loadEventData (FMOD_EVENT_RESOURCE resource = FMOD_EVENT_RESOURCE_STREAMS_AND_SAMPLES, FMOD_EVENT_MODE mode = FMOD_EVENT_DEFAULT) = 0; - virtual FMOD_RESULT F_API freeEventData (Event *event = 0, bool waituntilready = true) = 0; - virtual FMOD_RESULT F_API getGroup (const char *name, bool cacheevents, EventGroup **group) = 0; - virtual FMOD_RESULT F_API getGroupByIndex (int index, bool cacheevents, EventGroup **group) = 0; - virtual FMOD_RESULT F_API getParentGroup (EventGroup **group) = 0; - virtual FMOD_RESULT F_API getParentProject (EventProject **project) = 0; - virtual FMOD_RESULT F_API getNumGroups (int *numgroups) = 0; - virtual FMOD_RESULT F_API getEvent (const char *name, FMOD_EVENT_MODE mode, Event **event) = 0; - virtual FMOD_RESULT F_API getEventByIndex (int index, FMOD_EVENT_MODE mode, Event **event) = 0; - virtual FMOD_RESULT F_API getNumEvents (int *numevents) = 0; - virtual FMOD_RESULT F_API getProperty (const char *propertyname, void *value) = 0; - virtual FMOD_RESULT F_API getPropertyByIndex (int propertyindex, void *value) = 0; - virtual FMOD_RESULT F_API getNumProperties (int *numproperties) = 0; - virtual FMOD_RESULT F_API getState (FMOD_EVENT_STATE *state) = 0; - virtual FMOD_RESULT F_API setUserData (void *userdata) = 0; - virtual FMOD_RESULT F_API getUserData (void **userdata) = 0; - - virtual FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) = 0; - virtual ~EventGroup(){}; - }; - - /* - 'EventCategory' API - */ - class EventCategory - { - public : - - virtual FMOD_RESULT F_API getInfo (int *index, char **name) = 0; - virtual FMOD_RESULT F_API getCategory (const char *name, EventCategory **category) = 0; - virtual FMOD_RESULT F_API getCategoryByIndex (int index, EventCategory **category) = 0; - virtual FMOD_RESULT F_API getNumCategories (int *numcategories) = 0; - virtual FMOD_RESULT F_API getEventByIndex (int index, FMOD_EVENT_MODE mode, Event **event) = 0; - virtual FMOD_RESULT F_API getNumEvents (int *numevents) = 0; - virtual FMOD_RESULT F_API getParentCategory (EventCategory **category) = 0; - - virtual FMOD_RESULT F_API stopAllEvents () = 0; - virtual FMOD_RESULT F_API setVolume (float volume) = 0; - virtual FMOD_RESULT F_API getVolume (float *volume) = 0; - virtual FMOD_RESULT F_API setPitch (float pitch, FMOD_EVENT_PITCHUNITS units = FMOD_EVENT_PITCHUNITS_RAW) = 0; - virtual FMOD_RESULT F_API getPitch (float *pitch, FMOD_EVENT_PITCHUNITS units = FMOD_EVENT_PITCHUNITS_RAW) = 0; - virtual FMOD_RESULT F_API setPaused (bool paused) = 0; - virtual FMOD_RESULT F_API getPaused (bool *paused) = 0; - virtual FMOD_RESULT F_API setMute (bool mute) = 0; - virtual FMOD_RESULT F_API getMute (bool *mute) = 0; - virtual FMOD_RESULT F_API getChannelGroup (ChannelGroup **channelgroup) = 0; - virtual FMOD_RESULT F_API setUserData (void *userdata) = 0; - virtual FMOD_RESULT F_API getUserData (void **userdata) = 0; - - virtual FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) = 0; - virtual ~EventCategory(){}; - }; - - /* - 'Event' API - */ - class Event - { - public : - - FMOD_RESULT F_API release (bool freeeventdata = false, bool waituntilready = true); - - FMOD_RESULT F_API start (); - FMOD_RESULT F_API stop (bool immediate = false); - - FMOD_RESULT F_API getInfo (int *index, char **name, FMOD_EVENT_INFO *info); - FMOD_RESULT F_API getState (FMOD_EVENT_STATE *state); - FMOD_RESULT F_API getParentGroup (EventGroup **group); - FMOD_RESULT F_API getChannelGroup (ChannelGroup **channelgroup); - FMOD_RESULT F_API setCallback (FMOD_EVENT_CALLBACK callback, void *userdata); - - FMOD_RESULT F_API getParameter (const char *name, EventParameter **parameter); - FMOD_RESULT F_API getParameterByIndex (int index, EventParameter **parameter); - FMOD_RESULT F_API getNumParameters (int *numparameters); - FMOD_RESULT F_API getProperty (const char *propertyname, void *value, bool this_instance = false); - FMOD_RESULT F_API getPropertyByIndex (int propertyindex, void *value, bool this_instance = false); - FMOD_RESULT F_API setProperty (const char *propertyname, void *value, bool this_instance = false); - FMOD_RESULT F_API setPropertyByIndex (int propertyindex, void *value, bool this_instance = false); - FMOD_RESULT F_API getNumProperties (int *numproperties); - FMOD_RESULT F_API getPropertyInfo (int *propertyindex, char **propertyname, FMOD_EVENTPROPERTY_TYPE *type = 0); - FMOD_RESULT F_API getCategory (EventCategory **category); - - FMOD_RESULT F_API setVolume (float volume); - FMOD_RESULT F_API getVolume (float *volume); - FMOD_RESULT F_API setPitch (float pitch, FMOD_EVENT_PITCHUNITS units = FMOD_EVENT_PITCHUNITS_RAW); - FMOD_RESULT F_API getPitch (float *pitch, FMOD_EVENT_PITCHUNITS units = FMOD_EVENT_PITCHUNITS_RAW); - FMOD_RESULT F_API setPaused (bool paused); - FMOD_RESULT F_API getPaused (bool *paused); - FMOD_RESULT F_API setMute (bool mute); - FMOD_RESULT F_API getMute (bool *mute); - FMOD_RESULT F_API set3DAttributes (const FMOD_VECTOR *position, const FMOD_VECTOR *velocity, const FMOD_VECTOR *orientation = 0); - FMOD_RESULT F_API get3DAttributes (FMOD_VECTOR *position, FMOD_VECTOR *velocity, FMOD_VECTOR *orientation = 0); - FMOD_RESULT F_API set3DOcclusion (float directocclusion, float reverbocclusion); - FMOD_RESULT F_API get3DOcclusion (float *directocclusion, float *reverbocclusion); - FMOD_RESULT F_API setReverbProperties (const FMOD_REVERB_CHANNELPROPERTIES *props); - FMOD_RESULT F_API getReverbProperties (FMOD_REVERB_CHANNELPROPERTIES *props); - FMOD_RESULT F_API setUserData (void *userdata); - FMOD_RESULT F_API getUserData (void **userdata); - - FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - }; - - /* - 'EventParameter' API - */ - class EventParameter - { - public : - - FMOD_RESULT F_API getInfo (int *index, char **name); - FMOD_RESULT F_API getRange (float *rangemin, float *rangemax); - FMOD_RESULT F_API setValue (float value); - FMOD_RESULT F_API getValue (float *value); - FMOD_RESULT F_API setVelocity (float value); - FMOD_RESULT F_API getVelocity (float *value); - FMOD_RESULT F_API setSeekSpeed (float value); - FMOD_RESULT F_API getSeekSpeed (float *value); - FMOD_RESULT F_API setUserData (void *userdata); - FMOD_RESULT F_API getUserData (void **userdata); - FMOD_RESULT F_API keyOff (); - - FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details); - }; - - /* - 'EventReverb ' API - */ - class EventReverb - { - public : - - virtual FMOD_RESULT F_API release () = 0; - virtual FMOD_RESULT F_API set3DAttributes (const FMOD_VECTOR *position, float mindistance, float maxdistance) = 0; - virtual FMOD_RESULT F_API get3DAttributes (FMOD_VECTOR *position, float *mindistance,float *maxdistance) = 0; - virtual FMOD_RESULT F_API setProperties (const FMOD_REVERB_PROPERTIES *props) = 0; - virtual FMOD_RESULT F_API getProperties (FMOD_REVERB_PROPERTIES *props) = 0; - virtual FMOD_RESULT F_API setActive (bool active) = 0; - virtual FMOD_RESULT F_API getActive (bool *active) = 0; - virtual FMOD_RESULT F_API setUserData (void *userdata) = 0; - virtual FMOD_RESULT F_API getUserData (void **userdata) = 0; - - virtual FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) = 0; - virtual ~EventReverb(){}; - }; - - /* - 'EventQueue' API - */ - class EventQueue - { - public : - - virtual FMOD_RESULT F_API release () = 0; - virtual FMOD_RESULT F_API add (EventQueueEntry *entry, bool allow_duplicates = true) = 0; - virtual FMOD_RESULT F_API remove (EventQueueEntry *entry) = 0; - virtual FMOD_RESULT F_API removeHead () = 0; - virtual FMOD_RESULT F_API clear (bool stopallevents = true) = 0; - virtual FMOD_RESULT F_API findFirstEntry (EventQueueEntry **entry) = 0; - virtual FMOD_RESULT F_API findNextEntry (EventQueueEntry **entry) = 0; - virtual FMOD_RESULT F_API setPaused (bool paused) = 0; - virtual FMOD_RESULT F_API getPaused (bool *paused) = 0; - virtual FMOD_RESULT F_API includeDuckingCategory (EventCategory *category, float ducked_volume, float unducked_volume, unsigned int duck_time, unsigned int unduck_time) = 0; - virtual FMOD_RESULT F_API excludeDuckingCategory (EventCategory *category) = 0; - virtual FMOD_RESULT F_API setCallback (FMOD_EVENTQUEUE_CALLBACK callback, void *callbackuserdata) = 0; - virtual FMOD_RESULT F_API setUserData (void *userdata) = 0; - virtual FMOD_RESULT F_API getUserData (void **userdata) = 0; - virtual FMOD_RESULT F_API dump () = 0; - - virtual FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) = 0; - virtual ~EventQueue(){}; - }; - - /* - 'EventQueueEntry' API - */ - class EventQueueEntry - { - public : - - virtual FMOD_RESULT F_API release () = 0; - virtual FMOD_RESULT F_API getInfoOnlyEvent (Event **infoonlyevent) = 0; - virtual FMOD_RESULT F_API getRealEvent (Event **realevent) = 0; - virtual FMOD_RESULT F_API setPriority (unsigned char priority) = 0; - virtual FMOD_RESULT F_API getPriority (unsigned char *priority) = 0; - virtual FMOD_RESULT F_API setExpiryTime (unsigned int expirytime) = 0; - virtual FMOD_RESULT F_API getExpiryTime (unsigned int *expirytime) = 0; - virtual FMOD_RESULT F_API setDelayTime (unsigned int delay) = 0; - virtual FMOD_RESULT F_API getDelayTime (unsigned int *delay) = 0; - virtual FMOD_RESULT F_API setInterrupt (bool interrupt) = 0; - virtual FMOD_RESULT F_API getInterrupt (bool *interrupt) = 0; - virtual FMOD_RESULT F_API setCrossfadeTime (int crossfade) = 0; - virtual FMOD_RESULT F_API getCrossfadeTime (int *crossfade) = 0; - virtual FMOD_RESULT F_API setUserData (void *userdata) = 0; - virtual FMOD_RESULT F_API getUserData (void **userdata) = 0; - - virtual FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) = 0; - virtual ~EventQueueEntry(){}; - }; - - /* - 'MusicSystem' API - */ - class MusicSystem - { - public : - - virtual FMOD_RESULT F_API reset () = 0; - virtual FMOD_RESULT F_API setVolume (float volume) = 0; - virtual FMOD_RESULT F_API getVolume (float *volume) = 0; - virtual FMOD_RESULT F_API setReverbProperties(const FMOD_REVERB_CHANNELPROPERTIES *props) = 0; - virtual FMOD_RESULT F_API getReverbProperties(FMOD_REVERB_CHANNELPROPERTIES *props) = 0; - virtual FMOD_RESULT F_API setPaused (bool paused) = 0; - virtual FMOD_RESULT F_API getPaused (bool *paused) = 0; - virtual FMOD_RESULT F_API setMute (bool mute) = 0; - virtual FMOD_RESULT F_API getMute (bool *mute) = 0; - virtual FMOD_RESULT F_API getInfo (FMOD_MUSIC_INFO *info) = 0; - virtual FMOD_RESULT F_API promptCue (FMOD_MUSIC_CUE_ID id) = 0; - virtual FMOD_RESULT F_API prepareCue (FMOD_MUSIC_CUE_ID id, MusicPrompt **prompt) = 0; - virtual FMOD_RESULT F_API getParameterValue (FMOD_MUSIC_PARAM_ID id, float *parameter) = 0; - virtual FMOD_RESULT F_API setParameterValue (FMOD_MUSIC_PARAM_ID id, float parameter) = 0; - - virtual FMOD_RESULT F_API getCues (FMOD_MUSIC_ITERATOR *it, const char *filter = 0) = 0; - virtual FMOD_RESULT F_API getNextCue (FMOD_MUSIC_ITERATOR *it) = 0; - virtual FMOD_RESULT F_API getParameters (FMOD_MUSIC_ITERATOR *it, const char *filter = 0) = 0; - virtual FMOD_RESULT F_API getNextParameter (FMOD_MUSIC_ITERATOR *it) = 0; - - virtual FMOD_RESULT F_API loadSoundData (FMOD_EVENT_RESOURCE resource = FMOD_EVENT_RESOURCE_SAMPLES, FMOD_EVENT_MODE mode = FMOD_EVENT_DEFAULT) = 0; - virtual FMOD_RESULT F_API freeSoundData (bool waituntilready = true) = 0; - - virtual FMOD_RESULT F_API setCallback (FMOD_MUSIC_CALLBACK callback, void *userdata) = 0; - - virtual FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) = 0; - virtual ~MusicSystem(){}; - }; - - /* - 'MusicPrompt' API - */ - class MusicPrompt - { - public : - - virtual FMOD_RESULT F_API release () = 0; - virtual FMOD_RESULT F_API begin () = 0; - virtual FMOD_RESULT F_API end () = 0; - virtual FMOD_RESULT F_API isActive (bool *active) = 0; - - virtual FMOD_RESULT F_API getMemoryInfo (unsigned int memorybits, unsigned int event_memorybits, unsigned int *memoryused, FMOD_MEMORY_USAGE_DETAILS *memoryused_details) = 0; - virtual ~MusicPrompt(){}; - }; -} - - -#endif diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event_net.h b/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event_net.h deleted file mode 100644 index d912355338..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event_net.h +++ /dev/null @@ -1,42 +0,0 @@ -/* ============================================================================================ */ -/* FMOD Ex - Main C/C++ Network event system header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2011. */ -/* */ -/* This header is the base header for all other FMOD NetEventSystem headers. If you are */ -/* programming in C use this exclusively, or if you are programming C++ use this in */ -/* conjunction with FMOD_EVENT_NET.HPP */ -/* ============================================================================================ */ - -#ifndef __FMOD_EVENT_NET_H__ -#define __FMOD_EVENT_NET_H__ - -#ifndef __FMOD_EVENT_H__ -#include "fmod_event.h" -#endif - -/* - FMOD NetEventSystem version number. Check this against NetEventSystem_GetVersion. - 0xaaaabbcc -> aaaa = major version number. bb = minor version number. cc = development version number. -*/ -#define FMOD_EVENT_NET_VERSION 0x00043601 - -/* - Default port that the target (game) will listen on -*/ -#define FMOD_EVENT_NET_PORT 17997 - -#ifdef __cplusplus -extern "C" -{ -#endif - -FMOD_RESULT F_API FMOD_NetEventSystem_Init (FMOD_EVENTSYSTEM *eventsystem, unsigned short port); -FMOD_RESULT F_API FMOD_NetEventSystem_Update (); -FMOD_RESULT F_API FMOD_NetEventSystem_Shutdown (); -FMOD_RESULT F_API FMOD_NetEventSystem_GetVersion (unsigned int *version); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event_net.hpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event_net.hpp deleted file mode 100644 index 77a7ac16b0..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/inc/fmod_event_net.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* ============================================================================================ */ -/* FMOD Ex - Main C/C++ Network event system header file. */ -/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2011. */ -/* */ -/* Use this header to enable network tweaking and auditioning in realtime from FMOD Designer. */ -/* If you are programming in C use FMOD_EVENT_NET.H */ -/* ============================================================================================ */ - -#ifndef __FMOD_EVENT_NET_HPP__ -#define __FMOD_EVENT_NET_HPP__ - -#ifndef __FMOD_EVENT_NET_H__ -#include "fmod_event_net.h" -#endif - -namespace FMOD -{ - class EventSystem; - - FMOD_RESULT F_API NetEventSystem_Init (EventSystem *eventsystem, unsigned short port = FMOD_EVENT_NET_PORT); - FMOD_RESULT F_API NetEventSystem_Update (); - FMOD_RESULT F_API NetEventSystem_Shutdown (); - FMOD_RESULT F_API NetEventSystem_GetVersion (unsigned int *version); -} - -#endif diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/lib/libfmodevent-4.36.01.so.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/api/lib/libfmodevent-4.36.01.so.REMOVED.git-id deleted file mode 100644 index f4fa4d5f22..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/lib/libfmodevent-4.36.01.so.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -5de969cbd3cf8dd7afcf9ed3b5c9176e6ab4a0b8 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/lib/libfmodeventL-4.36.01.so.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/api/lib/libfmodeventL-4.36.01.so.REMOVED.git-id deleted file mode 100644 index 75bee35a5e..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/api/lib/libfmodeventL-4.36.01.so.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -b10592ed23696425641c66cba34a2ce7d3dd6918 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/RUN_BUILD_MEDIA_FILES.txt b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/RUN_BUILD_MEDIA_FILES.txt deleted file mode 100644 index 9ee542f148..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/RUN_BUILD_MEDIA_FILES.txt +++ /dev/null @@ -1 +0,0 @@ -Run the build_media_files.sh shell script (in the media directory ./media) to build the media files required for these examples. diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/effects/Makefile b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/effects/Makefile deleted file mode 100644 index 9dcba5c86d..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/effects/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: main.cpp - g++ -O3 -o effects -I../../../api/inc main.cpp ../../api/lib/libfmodevent.so -Wl,-rpath ../../../api/lib - -run: - ./effects - -clean: - rm -f effects diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/effects/main.cpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/effects/main.cpp deleted file mode 100644 index e9cc23b802..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/effects/main.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/*=============================================================================================== - Effects Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - Demonstrates basic usage of event effects -===============================================================================================*/ -#include "../../../examples/common/wincompat.h" - -#include "../../api/inc/fmod_event.hpp" -#include "../../../api/inc/fmod_errors.h" - -const float UPDATE_INTERVAL = 100.0f; - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::EventSystem *eventsystem; - FMOD::Event *event; - FMOD::EventParameter *param00; - FMOD_RESULT result; - int key; - float param00_val, param00_min, param00_max, param00_increment; - - printf("======================================================================\n"); - printf("Effects Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==============================-------=================================\n"); - printf("This demonstrates the use of FMOD event effects. It simply plays an\n"); - printf("event with effects applied and allows the user to adjust the parameters.\n"); - printf("======================================================================\n\n"); - - ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem)); - ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL)); - ERRCHECK(result = eventsystem->setMediaPath("../media/")); - ERRCHECK(result = eventsystem->load("examples.fev", 0, 0)); - ERRCHECK(result = eventsystem->getEvent("examples/FeatureDemonstration/Effects/PropertyAutomationEffectEnvelope", FMOD_EVENT_DEFAULT, &event)); - ERRCHECK(result = event->getParameter("param00", ¶m00)); - ERRCHECK(result = param00->getRange(¶m00_min, ¶m00_max)); - ERRCHECK(result = param00->setValue(0.0f)); - ERRCHECK(result = event->start()); - - printf("======================================================================\n"); - printf("Press '<' or ',' to decrease param00\n"); - printf("Press '>' or '.' to increase param00\n"); - printf("Press ESC to quit\n"); - printf("======================================================================\n"); - - param00_increment = (param00_max - param00_min) / UPDATE_INTERVAL; - ERRCHECK(result = param00->getValue(¶m00_val)); - - key = 0; - do - { - if (_kbhit()) - { - key = _getch(); - - if (key == '<' || key == ',') - { - param00_val -= param00_increment; - if (param00_val < param00_min) - { - param00_val = param00_min; - } - - ERRCHECK(result = param00->setValue(param00_val)); - } - else if (key == '>' || key == '.') - { - param00_val += param00_increment; - if (param00_val > param00_max) - { - param00_val = param00_max; - } - - ERRCHECK(result = param00->setValue(param00_val)); - } - } - - ERRCHECK(result = eventsystem->update()); - Sleep(15); - - printf("param00 = %.4f \r", param00_val); - fflush(stdout); - - } while (key != 27); - - ERRCHECK(result = eventsystem->release()); - return 0; -} diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/examples.fdp.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/examples.fdp.REMOVED.git-id deleted file mode 100644 index 252d47f4fc..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/examples.fdp.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -43792cb1642846d4b3d83b8720e43c2e4b7730b5 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/info_only/Makefile b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/info_only/Makefile deleted file mode 100644 index 0426f8d042..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/info_only/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: main.cpp - g++ -O3 -o info_only -I../../../api/inc main.cpp ../../api/lib/libfmodevent.so -Wl,-rpath ../../../api/lib - -run: - ./info_only - -clean: - rm -f info_only diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/info_only/main.cpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/info_only/main.cpp deleted file mode 100644 index 5a8813a9c5..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/info_only/main.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/*=============================================================================================== - Info-only Event Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - Demonstrates usage and functionality of info-only events -===============================================================================================*/ -#include "../../../examples/common/wincompat.h" - -#include "../../api/inc/fmod_event.hpp" -#include "../../../api/inc/fmod_errors.h" - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::EventSystem *eventsystem; - FMOD::EventGroup *eventgroup; - FMOD::Event *event = 0; - FMOD_RESULT result; - int key; - - printf("======================================================================\n"); - printf("Info-only Event Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==============================-------=================================\n"); - printf("This demonstrates usage and functionality of info-only events.\n"); - printf("======================================================================\n\n"); - - ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem)); - ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL)); - ERRCHECK(result = eventsystem->setMediaPath("../media/")); - ERRCHECK(result = eventsystem->load("examples.fev", 0, 0)); - ERRCHECK(result = eventsystem->getGroup("examples/FeatureDemonstration/Basics", false, &eventgroup)); - - printf("======================================================================\n"); - printf("Press 'i' to get an info-only event\n"); - printf("Press 'e' to get an event instance\n"); - printf("Press 'u' to unload all event data\n"); - printf("Press '1' - '0' to set event volume between 10%% - 100%%\n"); - printf("Press Space to start/stop the current event\n"); - printf("Press ESC to quit\n"); - printf("======================================================================\n"); - - bool state_changed = true; - - key = 0; - do - { - if (_kbhit()) - { - - key = _getch(); - - if (key == 'i') - { - /* Get an info-only event. - Notes: - - This is the parent from which all instances of the - specified event are derived. - - This call will not allocate memory for event instances or - load sample data. - - The resulting event cannot be played, it simply allows - querying and setting of event properties. - - Any properties which are set on the info-only event will be - copied to all instances which are retrieved from then on. - */ - ERRCHECK(result = eventgroup->getEvent("BasicEventWithLooping", FMOD_EVENT_INFOONLY, &event)); - printf("getEvent(FMOD_EVENT_INFOONLY) succeeded\n"); - state_changed = true; - } - else if (key == 'e') - { - /* Get an event instance. - Notes: - - This call will allocate memory for event instances and - load sample data if required. - - The resulting event can be played. - - Any properties which have been set on the info-only event - will be copied to this instance. - */ - ERRCHECK(result = eventgroup->getEvent("BasicEventWithLooping", FMOD_EVENT_DEFAULT, &event)); - printf("getEvent(FMOD_EVENT_DEFAULT) succeeded\n"); - state_changed = true; - } - else if (key == ' ') - { - if (event) - { - FMOD_EVENT_STATE state; - - result = event->getState(&state); - if (result != FMOD_ERR_INVALID_HANDLE) - { - ERRCHECK(result); - } - - if (state & FMOD_EVENT_STATE_PLAYING) - { - /* Attempt to stop the event. - - This will fail if the event is info-only. - */ - result = event->stop(); - if(result == FMOD_OK) - { - printf("event->stop() succeeded\n"); - state_changed = true; - } - else - { - printf("event->stop() returned an error:\n\t(%d) %s\n", result, FMOD_ErrorString(result)); - } - } - else - { - /* Attempt to start the event. - - This will fail if the event is info-only. - */ - result = event->start(); - if (result == FMOD_OK) - { - printf("event->start() succeeded\n"); - state_changed = true; - } - else - { - printf("event->start() returned an error:\n\t(%d) %s\n", result, FMOD_ErrorString(result)); - } - } - } - } - else if (key >= '0' && key <= '9') - { - /* Attempt to set the event's volume. - - This will succeed on both info-only events and instances. - - Volume set on the info-only event will be copied to - all instances retrieved from now on. - - Volume set on an instance will only apply to that instance. - */ - float volume = (float)(key - '0'); - - if (volume == 0) - { - volume = 10.0f; - } - - volume /= 10.0f; - - result = event->setVolume(volume); - if (result == FMOD_OK) - { - printf("event->setVolume() succeeded\n"); - state_changed = true; - } - else - { - printf("event->setVolume() returned an error:\n\t(%d) %s\n", result, FMOD_ErrorString(result)); - } - } - else if (key == 'u') - { - ERRCHECK(result = eventgroup->freeEventData()); - printf("Event data unloaded\n"); - state_changed = true; - } - - } - - if (state_changed) - { - int memory_current, memory_max; - ERRCHECK(result = FMOD::Memory_GetStats(&memory_current, &memory_max)); - - printf("Memory usage: current = %10d, max = %10d\n", memory_current, memory_max); - - if (event) - { - /* Attempt to get the event's volume. - - This will succeed on both info-only events and instances. - */ - float volume; - - result = event->getVolume(&volume); - if (result != FMOD_ERR_INVALID_HANDLE) - { - ERRCHECK(result); - printf("Volume: %.2f\n", volume); - } - } - - state_changed = false; - } - - ERRCHECK(result = eventsystem->update()); - fflush(stdout); - Sleep(15); - - } while (key != 27); - - ERRCHECK(result = eventgroup->freeEventData()); - ERRCHECK(result = eventsystem->release()); - return 0; -} diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/load_data/Makefile b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/load_data/Makefile deleted file mode 100644 index 19f0f08447..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/load_data/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: main.cpp - g++ -O3 -o load_data -I../../../api/inc main.cpp ../../api/lib/libfmodevent.so -Wl,-rpath ../../../api/lib - -run: - ./load_data - -clean: - rm -f load_data diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/load_data/main.cpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/load_data/main.cpp deleted file mode 100644 index 352711db79..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/load_data/main.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/*=============================================================================================== - Load Event Data Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - Demonstrates basic loading and unloading of event data per event -===============================================================================================*/ -#include "../../../examples/common/wincompat.h" - -#include "../../api/inc/fmod_event.hpp" -#include "../../../api/inc/fmod_errors.h" - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::EventSystem *eventsystem; - FMOD::EventGroup *eventgroup; - FMOD::Event *event = 0; - FMOD_RESULT result; - int key; - - printf("======================================================================\n"); - printf("Load Event Data Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==============================-------=================================\n"); - printf("This demonstrates loading and unloading of event data per event and\n"); - printf("per group.\n"); - printf("======================================================================\n\n"); - - ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem)); - ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL)); - ERRCHECK(result = eventsystem->setMediaPath("../media/")); - ERRCHECK(result = eventsystem->load("examples.fev", 0, 0)); - ERRCHECK(result = eventsystem->getGroup("examples/FeatureDemonstration/Basics", false, &eventgroup)); - - printf("======================================================================\n"); - printf("Press 'e' to load event data\n"); - printf("Press 'E' to unload event data\n"); - printf("Press 'g' to load group data\n"); - printf("Press 'G' to unload group data\n"); - printf("Press ESC to quit\n"); - printf("======================================================================\n"); - - bool memory_changed = true; - - key = 0; - do - { - if (_kbhit()) - { - - key = _getch(); - - if (key == 'e') - { - ERRCHECK(result = eventgroup->getEvent("SimpleEvent", FMOD_EVENT_DEFAULT, &event)); - printf("Event data loaded\n"); - memory_changed = true; - } - else if (key == 'E') - { - if (event) - { - result = eventgroup->freeEventData(event); - if (result != FMOD_ERR_INVALID_HANDLE) - { - ERRCHECK(result); - printf("Event data unloaded\n"); - memory_changed = true; - } - event = 0; - } - } - else if (key == 'g') - { - ERRCHECK(result = eventgroup->loadEventData()); - printf("Event group data loaded\n"); - memory_changed = true; - } - else if (key == 'G') - { - ERRCHECK(result = eventgroup->freeEventData()); - printf("Event group data unloaded\n"); - memory_changed = true; - } - - } - - if (memory_changed) - { - int memory_current, memory_max; - ERRCHECK(result = FMOD::Memory_GetStats(&memory_current, &memory_max)); - - printf("Memory usage: current = %10d, max = %10d\n", memory_current, memory_max); - memory_changed = false; - } - - ERRCHECK(result = eventsystem->update()); - fflush(stdout); - Sleep(15); - - } while (key != 27); - - ERRCHECK(result = eventgroup->freeEventData()); - ERRCHECK(result = eventsystem->release()); - return 0; -} diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/max_playbacks/Makefile b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/max_playbacks/Makefile deleted file mode 100644 index 1017a1819a..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/max_playbacks/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: main.cpp - g++ -O3 -o max_playbacks -I../../../api/inc main.cpp ../../api/lib/libfmodevent.so -Wl,-rpath ../../../api/lib - -run: - ./max_playbacks - -clean: - rm -f max_playbacks diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/max_playbacks/main.cpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/max_playbacks/main.cpp deleted file mode 100644 index ed846e37d6..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/max_playbacks/main.cpp +++ /dev/null @@ -1,262 +0,0 @@ -/*============================================================================= - Max Playbacks Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - Demonstrates basic usage of event max playbacks behaviour. -=============================================================================*/ -#include "../../../examples/common/wincompat.h" - -#include "../../api/inc/fmod_event.hpp" -#include "../../../api/inc/fmod_errors.h" - -const char *MEDIA_PATH = "../media/"; - -static float g_distance = 2.0f; -static float g_sound = 0.0f; - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -void setupEvent(FMOD::Event *event) -{ - FMOD_RESULT result; - FMOD::EventParameter *param; - FMOD_VECTOR pos = {0, 0, g_distance}; - - ERRCHECK(result = event->set3DAttributes(&pos, 0, 0)); - ERRCHECK(result = event->getParameter("sound", ¶m)); - ERRCHECK(result = param->setValue(g_sound)); -} - - -void stopAllEvents(FMOD::EventGroup *eventgroup) -{ - ERRCHECK(eventgroup->freeEventData()); -} - - -int main(int argc, char *argv[]) -{ - FMOD_RESULT result; - FMOD::EventSystem *eventsystem; - FMOD::EventGroup *eventgroup; - FMOD::Event *event; - int key; - - enum - { - StealOldest, - StealNewest, - StealQuietest, - JustFail, - JustFailIfQuietest - } event_behaviour = StealOldest; - - ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem)); - ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL)); - ERRCHECK(result = eventsystem->setMediaPath((char *)MEDIA_PATH)); - ERRCHECK(result = eventsystem->load("examples.fev", 0, 0)); - ERRCHECK(result = eventsystem->getGroup("examples/FeatureDemonstration/MaxPlayback", FMOD_EVENT_DEFAULT, &eventgroup)); - ERRCHECK(result); - - printf("======================================================================\n"); - printf("Max Playbacks Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("----------------------------------------------------------------------\n"); - printf("Press '1' to select 'Steal oldest' behaviour\n"); - printf("Press '2' to select 'Steal newest' behaviour\n"); - printf("Press '3' to select 'Steal quietest' behaviour\n"); - printf("Press '4' to select 'Just fail' behaviour\n"); - printf("Press '5' to select 'Just fail if quietest' behaviour\n"); - printf("Press Space to start an event\n"); - printf("Press 's' to stop all events\n"); - printf("Press '>' to increase event distance\n"); - printf("Press '<' to decrease event distance\n"); - printf("Press ESC to quit\n"); - printf("======================================================================\n"); - - key = 0; - do - { - if (_kbhit()) - { - key = _getch(); - - switch(key) - { - case '1' : // 'Steal oldest' - event_behaviour = StealOldest; - stopAllEvents(eventgroup); - break; - - case '2' : // 'Steal newest' - event_behaviour = StealNewest; - stopAllEvents(eventgroup); - break; - - case '3' : // 'Steal quietest' - event_behaviour = StealQuietest; - stopAllEvents(eventgroup); - break; - - case '4' : // 'Just fail' - event_behaviour = JustFail; - stopAllEvents(eventgroup); - break; - - case '5' : // 'Just fail if quietest' - event_behaviour = JustFailIfQuietest; - stopAllEvents(eventgroup); - break; - - case ' ' : // Play an event - const char *name; - - switch(event_behaviour) - { - case StealOldest : - name = "MaxPlay-StealOldest"; - break; - - case StealNewest : - name = "MaxPlay-StealNewest"; - break; - - case StealQuietest : - name = "MaxPlay-StealQuietest"; - break; - - case JustFail : - name = "MaxPlay-JustFail"; - break; - - case JustFailIfQuietest : - name = "MaxPlay-JustFailIfQuietest"; - break; - } - - // Clear the line - printf("%79s\r", " "); - - if (event_behaviour == JustFailIfQuietest) - { - /* The 'Just fail if quietest' behaviour calculates the expected - volume of the event based on the properties of the info-only - event, so we have to get the info-only event first and set it - up appropriately. - */ - - // get the info-only event to set up for volume calculation - ERRCHECK(result = eventgroup->getEvent(name, FMOD_EVENT_INFOONLY, &event)); - - /* set the desired properties on the info-only event - Notes: - - distances below the event's 3D Min Distance all give the - same volume; in this case, getEvent will just fail - - we could set other volume-affecting properties here as - well (e.g. orientation if the event has a falloff cone) - */ - setupEvent(event); - - // attempt to get a real event instance - result = eventgroup->getEvent(name, FMOD_EVENT_DEFAULT, &event); - if (result == FMOD_OK) - { - printf("getEvent(\"%s\") succeeded\n", name); - - /* we don't need to set the position of the instance, - as it is copied from the info-only event, but we - do need to set the parameter value. - */ - FMOD::EventParameter *param; - ERRCHECK(result = event->getParameter("sound", ¶m)); - ERRCHECK(result = param->setValue(g_sound)); - ERRCHECK(result = event->start()); - } - else - { - printf("getEvent(\"%s\") failed\n", name); - } - } - else - { - result = eventgroup->getEvent(name, FMOD_EVENT_DEFAULT, &event); - if (result == FMOD_OK) - { - printf("getEvent(\"%s\") succeeded\n", name); - setupEvent(event); - ERRCHECK(result = event->start()); - } - else - { - printf("getEvent(\"%s\") failed\n", name); - } - } - - ++g_sound; - if(g_sound > 3) - { - g_sound = 0; - } - - break; - - case 's' : - stopAllEvents(eventgroup); - break; - - case '>' : case '.' : - g_distance += 0.1f; - break; - - case '<' : case ',' : - g_distance -= 0.1f; - g_distance = (g_distance < 0.0f) ? 0.0f : g_distance; - break; - } - - const char *name; - - switch(event_behaviour) - { - case StealOldest: - name = "Steal oldest"; - break; - - case StealNewest: - name = "Steal newest"; - break; - - case StealQuietest: - name = "Steal quietest"; - break; - - case JustFail: - name = "Just fail"; - break; - - case JustFailIfQuietest: - name = "Just fail if quietest"; - break; - } - - printf("Sound = %1.0f, Distance = %4.1f, Behaviour = %-25s\r", g_sound, g_distance, name); - } - - ERRCHECK(result = eventsystem->update()); - fflush(stdout); - Sleep(10); - - } while (key != 27); - - ERRCHECK(result = eventsystem->unload()); - ERRCHECK(result = eventsystem->release()); - return 0; -} diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/2011_cycle_sustain01.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/2011_cycle_sustain01.ogg.REMOVED.git-id deleted file mode 100644 index 97e8ab0f63..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/2011_cycle_sustain01.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -e2a2e733a0126fee306b208822686d0081e66acc \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/2011_cycle_sustain02.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/2011_cycle_sustain02.ogg.REMOVED.git-id deleted file mode 100644 index 8d0cf95680..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/2011_cycle_sustain02.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -f8dde9268e949e35010a8c8b6801359dfca04819 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_still01.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_still01.ogg.REMOVED.git-id deleted file mode 100644 index b71a0bdeec..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_still01.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -b312cb01e5ded13da239f4d3f752a608c41b557d \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_still02.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_still02.ogg.REMOVED.git-id deleted file mode 100644 index 90132ecc68..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_still02.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -aea098b6eb1177eb8852cbc7f444851870e9fe85 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake01.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake01.ogg.REMOVED.git-id deleted file mode 100644 index 84c1f794b6..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake01.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -0c9d11aaf531a28b090a228d98ef2302dae28ef2 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake02.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake02.ogg.REMOVED.git-id deleted file mode 100644 index 238ba6d26e..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake02.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -bae6f9e68daba1c6b4097453e2844cb684e24746 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake03.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake03.ogg.REMOVED.git-id deleted file mode 100644 index 7f8cdff633..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/bow_wake03.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -43d5e62c789f1035a0a986cb215e9d932b4ac85b \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/buzz01.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/buzz01.ogg.REMOVED.git-id deleted file mode 100644 index 136db2f2fc..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/buzz01.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -e2c58ac1956cfee7aecc8033e9fec00bf8e2497c \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/buzz02.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/buzz02.ogg.REMOVED.git-id deleted file mode 100644 index b269cb1913..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/buzz02.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -09f1efffb52749cf3c82ea1c24bf065f7056551c \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak01.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak01.ogg.REMOVED.git-id deleted file mode 100644 index f7e32bc4bd..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak01.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -916e693027521346650e90bd6952793588fa0195 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak02.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak02.ogg.REMOVED.git-id deleted file mode 100644 index de28399f7a..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak02.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -26761bd8578998bf074c69128737cb46a679c70d \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak03.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak03.ogg.REMOVED.git-id deleted file mode 100644 index 746450b9a2..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak03.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -5ad73b03237f48954731570111e2f05c1fde8d62 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak05.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak05.ogg.REMOVED.git-id deleted file mode 100644 index ccdaa46c8b..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak05.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -13ed499abdbb01ecf2e6a4bdc61808be040c3a75 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak06.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak06.ogg.REMOVED.git-id deleted file mode 100644 index 61e1f792a4..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak06.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -6d10c587d407edd29d1397b29a004c778e0371e6 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak07.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak07.ogg.REMOVED.git-id deleted file mode 100644 index 79c12c63cc..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/cables_creak07.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -45d681f35f416ac35de5f7c01813059a79f7589d \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component01.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component01.ogg.REMOVED.git-id deleted file mode 100644 index fb746ce3b3..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component01.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -90a0062c3dca0a154495d1c333a6849b69ea8864 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component02.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component02.ogg.REMOVED.git-id deleted file mode 100644 index 9946062b14..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component02.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -e044d58c9cb09d6720fb0a1bc7bf25d3cb8ce995 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component03.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component03.ogg.REMOVED.git-id deleted file mode 100644 index c753e19a28..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component03.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -6f134247f16790f043e40e57e348417f8727be8e \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component04.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component04.ogg.REMOVED.git-id deleted file mode 100644 index e44be4527d..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component04.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -ec4c28d9c4161ea0133757690cdaddfa3f977846 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component06.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component06.ogg.REMOVED.git-id deleted file mode 100644 index 488a802e6e..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component06.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -4aaf6cb5a1b9047d51d6b621c9f9d58437840b36 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component07.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component07.ogg.REMOVED.git-id deleted file mode 100644 index 89dc7f66a6..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_component07.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -b27ac42c00b2c3d4f293f7a86bf8e1ecea87b083 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_load.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_load.ogg.REMOVED.git-id deleted file mode 100644 index a52be6939e..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/engine_load.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -7f7e29bd67f11dc5adc0015187b6a1241a47581a \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/metal_creak_light_12.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/metal_creak_light_12.ogg.REMOVED.git-id deleted file mode 100644 index a7e3d7a741..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/metal_creak_light_12.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -a39f23108be827f9115b3b10f29f3e527f23d88b \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/metal_screech03.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/metal_screech03.ogg.REMOVED.git-id deleted file mode 100644 index f91b87255a..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/Submarine/metal_screech03.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -24fd1ca5c0103f010336d1393b1e74ccc55a6544 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/crickets.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/crickets.ogg.REMOVED.git-id deleted file mode 100644 index ec6b1d0cc8..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/2011/crickets.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -dac17685c736c9d8c4179ea8dfe981a1dfa80c0d \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/build_media_files.sh b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/build_media_files.sh deleted file mode 100644 index f49824093d..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/build_media_files.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -cd ../../../tools/fsbanklib -./example -cp *.fsb ../../fmoddesignerapi/examples/media diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/car/Readme Copyright.txt b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/car/Readme Copyright.txt deleted file mode 100644 index 2166a501ba..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/car/Readme Copyright.txt +++ /dev/null @@ -1,3 +0,0 @@ -The contents of this folder are protected by international copyright laws and are for evaluation purposes only. These files remain the property of Soundwave Concepts. - -(c) 2005 Greg Hill - Soundwave Concepts \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/examples.fev b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/examples.fev deleted file mode 100644 index bd25a10a897d53384e41b7665f5c129158d86925..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 55134 zcmeHw37Atw*7ofM1w;|t6(uYxDA+8DB9in*BiJm`AmSiRx;sq=(n*`7*<6SUqX+^b zZn%Ie4vGtIjHvB8@}cN_;yRA#=;)y1!nlt6_r6uPZdKArI%!bn|DQR}bMCEMbVII-5d`);9!v5z8tcUNWijQOnu{@l(4el(JcD z0^7%CyB=TP>zT5vW6WYRqm9u}*zXNgR(XRngpt_T(&u_S*W+K$y-X?^ArcMyy!HOz zG)YFg)_WsSUl@s)2L}gO7tLSa81Yx*9A8Q@I!kDTGX)W-r2;yUI>0X0NuPh+`^3Un z$%ccgUb-*$piL>QTuo&8p;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>&kzf8J@`-1py6g1aWA-}0(v8&*{$p(a| z=qs*qKE$60b63&KkiUjXTNUaP-7bWWKa4-)VOJ~EWQd` z>6_hvZ=%o;qxgB_Vb0}v`;8Q*Qqc!pD%;gxDU*;tz!LU!p(|?Qq?!G#0_Cy-j19)s z_*o(IivKibT$kZhQsdGH3Kb_>u2CpDi!Q0acD276$8gjTCUeWgHm;E!A72Hd@lR8u zyg`41aDFH#GJ46esJE58I7N1^aX#_MB!mz+Wne|wlM1A`q8fyGT>dD0T8RW!!7%Yj zYWcTI#ufgd$hhL)4(Utr$4BO69I^b9BBz*-gsg%w(K>YF0y%*CY9`{R1hpZ&nCq03 z;#Fdo)JQ~lNxL>UkBBh_%ZPa)f-6;_h_#f3 zGW1dv%Sf!mPfR$4`8fAgib1)?S6f+Gz(KbXQJ#{(>DZNMdrB%}f~TI_$!n8z71d#H117Q*L?`o$c`W9Xu5x~;B_#>J<>DG8zF0!{hHLTo)3BlNe`T5d zIgDf!&_H}-p_pGSNJcPDeAFOi@i6frfl~1yfn@AbgR0Q%WQD>MmBPdPb1(YG84q>J zRW5#-H$BtuLDS{zqj#XYXdN?0!;8s^Wslib1#j+h&mi2%C#xgVj diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_1.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_1.ogg.REMOVED.git-id deleted file mode 100644 index c820803e7b..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_1.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -e0e59ea67518c7b05cabdf52a31d5d92c7eada49 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_2.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_2.ogg.REMOVED.git-id deleted file mode 100644 index f97d5fb08e..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_2.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -9dd7037ce15d071cdfe6de30460fc66289157101 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_3.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_3.ogg.REMOVED.git-id deleted file mode 100644 index 518248edc4..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_3.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -9c585da7ae860970ce501f1520ddb98ae6527c6a \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_6channel.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_6channel.ogg.REMOVED.git-id deleted file mode 100644 index 1fee08148e..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/interactive_music_6channel.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -0212f56337f732c62d8fab11552ae4c52a17c460 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/excited.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/excited.ogg.REMOVED.git-id deleted file mode 100644 index d0a62ddf6f..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/excited.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -1efc1a3905adf24cfdde46644640a93065027da5 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/relaxed.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/relaxed.ogg.REMOVED.git-id deleted file mode 100644 index c8b1304ac5..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/relaxed.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -f5ce0238c297f7ee359f8c9dadeeae96b1dd789b \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-01.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-01.ogg.REMOVED.git-id deleted file mode 100644 index 1d6c4df561..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-01.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -34355c43c2a63766ed977879797d9701a956420e \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-02.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-02.ogg.REMOVED.git-id deleted file mode 100644 index 88863d208f..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-02.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -598588a81b43a673d59bfcf8f5207d51c8a88f94 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-03.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-03.ogg.REMOVED.git-id deleted file mode 100644 index e0ef29c346..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-03.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -80cf3d5869aedcd008977e0ff632bdbb07d4edc9 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-fadeout.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-fadeout.ogg.REMOVED.git-id deleted file mode 100644 index 086d78972e..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-idle-fadeout.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -6270ae17cbc368d71decdd6b1bf561e45fc8aaa5 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-race-finish.ogg.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-race-finish.ogg.REMOVED.git-id deleted file mode 100644 index d4fb1cc9c6..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/music/state-race-finish.ogg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -fd9c8bcc912ab192ce616872c9ede9b054c5a73a \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/onefootstep.wav.REMOVED.git-id b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/onefootstep.wav.REMOVED.git-id deleted file mode 100644 index 4a2ef96555..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/onefootstep.wav.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -4f9da84d59ae995355e22ad02808c196c7ebcadd \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/streaming_bank.txt b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/streaming_bank.txt deleted file mode 100644 index dd0dfc2921..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/streaming_bank.txt +++ /dev/null @@ -1 +0,0 @@ -interactive_music_6channel.ogg, quality=0, fsound_loop_normal diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/tutorial_bank.txt b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/tutorial_bank.txt deleted file mode 100644 index 80f1184baa..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/media/tutorial_bank.txt +++ /dev/null @@ -1,267 +0,0 @@ -2011\2011_cycle_off.ogg, quality=0, fsound_loop_off -2011\2011_cycle_on.ogg, quality=0, fsound_loop_off -2011\2011_cycle_sustain01.ogg, quality=0, fsound_loop_normal -2011\2011_cycle_sustain02.ogg, quality=0, fsound_loop_normal -2011\2011_cycle_sustain_spawn_grain.ogg, quality=0, fsound_loop_off -2011\beep01.ogg, quality=0, fsound_loop_off -2011\bird_call01.ogg, quality=0, fsound_loop_off -2011\bird_call02.ogg, quality=0, fsound_loop_off -2011\bird_call03.ogg, quality=0, fsound_loop_off -2011\bird_call04.ogg, quality=0, fsound_loop_off -2011\bird_call05.ogg, quality=0, fsound_loop_off -2011\bird_call06.ogg, quality=0, fsound_loop_off -2011\bird_call07.ogg, quality=0, fsound_loop_off -2011\bird_call08.ogg, quality=0, fsound_loop_off -2011\bird_call09.ogg, quality=0, fsound_loop_off -2011\bird_call10.ogg, quality=0, fsound_loop_off -2011\bird_call11.ogg, quality=0, fsound_loop_off -2011\bird_call12.ogg, quality=0, fsound_loop_off -2011\bird_call13.ogg, quality=0, fsound_loop_off -2011\bird_call14.ogg, quality=0, fsound_loop_off -2011\bird_call15.ogg, quality=0, fsound_loop_off -2011\bird_call16.ogg, quality=0, fsound_loop_off -2011\bubble_burst01.ogg, quality=0, fsound_loop_off -2011\bubble_burst02.ogg, quality=0, fsound_loop_off -2011\bubble_burst03.ogg, quality=0, fsound_loop_off -2011\bubble_burst04.ogg, quality=0, fsound_loop_off -2011\bubble_burst05.ogg, quality=0, fsound_loop_off -2011\bubble_burst06.ogg, quality=0, fsound_loop_off -2011\bubbles_close01.ogg, quality=0, fsound_loop_off -2011\bubbles_close02.ogg, quality=0, fsound_loop_off -2011\bubbles_close03.ogg, quality=0, fsound_loop_off -2011\bubbles_close04.ogg, quality=0, fsound_loop_off -2011\bubbles_close05.ogg, quality=0, fsound_loop_off -2011\bubbles_close06.ogg, quality=0, fsound_loop_off -2011\bubbles_small01.ogg, quality=0, fsound_loop_off -2011\bubbles_small02.ogg, quality=0, fsound_loop_off -2011\bubbles_small03.ogg, quality=0, fsound_loop_off -2011\bubbles_small04.ogg, quality=0, fsound_loop_off -2011\bubbles_small05.ogg, quality=0, fsound_loop_off -2011\bubbles_small06.ogg, quality=0, fsound_loop_off -2011\cricket_single_cycle.ogg, quality=0, fsound_loop_off -2011\crickets.ogg, quality=0, fsound_loop_normal -2011\decending tone.ogg, quality=0, fsound_loop_off -2011\detonation01.ogg, quality=0, fsound_loop_off -2011\detonation02.ogg, quality=0, fsound_loop_off -2011\detonation03.ogg, quality=0, fsound_loop_off -2011\detonation04.ogg, quality=0, fsound_loop_off -2011\detonation05.ogg, quality=0, fsound_loop_off -2011\detonation06.ogg, quality=0, fsound_loop_off -2011\earth_debris01.ogg, quality=0, fsound_loop_off -2011\earth_debris02.ogg, quality=0, fsound_loop_off -2011\earth_debris03.ogg, quality=0, fsound_loop_off -2011\earth_debris04.ogg, quality=0, fsound_loop_off -2011\earth_debris05.ogg, quality=0, fsound_loop_off -2011\earth_debris06.ogg, quality=0, fsound_loop_off -2011\earth_debris07.ogg, quality=0, fsound_loop_off -2011\earth_debris08.ogg, quality=0, fsound_loop_off -2011\flame_burst_long01.ogg, quality=0, fsound_loop_off -2011\flame_burst_long02.ogg, quality=0, fsound_loop_off -2011\flame_burst_long03.ogg, quality=0, fsound_loop_off -2011\flame_burst_long04.ogg, quality=0, fsound_loop_off -2011\flame_burst_long05.ogg, quality=0, fsound_loop_off -2011\flame_burst_long06.ogg, quality=0, fsound_loop_off -2011\flame_burst_short01.ogg, quality=0, fsound_loop_off -2011\flame_burst_short02.ogg, quality=0, fsound_loop_off -2011\flame_burst_short03.ogg, quality=0, fsound_loop_off -2011\flame_burst_short04.ogg, quality=0, fsound_loop_off -2011\flame_burst_short05.ogg, quality=0, fsound_loop_off -2011\flame_burst_short06.ogg, quality=0, fsound_loop_off -2011\flame_burst_small01.ogg, quality=0, fsound_loop_off -2011\flame_burst_small02.ogg, quality=0, fsound_loop_off -2011\flame_burst_small03.ogg, quality=0, fsound_loop_off -2011\flame_burst_small04.ogg, quality=0, fsound_loop_off -2011\flame_burst_small05.ogg, quality=0, fsound_loop_off -2011\flame_burst_small06.ogg, quality=0, fsound_loop_off -2011\footsteps_concrete_01.ogg, quality=0, fsound_loop_off -2011\footsteps_concrete_02.ogg, quality=0, fsound_loop_off -2011\footsteps_concrete_03.ogg, quality=0, fsound_loop_off -2011\footsteps_concrete_04.ogg, quality=0, fsound_loop_off -2011\footsteps_concrete_05.ogg, quality=0, fsound_loop_off -2011\footsteps_concrete_06.ogg, quality=0, fsound_loop_off -2011\footsteps_concrete_07.ogg, quality=0, fsound_loop_off -2011\footsteps_concrete_08.ogg, quality=0, fsound_loop_off -2011\footsteps_leaves01.ogg, quality=0 -2011\footsteps_leaves02.ogg, quality=0 -2011\footsteps_leaves03.ogg, quality=0, fsound_loop_off -2011\footsteps_leaves04.ogg, quality=0, fsound_loop_off -2011\frog01.ogg, quality=0, fsound_loop_off -2011\frog02.ogg, quality=0, fsound_loop_off -2011\frog03.ogg, quality=0, fsound_loop_off -2011\frog04.ogg, quality=0, fsound_loop_off -2011\glass_shard_smash01.ogg, quality=0, fsound_loop_off -2011\glass_shard_smash02.ogg, quality=0, fsound_loop_off -2011\glass_shard_smash03.ogg, quality=0, fsound_loop_off -2011\glass_shard_smash04.ogg, quality=0, fsound_loop_off -2011\glass_shard_smash05.ogg, quality=0, fsound_loop_off -2011\glass_shard_smash06.ogg, quality=0, fsound_loop_off -2011\glass_shard_smash07.ogg, quality=0, fsound_loop_off -2011\glass_shard_smash08.ogg, quality=0, fsound_loop_off -2011\metal_fragment01.ogg, quality=0, fsound_loop_off -2011\metal_fragment02.ogg, quality=0, fsound_loop_off -2011\metal_fragment03.ogg, quality=0, fsound_loop_off -2011\metal_fragment04.ogg, quality=0, fsound_loop_off -2011\metal_fragment05.ogg, quality=0, fsound_loop_off -2011\metal_fragment06.ogg, quality=0, fsound_loop_off -2011\metal_fragment07.ogg, quality=0, fsound_loop_off -2011\metal_fragment08.ogg, quality=0, fsound_loop_off -2011\rifle_blast01.ogg, quality=0, fsound_loop_off -2011\rifle_blast02.ogg, quality=0, fsound_loop_off -2011\rifle_blast03.ogg, quality=0, fsound_loop_off -2011\shotgun_blast01.ogg, quality=0, fsound_loop_off -2011\shotgun_blast02.ogg, quality=0, fsound_loop_off -2011\shotgun_blast03.ogg, quality=0, fsound_loop_off -2011\splash_large01.ogg, quality=0, fsound_loop_off -2011\splash_large02.ogg, quality=0, fsound_loop_off -2011\splash_large03.ogg, quality=0, fsound_loop_off -2011\splash_large04.ogg, quality=0, fsound_loop_off -2011\splash_large05.ogg, quality=0, fsound_loop_off -2011\splash_medium01.ogg, quality=0, fsound_loop_off -2011\splash_medium02.ogg, quality=0, fsound_loop_off -2011\splash_medium03.ogg, quality=0, fsound_loop_off -2011\splash_medium04.ogg, quality=0, fsound_loop_off -2011\splash_medium05.ogg, quality=0, fsound_loop_off -2011\splash_medium06.ogg, quality=0, fsound_loop_off -2011\splash_medium07.ogg, quality=0, fsound_loop_off -2011\splash_medium08.ogg, quality=0, fsound_loop_off -2011\submarine\bow_still01.ogg, quality=0, fsound_loop_off -2011\submarine\bow_still02.ogg, quality=0, fsound_loop_off -2011\submarine\bow_wake01.ogg, quality=0 -2011\submarine\bow_wake02.ogg, quality=0, fsound_loop_off -2011\submarine\bow_wake03.ogg, quality=0, fsound_loop_off -2011\submarine\buzz01.ogg, quality=0, fsound_loop_off -2011\submarine\buzz02.ogg, quality=0, fsound_loop_off -2011\submarine\cables_creak01.ogg, quality=0, fsound_loop_off -2011\submarine\cables_creak02.ogg, quality=0, fsound_loop_off -2011\submarine\cables_creak03.ogg, quality=0, fsound_loop_off -2011\submarine\cables_creak04.ogg, quality=0, fsound_loop_off -2011\submarine\cables_creak05.ogg, quality=0, fsound_loop_off -2011\submarine\cables_creak06.ogg, quality=0, fsound_loop_off -2011\submarine\cables_creak07.ogg, quality=0, fsound_loop_off -2011\submarine\cables_creak08.ogg, quality=0, fsound_loop_off -2011\submarine\clock_loop.ogg, quality=0, fsound_loop_off -2011\submarine\engine_component01.ogg, quality=0, fsound_loop_off -2011\submarine\engine_component02.ogg, quality=0, fsound_loop_off -2011\submarine\engine_component03.ogg, quality=0, fsound_loop_normal -2011\submarine\engine_component04.ogg, quality=0, fsound_loop_off -2011\submarine\engine_component05.ogg, quality=0, fsound_loop_off -2011\submarine\engine_component06.ogg, quality=0, fsound_loop_off -2011\submarine\engine_component07.ogg, quality=0, fsound_loop_off -2011\submarine\engine_component08.ogg, quality=0, fsound_loop_off -2011\submarine\engine_component09.ogg, quality=0, fsound_loop_off -2011\submarine\engine_component10.ogg, quality=0, fsound_loop_off -2011\submarine\engine_load.ogg, quality=0, fsound_loop_off -2011\submarine\hatch_door_open_close01.ogg, quality=0, fsound_loop_off -2011\submarine\hatch_door_open_close02.ogg, quality=0, fsound_loop_off -2011\submarine\hatch_door_open_close03.ogg, quality=0, fsound_loop_normal -2011\submarine\hatch_door_open_close04.ogg, quality=0, fsound_loop_off -2011\submarine\hatch_door_open_close05.ogg, quality=0, fsound_loop_off -2011\submarine\impact01.ogg, quality=0, fsound_loop_off -2011\submarine\impact02.ogg, quality=0, fsound_loop_off -2011\submarine\impact03.ogg, quality=0, fsound_loop_off -2011\submarine\impact04.ogg, quality=0, fsound_loop_off -2011\submarine\impact05.ogg, quality=0, fsound_loop_off -2011\submarine\impact06.ogg, quality=0, fsound_loop_off -2011\submarine\impact07.ogg, quality=0, fsound_loop_off -2011\submarine\impact08.ogg, quality=0, fsound_loop_off -2011\submarine\impact_heavy01.ogg, quality=0, fsound_loop_off -2011\submarine\impact_heavy02.ogg, quality=0, fsound_loop_off -2011\submarine\impact_heavy03.ogg, quality=0, fsound_loop_off -2011\submarine\impact_heavy04.ogg, quality=0, fsound_loop_off -2011\submarine\impact_heavy05.ogg, quality=0, fsound_loop_off -2011\submarine\impact_heavy06.ogg, quality=0, fsound_loop_off -2011\submarine\impact_heavy07.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_01.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_02.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_03.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_04.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_05.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_06.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_07.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_08.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_09.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_10.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_11.ogg, quality=0, fsound_loop_off -2011\submarine\metal_creak_light_12.ogg, quality=0, fsound_loop_off -2011\submarine\metal_screech01.ogg, quality=0, fsound_loop_off -2011\submarine\metal_screech02.ogg, quality=0, fsound_loop_off -2011\submarine\metal_screech03.ogg, quality=0, fsound_loop_off -2011\submarine\metal_screech04.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_a.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_b.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_c.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_comma.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_d.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_e.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_f.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_g.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_h.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_i.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_j.ogg, quality=0, fsound_loop_off -2011\submarine\morse_code_k.ogg, quality=0, fsound_loop_off -2011\submarine\sonar.ogg, quality=0, fsound_loop_off -2011\waves_submerged_01.ogg, quality=0, fsound_loop_off -2011\waves_submerged_02.ogg, quality=0, fsound_loop_off -2011\waves_submerged_03.ogg, quality=0, fsound_loop_off -2011\waves_submerged_04.ogg, quality=0, fsound_loop_off -2011\waves_submerged_05.ogg, quality=0, fsound_loop_off -2011\waves_submerged_06.ogg, quality=0, fsound_loop_off -2011\waves_submerged_07.ogg, quality=0, fsound_loop_off -2011\waves_submerged_08.ogg, quality=0, fsound_loop_off -ambient_one_four.ogg, quality=0, fsound_loop_off -ambient_one_loop.ogg, quality=0, fsound_loop_off -ambient_three.ogg, quality=0, fsound_loop_off -ambient_two.ogg, quality=0, fsound_loop_off -car\idle.ogg, quality=0, fsound_loop_normal -car\offhigh.ogg, quality=0, fsound_loop_off -car\offlow.ogg, quality=0, fsound_loop_off -car\offmid.ogg, quality=0, fsound_loop_normal -car\onhigh.ogg, quality=0, fsound_loop_normal -car\onlow.ogg, quality=0, fsound_loop_normal -car\onmid.ogg, quality=0, fsound_loop_normal -drum-loop.ogg, quality=0, fsound_loop_normal -interactive_music_1.ogg, quality=0, fsound_loop_normal -interactive_music_2.ogg, quality=0, fsound_loop_normal -interactive_music_3.ogg, quality=0, fsound_loop_normal -max_play_behavior_four.ogg, quality=0, fsound_loop_normal -max_play_behavior_one.ogg, quality=0, fsound_loop_normal -max_play_behavior_three.ogg, quality=0, fsound_loop_normal -max_play_behavior_two.ogg, quality=0, fsound_loop_normal -music\excited.ogg, quality=0, fsound_loop_normal -music\flsh-idle-01.ogg, quality=0, fsound_loop_normal -music\flsh-idle-02.ogg, quality=0, fsound_loop_normal -music\flsh-idle-03.ogg, quality=0, fsound_loop_normal -music\flsh-idle-04.ogg, quality=0, fsound_loop_normal -music\flsh-idle-05.ogg, quality=0, fsound_loop_normal -music\layer-bass-a.ogg, quality=0, fsound_loop_normal -music\layer-drums-a.ogg, quality=0, fsound_loop_normal -music\layer-drums-b.ogg, quality=0, fsound_loop_normal -music\layer-drums-c.ogg, quality=0, fsound_loop_normal -music\layer-drums-d.ogg, quality=0, fsound_loop_normal -music\layer-guitar-a.ogg, quality=0, fsound_loop_normal -music\layer-guitar-alt-a.ogg, quality=0, fsound_loop_normal -music\layer-guitar-alt-b.ogg, quality=0, fsound_loop_normal -music\layer-guitar-alt-c.ogg, quality=0, fsound_loop_off -music\layer-guitar-alt-d.ogg, quality=0, fsound_loop_off -music\layer-guitar-b.ogg, quality=0, fsound_loop_off -music\layer-guitar-c.ogg, quality=0, fsound_loop_off -music\layer-guitar-d.ogg, quality=0, fsound_loop_off -music\relaxed.ogg, quality=0, fsound_loop_off -music\state-idle-01.ogg, quality=0, fsound_loop_off -music\state-idle-02.ogg, quality=0, fsound_loop_off -music\state-idle-03.ogg, quality=0, fsound_loop_normal -music\state-idle-fadeout.ogg, quality=0, fsound_loop_normal -music\state-race-01a.ogg, quality=0, fsound_loop_normal -music\state-race-01b.ogg, quality=0, fsound_loop_normal -music\state-race-02a.ogg, quality=0, fsound_loop_off -music\state-race-02b.ogg, quality=0, fsound_loop_normal -music\state-race-finish.ogg, quality=0, fsound_loop_normal -music\state-race-start.ogg, quality=0, fsound_loop_normal -note.ogg, quality=0, fsound_loop_normal -onefootstep.wav, quality=0, fsound_loop_off -sequence-end.ogg, quality=0, fsound_loop_off -sequence-four.ogg, quality=0, fsound_loop_off -sequence-one.ogg, quality=0, fsound_loop_off -sequence-start.ogg, quality=0, fsound_loop_off -sequence-three.ogg, quality=0, fsound_loop_normal -sequence-two.ogg, quality=0, fsound_loop_normal diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/parameters/Makefile b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/parameters/Makefile deleted file mode 100644 index 7be2e4a536..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/parameters/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: main.cpp - g++ -O3 -o parameters -I../../../api/inc main.cpp ../../api/lib/libfmodevent.so -Wl,-rpath ../../../api/lib - -run: - ./parameters - -clean: - rm -f parameters diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/parameters/main.cpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/parameters/main.cpp deleted file mode 100644 index 086284f105..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/parameters/main.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/*=============================================================================================== - Parameters Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - Demonstrates basic usage of event parameters -===============================================================================================*/ -#include "../../../examples/common/wincompat.h" - -#include "../../api/inc/fmod_event.hpp" -#include "../../../api/inc/fmod_errors.h" - -const float UPDATE_INTERVAL = 100.0f; - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -int main(int argc, char *argv[]) -{ - FMOD::EventSystem *eventsystem; - FMOD::EventGroup *eventgroup; - FMOD::EventCategory *mastercategory; - FMOD::Event *car; - FMOD::EventParameter *rpm; - FMOD::EventParameter *load; - FMOD_RESULT result; - int key; - float rpm_val, rpm_min, rpm_max, rpm_increment, load_val, load_min, load_max, load_increment; - - printf("======================================================================\n"); - printf("Parameters Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("==============================-------=================================\n"); - printf("This demonstrates the use of FMOD event parameters. It simply plays an\n"); - printf("event, retrieves the parameters and allows the user to adjust them.\n"); - printf("======================================================================\n\n"); - - ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem)); - ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL)); - ERRCHECK(result = eventsystem->setMediaPath("../media/")); - ERRCHECK(result = eventsystem->load("examples.fev", 0, 0)); - ERRCHECK(result = eventsystem->getGroup("examples/AdvancedTechniques", FMOD_EVENT_DEFAULT, &eventgroup)); - ERRCHECK(result = eventgroup->getEvent("car", FMOD_EVENT_DEFAULT, &car)); - - ERRCHECK(result = eventsystem->getCategory("master", &mastercategory)); - - ERRCHECK(result = car->getParameter("load", &load)); - ERRCHECK(result = load->getRange(&load_min, &load_max)); - ERRCHECK(result = load->setValue(load_max)); - - ERRCHECK(result = car->getParameterByIndex(0, &rpm)); - ERRCHECK(result = rpm->getRange(&rpm_min, &rpm_max)); - ERRCHECK(result = rpm->setValue(1000.0f)); - - ERRCHECK(result = car->start()); - - printf("======================================================================\n"); - printf("Press '<' or ',' to decrease RPM\n"); - printf("Press '>' or '.' to increase RPM\n"); - printf("Press '-' or '_' to decrease load\n"); - printf("Press '+' or '=' to increase load\n"); - printf("Press ESC to quit\n"); - printf("======================================================================\n"); - - rpm_increment = (rpm_max - rpm_min) / UPDATE_INTERVAL; - ERRCHECK(result = rpm->getValue(&rpm_val)); - load_increment = (load_max - load_min) / UPDATE_INTERVAL; - ERRCHECK(result = load->getValue(&load_val)); - - key = 0; - do - { - if (_kbhit()) - { - key = _getch(); - - if (key == '<' || key == ',') - { - rpm_val -= rpm_increment; - if (rpm_val < rpm_min) - { - rpm_val = rpm_min; - } - - ERRCHECK(result = rpm->setValue(rpm_val)); - } - else if (key == '>' || key == '.') - { - rpm_val += rpm_increment; - if (rpm_val > rpm_max) - { - rpm_val = rpm_max; - } - - ERRCHECK(result = rpm->setValue(rpm_val)); - } - if (key == '-' || key == '_') - { - load_val -= load_increment; - if (load_val < load_min) - { - load_val = load_min; - } - - ERRCHECK(result = load->setValue(load_val)); - } - else if (key == '+' || key == '=') - { - load_val += load_increment; - if (load_val > load_max) - { - load_val = load_max; - } - - ERRCHECK(result = load->setValue(load_val)); - } - else if (key == ' ') - { - bool paused; - - ERRCHECK(result = mastercategory->getPaused(&paused)); - paused = !paused; - ERRCHECK(result = mastercategory->setPaused(paused)); - } - - } - - ERRCHECK(result = eventsystem->update()); - Sleep(15); - - printf("RPM = %.4f, load = %.4f \r", rpm_val, load_val); - fflush(stdout); - - } while (key != 27); - - ERRCHECK(result = eventgroup->freeEventData()); - ERRCHECK(result = eventsystem->release()); - return 0; -} diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_selected/Makefile b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_selected/Makefile deleted file mode 100644 index 975fea3702..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_selected/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: main.cpp - g++ -O3 -o programmer_selected -I../../../api/inc main.cpp ../../api/lib/libfmodevent.so -Wl,-rpath ../../../api/lib - -run: - ./programmer_selected - -clean: - rm -f programmer_selected diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_selected/main.cpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_selected/main.cpp deleted file mode 100644 index edeb56629e..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_selected/main.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/*============================================================================= - Programmer Selected Sound Definition Example - Copyright (c), Firelight Technologies Pty, Ltd 2007-2011. - - Demonstrates how to use the "programmer selected sound definition" feature of - the FMOD event system -=============================================================================*/ -#include "../../../examples/common/wincompat.h" - -#include "../../api/inc/fmod_event.hpp" -#include "../../../api/inc/fmod_errors.h" - -const char *MEDIA_PATH = "../media/"; - -static int g_sounddef_entry_index = 0; - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -FMOD_RESULT F_CALLBACK eventcallback(FMOD_EVENT *event, FMOD_EVENT_CALLBACKTYPE type, void *param1, void *param2, void *userdata) -{ - switch (type) - { - case FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEX : - { - char *name = (char *)param1; // [in] (char *) name of sound definition - int *index = (int *)param2; // [out] (int *) the sounddef entry index to use - - *index = (g_sounddef_entry_index < *index) ? g_sounddef_entry_index : *index - 1; - printf("FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_SELECTINDEX '%s': %d\n", name, *index); - - break; - } - } - - return FMOD_OK; -} - - -int main(int argc, char *argv[]) -{ - FMOD_RESULT result; - FMOD::EventSystem *eventsystem; - FMOD::EventGroup *eventgroup; - FMOD::Event *event; - int key; - - ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem)); - ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL)); - ERRCHECK(result = eventsystem->setMediaPath((char *)MEDIA_PATH)); - ERRCHECK(result = eventsystem->load("examples.fev", 0, 0)); - ERRCHECK(result = eventsystem->getGroup("examples/FeatureDemonstration/SequencingAndStitching", FMOD_EVENT_DEFAULT, &eventgroup)); - - printf("======================================================================\n"); - printf("Programmer Selected Sound Definition.\n"); - printf("Copyright (c) Firelight Technologies 2006-2011.\n"); - printf("----------------------------------------------------------------------\n"); - printf("Press 'Space' to start the 'Programmer Selected' event\n"); - printf("Press '>' to increase sound definition entry index\n"); - printf("Press '<' to decrease sound definition entry index\n"); - printf("Press 'Esc' to quit\n"); - printf("======================================================================\n"); - printf("Sound definition entry index = %d\n", g_sounddef_entry_index); - - key = 0; - do - { - if (_kbhit()) - { - key = _getch(); - - switch(key) - { - case ' ' : - ERRCHECK(result = eventgroup->getEvent("ProgrammerSelected", FMOD_EVENT_DEFAULT, &event)); - ERRCHECK(result = event->setCallback(eventcallback, 0)); - ERRCHECK(result = event->start()); - break; - - case '>' : - ++g_sounddef_entry_index; - printf("Sound definition entry index = %d\n", g_sounddef_entry_index); - break; - - case '<' : - --g_sounddef_entry_index; - g_sounddef_entry_index = (g_sounddef_entry_index < 0) ? 0 : g_sounddef_entry_index; - printf("Sound definition entry index = %d\n", g_sounddef_entry_index); - break; - } - } - - ERRCHECK(result = eventsystem->update()); - fflush(stdout); - Sleep(10); - - } while (key != 27); - - ERRCHECK(result = eventsystem->unload()); - ERRCHECK(result = eventsystem->release()); - return 0; -} diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_sound/Makefile b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_sound/Makefile deleted file mode 100644 index fbcefa25bc..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_sound/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: main.cpp - g++ -O3 -o programmer_sound -I../../../api/inc main.cpp ../../api/lib/libfmodevent.so -Wl,-rpath ../../../api/lib - -run: - ./programmer_sound - -clean: - rm -f programmer_sound diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_sound/main.cpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_sound/main.cpp deleted file mode 100644 index 9ba7a97493..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/programmer_sound/main.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/*============================================================================== - Programmer Sound Example - Copyright (c), Firelight Technologies Pty, Ltd 2006-2011. - - Demonstrates how to use the "programmer sound" feature of the FMOD event system -==============================================================================*/ -#include "../../../examples/common/wincompat.h" - -#include "../../api/inc/fmod_event.hpp" -#include "../../../api/inc/fmod_errors.h" - -const char *MEDIA_PATH = "../media/"; -const char *FSB_NAME = "../media/tutorial_bank.fsb"; - -static int g_sound_index = 0; -static const int SOUND_INDEX_MAX = 4; -static int g_index_map[SOUND_INDEX_MAX]; - -FMOD::Sound *fsb; -FMOD::System *sys; - - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - - -void initIndexMap(FMOD::Sound *fsb) -{ - FMOD_RESULT result; - int numsubsounds, i; - - /* Sounds aren't in a logical order in the FSB, so we need to iterate - through and assign the appropriate filenames to the index map - */ - - ERRCHECK(result = fsb->getNumSubSounds(&numsubsounds)); - - for (i = 0; i < SOUND_INDEX_MAX; ++i) - { - g_index_map[i] = -1; - } - - for (i = 0; i < numsubsounds; ++i) - { - FMOD::Sound *sound; - char name[100]; - - ERRCHECK(result = fsb->getSubSound(i, &sound)); - ERRCHECK(result = sound->getName(name, 100)); - - if(strncmp(name, "sequence-one.ogg", 100) == 0) - { - g_index_map[0] = i; - } - else if(strncmp(name, "sequence-two.ogg", 100) == 0) - { - g_index_map[1] = i; - } - else if(strncmp(name, "sequence-three.ogg", 100) == 0) - { - g_index_map[2] = i; - } - else if(strncmp(name, "sequence-four.ogg", 100) == 0) - { - g_index_map[3] = i; - } - } -} - - -FMOD_RESULT F_CALLBACK eventcallback(FMOD_EVENT *event, FMOD_EVENT_CALLBACKTYPE type, void *param1, void *param2, void *userdata) -{ - FMOD_RESULT result; - - switch (type) - { - case FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE : - { - char *name = (char *)param1; // [in] (char *) name of sound definition - int entryindex = *((int *)param2); // [in] (int) index of sound definition entry - FMOD::Sound **s = (FMOD::Sound **)param2; // [out] (FMOD::Sound *) a valid lower level API FMOD Sound handle - char sound_name[128]; - - ERRCHECK((g_index_map[g_sound_index] >= 0) ? FMOD_OK : FMOD_ERR_SUBSOUNDS); - ERRCHECK(result = fsb->getSubSound(g_index_map[g_sound_index], s)); - ERRCHECK(result = (*s)->getName(sound_name, 128)); - printf("FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE '%s' (%d)\n", sound_name, g_index_map[g_sound_index]); - break; - } - - case FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE : - { - FMOD::Sound *s = (FMOD::Sound *)param2; // [in] (FMOD::Sound *) the FMOD sound handle that was previously created in FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE - char sound_name[128]; - - ERRCHECK(result = s->getName(sound_name, 128)); - printf("FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE '%s'\n", sound_name); - break; - } - } - - return FMOD_OK; -} - - -int main(int argc, char *argv[]) -{ - FMOD_RESULT result; - FMOD::EventSystem *eventsystem; - FMOD::EventGroup *eventgroup; - FMOD::Event *event; - int key; - - printf("======================================================================\n"); - printf("Programmer Sound. Copyright (c) Firelight Technologies 2006-2011.\n"); - printf("======================================================================\n"); - - ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem)); - ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL)); - ERRCHECK(result = eventsystem->setMediaPath((char *)MEDIA_PATH)); - ERRCHECK(result = eventsystem->load("examples.fev", 0, 0)); - ERRCHECK(result = eventsystem->getGroup("examples/FeatureDemonstration/SequencingAndStitching", FMOD_EVENT_DEFAULT, &eventgroup)); - - ERRCHECK(result = eventsystem->getSystemObject(&sys)); - ERRCHECK(result = sys->createStream(FSB_NAME, FMOD_2D | FMOD_SOFTWARE, 0, &fsb)); - - initIndexMap(fsb); - - printf("======================================================================\n"); - printf("Press 'Space' to start the 'Programmer Sound' event\n"); - printf("Press '>' to increase sound index\n"); - printf("Press '<' to decrease sound index\n"); - printf("Press 'Esc' to quit\n"); - printf("======================================================================\n"); - printf("Sound index = %d\n", g_sound_index + 1); - - key = 0; - do - { - if (_kbhit()) - { - key = _getch(); - - switch(key) - { - case ' ' : - ERRCHECK(result = eventgroup->getEvent("ProgrammerSounds", FMOD_EVENT_DEFAULT, &event)); - ERRCHECK(result = event->setCallback(eventcallback, 0)); - ERRCHECK(result = event->start()); - break; - - case '>' : - ++g_sound_index; - g_sound_index = (g_sound_index >= SOUND_INDEX_MAX) ? SOUND_INDEX_MAX - 1 : g_sound_index; - printf("Sound index = %d\n", g_sound_index + 1); - break; - - case '<' : - --g_sound_index; - g_sound_index = (g_sound_index < 0) ? 0 : g_sound_index; - printf("Sound index = %d\n", g_sound_index + 1); - break; - } - } - - ERRCHECK(result = eventsystem->update()); - fflush(stdout); - Sleep(10); - - } while (key != 27); - - ERRCHECK(result = eventsystem->unload()); - ERRCHECK(result = fsb->release()); - ERRCHECK(result = eventsystem->release()); - return 0; -} diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/realtime_tweaking/Makefile b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/realtime_tweaking/Makefile deleted file mode 100644 index c1e616f0ef..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/realtime_tweaking/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: main.cpp - g++ -O3 -o realtime_tweaking -I../../../api/inc main.cpp ../../api/lib/libfmodeventnet.so -Wl,-rpath ../../../api/lib -Wl,-rpath ../../api/lib - -run: - ./realtime_tweaking - -clean: - rm -f realtime_tweaking diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/realtime_tweaking/main.cpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/realtime_tweaking/main.cpp deleted file mode 100644 index c96c13f605..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/realtime_tweaking/main.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/*=============================================================================================== - Realtime Tweaking Example - Copyright (c), Firelight Technologies Pty, Ltd 2010-2011. - - Demonstrates basic usage of FMOD's network data-driven event library (fmod_event_net.dll) -===============================================================================================*/ -#include "../../../examples/common/wincompat.h" - -#include "../../api/inc/fmod_event.hpp" -#include "../../api/inc/fmod_event_net.hpp" -#include "../../../api/inc/fmod_errors.h" - -const char *MEDIA_PATH = "../media/"; -const int NUM_EVENTS = 3; - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -FMOD_RESULT F_CALLBACK eventcallback(FMOD_EVENT *event, FMOD_EVENT_CALLBACKTYPE type, void *param1, void *param2, void *userdata) -{ - if (type == FMOD_EVENT_CALLBACKTYPE_NET_MODIFIED) - { - unsigned int t = (unsigned int)param2; - printf("%p %s %f (%d)\n", event, (unsigned int)param1 == FMOD_EVENTPROPERTY_VOLUME ? "volume" : FMOD_EVENTPROPERTY_PITCH ? "pitch" : "???", *((float *)&t), (unsigned int)userdata); - } - - return FMOD_OK; -} - -int main(int argc, char *argv[]) -{ - FMOD_RESULT result; - FMOD::EventSystem *eventsystem; - FMOD::EventGroup *eventgroup; - FMOD::Event *event[NUM_EVENTS]; - char *event_name[NUM_EVENTS] = { - "Basics/BasicEventWithLooping", - "SequencingAndStitching/LoopLogic", - "3D Events/2D-3DPanMorph" - }; - int key, i, userdata = 0; - - printf("======================================================================\n"); - printf("Realtime Tweaking. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("======================================================================\n"); - printf("This example shows how to initialize the FMOD Net Event System so that\n"); - printf("FMOD Designer can connect to your game and tweak events as they're\n"); - printf("playing.\n"); - printf("Start some events then connect to this app using the Audition menu\n"); - printf("in FMOD Designer. Load examples.fdp and change the \n"); - printf("volume of the playing events using the volume slider in the event\n"); - printf("property sheet\n"); - printf("======================================================================\n\n"); - - ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem)); - ERRCHECK(result = FMOD::NetEventSystem_Init(eventsystem)); - ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL)); - ERRCHECK(result = eventsystem->setMediaPath((char *)MEDIA_PATH)); - ERRCHECK(result = eventsystem->load("examples.fev", 0, 0)); - ERRCHECK(result = eventsystem->getGroup("examples/FeatureDemonstration", FMOD_EVENT_DEFAULT, &eventgroup)); - - for (i=0; i < NUM_EVENTS; i++) - { - event[i] = 0; - } - - printf("======================================================================\n"); - printf("Press 1 - 3 to start/stop events\n"); - printf("Press ESC to quit\n"); - printf("======================================================================\n"); - - key = 0; - do - { - if (_kbhit()) - { - key = _getch(); - - if ((key >= '1') && (key <= '3')) - { - i = (int)(key - '1'); - - if (event[i]) - { - ERRCHECK(result = event[i]->stop()); - event[i] = 0; - printf("Stopping '%s'\n", event_name[i]); - } - else - { - ERRCHECK(result = eventgroup->getEvent(event_name[i], FMOD_EVENT_DEFAULT, &event[i])); - ERRCHECK(result = event[i]->setCallback(eventcallback, (void *)(userdata++))); - ERRCHECK(result = event[i]->start()); - printf("Starting '%s'\n", event_name[i]); - } - } - } - - ERRCHECK(result = eventsystem->update()); - ERRCHECK(result = FMOD::NetEventSystem_Update()); - Sleep(10); - - } while (key != 27); - - ERRCHECK(result = eventsystem->release()); - ERRCHECK(result = FMOD::NetEventSystem_Shutdown()); - return 0; -} - diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/simple_event/Makefile b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/simple_event/Makefile deleted file mode 100644 index aee8bf5f5a..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/simple_event/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: main.cpp - g++ -O3 -o simple_event -I../../../api/inc main.cpp ../../api/lib/libfmodevent.so -Wl,-rpath ../../../api/lib - -run: - ./simple_event - -clean: - rm -f simple_event diff --git a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/simple_event/main.cpp b/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/simple_event/main.cpp deleted file mode 100644 index b2bca0ccab..0000000000 --- a/CocosDenshion/third_party/fmod/fmoddesignerapi/examples/simple_event/main.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/*=============================================================================================== - SimpleEvent Example - Copyright (c), Firelight Technologies Pty, Ltd 2004-2011. - - Demonstrates basic usage of FMOD's data-driven event library (fmod_event.dll) -===============================================================================================*/ -#include "../../../examples/common/wincompat.h" - -#include "../../api/inc/fmod_event.hpp" -#include "../../../api/inc/fmod_errors.h" - -void ERRCHECK(FMOD_RESULT result) -{ - if (result != FMOD_OK) - { - printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result)); - exit(-1); - } -} - -int main(int argc, char *argv[]) -{ - FMOD::EventSystem *eventsystem; - FMOD::Event *event; - FMOD_RESULT result; - int key; - - printf("======================================================================\n"); - printf("Simple Event Example. Copyright (c) Firelight Technologies 2004-2011.\n"); - printf("======================================================================\n"); - printf("This example simply plays an event created with the FMOD Designer tool.\n"); - printf("======================================================================\n\n"); - - ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem)); - ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL)); - ERRCHECK(result = eventsystem->setMediaPath("../media/")); - ERRCHECK(result = eventsystem->load("examples.fev", 0, 0)); - ERRCHECK(result = eventsystem->getEvent("examples/FeatureDemonstration/Basics/SimpleEvent", FMOD_EVENT_DEFAULT, &event)); - - printf("======================================================================\n"); - printf("Press SPACE to play the event.\n"); - printf("Press ESC to quit\n"); - printf("======================================================================\n"); - - key = 0; - do - { - if (_kbhit()) - { - key = _getch(); - - if (key == ' ') - { - ERRCHECK(result = event->start()); - } - } - - ERRCHECK(result = eventsystem->update()); - Sleep(15); - - FMOD_EVENT_STATE state; - ERRCHECK(result = event->getState(&state)); - printf("Event is %s \r", (state & FMOD_EVENT_STATE_PLAYING) ? "playing" : "stopped"); - fflush(stdout); - - } while (key != 27); - - ERRCHECK(result = eventsystem->release()); - return 0; -} diff --git a/CocosDenshion/third_party/fmod/tools/fsbanklib/Makefile b/CocosDenshion/third_party/fmod/tools/fsbanklib/Makefile deleted file mode 100644 index 513c0e5c14..0000000000 --- a/CocosDenshion/third_party/fmod/tools/fsbanklib/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -all: example.cpp - g++ -O3 -o example example.cpp libfsbankex.a ../../api/lib/libfmodex.so - -clean: - rm -f example diff --git a/CocosDenshion/third_party/fmod/tools/fsbanklib/example.REMOVED.git-id b/CocosDenshion/third_party/fmod/tools/fsbanklib/example.REMOVED.git-id deleted file mode 100644 index e7c10d0c9a..0000000000 --- a/CocosDenshion/third_party/fmod/tools/fsbanklib/example.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -fdfc1c2e53360fcdf023e23a6974107ef8f22be0 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/tools/fsbanklib/example.cpp b/CocosDenshion/third_party/fmod/tools/fsbanklib/example.cpp deleted file mode 100644 index 5035cbdafa..0000000000 --- a/CocosDenshion/third_party/fmod/tools/fsbanklib/example.cpp +++ /dev/null @@ -1,369 +0,0 @@ -/* - This example builds the FSB's required for the Designer API examples. -*/ - -#include "fsbank.h" -#include -#include -#include - -const char *gTutorialFileNames[] = -{ - "../../fmoddesignerapi/examples/media/2011/2011_cycle_off.ogg", - "../../fmoddesignerapi/examples/media/2011/2011_cycle_on.ogg", - "../../fmoddesignerapi/examples/media/2011/2011_cycle_sustain01.ogg", - "../../fmoddesignerapi/examples/media/2011/2011_cycle_sustain02.ogg", - "../../fmoddesignerapi/examples/media/2011/2011_cycle_sustain_spawn_grain.ogg", - "../../fmoddesignerapi/examples/media/2011/beep01.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call01.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call02.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call03.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call04.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call05.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call06.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call07.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call08.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call09.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call10.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call11.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call12.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call13.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call14.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call15.ogg", - "../../fmoddesignerapi/examples/media/2011/bird_call16.ogg", - "../../fmoddesignerapi/examples/media/2011/bubble_burst01.ogg", - "../../fmoddesignerapi/examples/media/2011/bubble_burst02.ogg", - "../../fmoddesignerapi/examples/media/2011/bubble_burst03.ogg", - "../../fmoddesignerapi/examples/media/2011/bubble_burst04.ogg", - "../../fmoddesignerapi/examples/media/2011/bubble_burst05.ogg", - "../../fmoddesignerapi/examples/media/2011/bubble_burst06.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_close01.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_close02.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_close03.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_close04.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_close05.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_close06.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_small01.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_small02.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_small03.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_small04.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_small05.ogg", - "../../fmoddesignerapi/examples/media/2011/bubbles_small06.ogg", - "../../fmoddesignerapi/examples/media/2011/cricket_single_cycle.ogg", - "../../fmoddesignerapi/examples/media/2011/crickets.ogg", - "../../fmoddesignerapi/examples/media/2011/decending tone.ogg", - "../../fmoddesignerapi/examples/media/2011/detonation01.ogg", - "../../fmoddesignerapi/examples/media/2011/detonation02.ogg", - "../../fmoddesignerapi/examples/media/2011/detonation03.ogg", - "../../fmoddesignerapi/examples/media/2011/detonation04.ogg", - "../../fmoddesignerapi/examples/media/2011/detonation05.ogg", - "../../fmoddesignerapi/examples/media/2011/detonation06.ogg", - "../../fmoddesignerapi/examples/media/2011/earth_debris01.ogg", - "../../fmoddesignerapi/examples/media/2011/earth_debris02.ogg", - "../../fmoddesignerapi/examples/media/2011/earth_debris03.ogg", - "../../fmoddesignerapi/examples/media/2011/earth_debris04.ogg", - "../../fmoddesignerapi/examples/media/2011/earth_debris05.ogg", - "../../fmoddesignerapi/examples/media/2011/earth_debris06.ogg", - "../../fmoddesignerapi/examples/media/2011/earth_debris07.ogg", - "../../fmoddesignerapi/examples/media/2011/earth_debris08.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_long01.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_long02.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_long03.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_long04.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_long05.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_long06.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_short01.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_short02.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_short03.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_short04.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_short05.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_short06.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_small01.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_small02.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_small03.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_small04.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_small05.ogg", - "../../fmoddesignerapi/examples/media/2011/flame_burst_small06.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_concrete_01.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_concrete_02.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_concrete_03.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_concrete_04.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_concrete_05.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_concrete_06.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_concrete_07.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_concrete_08.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_leaves01.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_leaves02.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_leaves03.ogg", - "../../fmoddesignerapi/examples/media/2011/footsteps_leaves04.ogg", - "../../fmoddesignerapi/examples/media/2011/frog01.ogg", - "../../fmoddesignerapi/examples/media/2011/frog02.ogg", - "../../fmoddesignerapi/examples/media/2011/frog03.ogg", - "../../fmoddesignerapi/examples/media/2011/frog04.ogg", - "../../fmoddesignerapi/examples/media/2011/glass_shard_smash01.ogg", - "../../fmoddesignerapi/examples/media/2011/glass_shard_smash02.ogg", - "../../fmoddesignerapi/examples/media/2011/glass_shard_smash03.ogg", - "../../fmoddesignerapi/examples/media/2011/glass_shard_smash04.ogg", - "../../fmoddesignerapi/examples/media/2011/glass_shard_smash05.ogg", - "../../fmoddesignerapi/examples/media/2011/glass_shard_smash06.ogg", - "../../fmoddesignerapi/examples/media/2011/glass_shard_smash07.ogg", - "../../fmoddesignerapi/examples/media/2011/glass_shard_smash08.ogg", - "../../fmoddesignerapi/examples/media/2011/metal_fragment01.ogg", - "../../fmoddesignerapi/examples/media/2011/metal_fragment02.ogg", - "../../fmoddesignerapi/examples/media/2011/metal_fragment03.ogg", - "../../fmoddesignerapi/examples/media/2011/metal_fragment04.ogg", - "../../fmoddesignerapi/examples/media/2011/metal_fragment05.ogg", - "../../fmoddesignerapi/examples/media/2011/metal_fragment06.ogg", - "../../fmoddesignerapi/examples/media/2011/metal_fragment07.ogg", - "../../fmoddesignerapi/examples/media/2011/metal_fragment08.ogg", - "../../fmoddesignerapi/examples/media/2011/rifle_blast01.ogg", - "../../fmoddesignerapi/examples/media/2011/rifle_blast02.ogg", - "../../fmoddesignerapi/examples/media/2011/rifle_blast03.ogg", - "../../fmoddesignerapi/examples/media/2011/shotgun_blast01.ogg", - "../../fmoddesignerapi/examples/media/2011/shotgun_blast02.ogg", - "../../fmoddesignerapi/examples/media/2011/shotgun_blast03.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_large01.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_large02.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_large03.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_large04.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_large05.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_medium01.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_medium02.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_medium03.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_medium04.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_medium05.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_medium06.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_medium07.ogg", - "../../fmoddesignerapi/examples/media/2011/splash_medium08.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/bow_still01.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/bow_still02.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/bow_wake01.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/bow_wake02.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/bow_wake03.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/buzz01.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/buzz02.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/cables_creak01.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/cables_creak02.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/cables_creak03.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/cables_creak04.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/cables_creak05.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/cables_creak06.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/cables_creak07.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/cables_creak08.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/clock_loop.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_component01.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_component02.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_component03.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_component04.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_component05.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_component06.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_component07.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_component08.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_component09.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_component10.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/engine_load.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/hatch_door_open_close01.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/hatch_door_open_close02.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/hatch_door_open_close03.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/hatch_door_open_close04.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/hatch_door_open_close05.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact01.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact02.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact03.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact04.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact05.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact06.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact07.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact08.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact_heavy01.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact_heavy02.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact_heavy03.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact_heavy04.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact_heavy05.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact_heavy06.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/impact_heavy07.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_01.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_02.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_03.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_04.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_05.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_06.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_07.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_08.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_09.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_10.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_11.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_creak_light_12.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_screech01.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_screech02.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_screech03.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/metal_screech04.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_a.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_b.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_c.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_comma.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_d.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_e.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_f.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_g.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_h.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_i.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_j.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/morse_code_k.ogg", - "../../fmoddesignerapi/examples/media/2011/submarine/sonar.ogg", - "../../fmoddesignerapi/examples/media/2011/waves_submerged_01.ogg", - "../../fmoddesignerapi/examples/media/2011/waves_submerged_02.ogg", - "../../fmoddesignerapi/examples/media/2011/waves_submerged_03.ogg", - "../../fmoddesignerapi/examples/media/2011/waves_submerged_04.ogg", - "../../fmoddesignerapi/examples/media/2011/waves_submerged_05.ogg", - "../../fmoddesignerapi/examples/media/2011/waves_submerged_06.ogg", - "../../fmoddesignerapi/examples/media/2011/waves_submerged_07.ogg", - "../../fmoddesignerapi/examples/media/2011/waves_submerged_08.ogg", - "../../fmoddesignerapi/examples/media/ambient_one_four.ogg", - "../../fmoddesignerapi/examples/media/ambient_one_loop.ogg", - "../../fmoddesignerapi/examples/media/ambient_three.ogg", - "../../fmoddesignerapi/examples/media/ambient_two.ogg", - "../../fmoddesignerapi/examples/media/car/idle.ogg", - "../../fmoddesignerapi/examples/media/car/offhigh.ogg", - "../../fmoddesignerapi/examples/media/car/offlow.ogg", - "../../fmoddesignerapi/examples/media/car/offmid.ogg", - "../../fmoddesignerapi/examples/media/car/onhigh.ogg", - "../../fmoddesignerapi/examples/media/car/onlow.ogg", - "../../fmoddesignerapi/examples/media/car/onmid.ogg", - "../../fmoddesignerapi/examples/media/drum-loop.ogg", - "../../fmoddesignerapi/examples/media/interactive_music_1.ogg", - "../../fmoddesignerapi/examples/media/interactive_music_2.ogg", - "../../fmoddesignerapi/examples/media/interactive_music_3.ogg", - "../../fmoddesignerapi/examples/media/max_play_behavior_four.ogg", - "../../fmoddesignerapi/examples/media/max_play_behavior_one.ogg", - "../../fmoddesignerapi/examples/media/max_play_behavior_three.ogg", - "../../fmoddesignerapi/examples/media/max_play_behavior_two.ogg", - "../../fmoddesignerapi/examples/media/music/excited.ogg", - "../../fmoddesignerapi/examples/media/music/flsh-idle-01.ogg", - "../../fmoddesignerapi/examples/media/music/flsh-idle-02.ogg", - "../../fmoddesignerapi/examples/media/music/flsh-idle-03.ogg", - "../../fmoddesignerapi/examples/media/music/flsh-idle-04.ogg", - "../../fmoddesignerapi/examples/media/music/flsh-idle-05.ogg", - "../../fmoddesignerapi/examples/media/music/layer-bass-a.ogg", - "../../fmoddesignerapi/examples/media/music/layer-drums-a.ogg", - "../../fmoddesignerapi/examples/media/music/layer-drums-b.ogg", - "../../fmoddesignerapi/examples/media/music/layer-drums-c.ogg", - "../../fmoddesignerapi/examples/media/music/layer-drums-d.ogg", - "../../fmoddesignerapi/examples/media/music/layer-guitar-a.ogg", - "../../fmoddesignerapi/examples/media/music/layer-guitar-alt-a.ogg", - "../../fmoddesignerapi/examples/media/music/layer-guitar-alt-b.ogg", - "../../fmoddesignerapi/examples/media/music/layer-guitar-alt-c.ogg", - "../../fmoddesignerapi/examples/media/music/layer-guitar-alt-d.ogg", - "../../fmoddesignerapi/examples/media/music/layer-guitar-b.ogg", - "../../fmoddesignerapi/examples/media/music/layer-guitar-c.ogg", - "../../fmoddesignerapi/examples/media/music/layer-guitar-d.ogg", - "../../fmoddesignerapi/examples/media/music/relaxed.ogg", - "../../fmoddesignerapi/examples/media/music/state-idle-01.ogg", - "../../fmoddesignerapi/examples/media/music/state-idle-02.ogg", - "../../fmoddesignerapi/examples/media/music/state-idle-03.ogg", - "../../fmoddesignerapi/examples/media/music/state-idle-fadeout.ogg", - "../../fmoddesignerapi/examples/media/music/state-race-01a.ogg", - "../../fmoddesignerapi/examples/media/music/state-race-01b.ogg", - "../../fmoddesignerapi/examples/media/music/state-race-02a.ogg", - "../../fmoddesignerapi/examples/media/music/state-race-02b.ogg", - "../../fmoddesignerapi/examples/media/music/state-race-finish.ogg", - "../../fmoddesignerapi/examples/media/music/state-race-start.ogg", - "../../fmoddesignerapi/examples/media/note.ogg", - "../../fmoddesignerapi/examples/media/onefootstep.wav", - "../../fmoddesignerapi/examples/media/sequence-end.ogg", - "../../fmoddesignerapi/examples/media/sequence-four.ogg", - "../../fmoddesignerapi/examples/media/sequence-one.ogg", - "../../fmoddesignerapi/examples/media/sequence-start.ogg", - "../../fmoddesignerapi/examples/media/sequence-three.ogg", - "../../fmoddesignerapi/examples/media/sequence-two.ogg", -}; - -const char *gStreamingFileNames[] = -{ - "../../fmoddesignerapi/examples/media/interactive_music_6channel.ogg" -}; - -const unsigned int gNumTutorialFileNames = sizeof(gTutorialFileNames) / sizeof(char *); -const unsigned int gNumStreamingFileNames = sizeof(gStreamingFileNames) / sizeof(char *); - -#define CHECK_RESULT(_x) { FSBANK_RESULT _result = (_x); if (_result != FSBANK_OK) { return _result; } } - -FSBANK_RESULT printErrors(const FSBANK_SUBSOUND *subSounds) -{ - FSBANK_RESULT result = FSBANK_OK; - const FSBANK_PROGRESSITEM *item = NULL; - - printf("Build Error!\n"); - - do - { - result = FSBank_FetchNextProgressItem(&item); - CHECK_RESULT(result); - - if (item) - { - if (item->state == FSBANK_STATE_FAILED) - { - const FSBANK_STATEDATA_FAILED *failedStateData = (const FSBANK_STATEDATA_FAILED *)item->stateData; - printf("Error: %s -- \"%s\"\n", failedStateData->errorString, item->subSoundIndex < 0 ? "System" : subSounds[item->subSoundIndex].fileNames[0]); - } - - result = FSBank_ReleaseProgressItem(item); - CHECK_RESULT(result); - } - } while (item != NULL); - - return FSBANK_OK; -} - - -FSBANK_RESULT buildBank(const char **fileNames, unsigned int numFileNames, const char *outputFileName) -{ - FSBANK_RESULT result = FSBANK_OK; - FSBANK_SUBSOUND *subSounds = (FSBANK_SUBSOUND *)alloca(numFileNames * sizeof(FSBANK_SUBSOUND)); - - for (unsigned int i = 0; i < numFileNames; i++) - { - memset(&subSounds[i], 0, sizeof(FSBANK_SUBSOUND)); - - subSounds[i].fileNames = &fileNames[i]; - subSounds[i].numFileNames = 1; - subSounds[i].modeFlags = FSBANK_MODE_DEFAULT; - subSounds[i].overrideFlags = FSBANK_BUILD_DEFAULT; - subSounds[i].overrideQuality = 0; - subSounds[i].desiredSampleRate = 0; - } - - printf("Building %s...\n", outputFileName); - - result = FSBank_Build(subSounds, numFileNames, FSBANK_FORMAT_MP3, FSBANK_BUILD_DEFAULT | FSBANK_BUILD_DONTLOOP, 0, NULL, outputFileName); - if (result != FSBANK_OK) - { - printErrors(subSounds); - return result; - } - - printf("done.\n"); - return FSBANK_OK; -} - - -int main(void) -{ - FSBANK_RESULT result = FSBANK_OK; - - result = FSBank_Init(FSBANK_FSBVERSION_FSB4, FSBANK_INIT_NORMAL | FSBANK_INIT_GENERATEPROGRESSITEMS, 2, NULL); - CHECK_RESULT(result); - - result = buildBank(gTutorialFileNames, gNumTutorialFileNames, "tutorial_bank.fsb"); - CHECK_RESULT(result); - - result = buildBank(gStreamingFileNames, gNumStreamingFileNames, "streaming_bank.fsb"); - CHECK_RESULT(result); - - result = FSBank_Release(); - CHECK_RESULT(result); - - return FSBANK_OK; -} - diff --git a/CocosDenshion/third_party/fmod/tools/fsbanklib/fsbank.h b/CocosDenshion/third_party/fmod/tools/fsbanklib/fsbank.h deleted file mode 100644 index d3989c51e1..0000000000 --- a/CocosDenshion/third_party/fmod/tools/fsbanklib/fsbank.h +++ /dev/null @@ -1,258 +0,0 @@ -#ifndef _FSBANK_H -#define _FSBANK_H - -#if defined(_WIN32) - #define FB_API __declspec(dllexport) _stdcall -#else - #define FB_API -#endif - -typedef unsigned int FSBANK_INITFLAGS; - -#define FSBANK_INIT_NORMAL 0x00000000 /* Initialize normally. */ -#define FSBANK_INIT_IGNOREERRORS 0x00000001 /* Ignore individual subsound build errors, continue building for as long as possible. */ -#define FSBANK_INIT_WARNINGSASERRORS 0x00000002 /* Treat any warnings issued as errors. */ -#define FSBANK_INIT_CREATEINCLUDEHEADER 0x00000004 /* Create C header files with #defines defining indicies for each member of the FSB. */ -#define FSBANK_INIT_DONTLOADCACHEFILES 0x00000008 /* Ignore existing cache files. */ -#define FSBANK_INIT_GENERATEPROGRESSITEMS 0x00000010 /* Generate status items that can be queried by another thread to monitor the build progress and give detailed error messages. */ - - -typedef unsigned int FSBANK_BUILDFLAGS; - -#define FSBANK_BUILD_DEFAULT 0x00000000 /* Build with default settings. */ -#define FSBANK_BUILD_DISABLESYNCPOINTS 0x00000001 /* Disable the storing of syncpoints in the output */ -#define FSBANK_BUILD_DONTLOOP 0x00000002 /* Disable perfect loop encoding and sound stretching. Removes chirps from the start of oneshot MP2, MP3 and IMAADPCM sounds. */ -#define FSBANK_BUILD_FILTERHIGHFREQ 0x00000004 /* XMA only. Enable high frequency filtering. */ -#define FSBANK_BUILD_DISABLESEEKING 0x00000008 /* XMA only. Disable seek tables to save memory. */ -#define FSBANK_BUILD_OPTIMIZESAMPLERATE 0x00000010 /* Attempt to optimize the sample rate down. Ignored if format is MP2, MP3 or CELT or if FSB4 basic headers flag is used. */ -#define FSBANK_BUILD_DONTINTERLEAVE 0x00000020 /* VAG and GCADPCM only. Don't interleave the data as LRLRLRLR... instead use LLLLRRRR type encoding. Speeds up loading for samples (not streams, streams must remained interleaved), allows FMOD_OPENMEMORY_POINT. */ -#define FSBANK_BUILD_FSB4_USEBASICHEADERS 0x00000040 /* FSB4 format only. Generate FSBs with small sample header data. They only contain basic information such as sample length, and everything else has its attributes inherited from the first sample (for example the default frequency). */ - -/* Build flag mask that specifies which settings can be overriden per subsound. */ -#define FSBANK_BUILD_OVERRIDE_MASK (FSBANK_BUILD_DISABLESYNCPOINTS | FSBANK_BUILD_DONTLOOP | FSBANK_BUILD_FILTERHIGHFREQ | FSBANK_BUILD_DISABLESEEKING | FSBANK_BUILD_OPTIMIZESAMPLERATE | FSBANK_BUILD_DONTINTERLEAVE) -/* Build flag mask that specifies which settings (when changed) invalidate a cache file. */ -#define FSBANK_BUILD_CACHE_VALIDATION_MASK (FSBANK_BUILD_DONTLOOP | FSBANK_BUILD_FILTERHIGHFREQ | FSBANK_BUILD_OPTIMIZESAMPLERATE | FSBANK_BUILD_DONTINTERLEAVE) - - -typedef unsigned int FSBANK_MODEFLAGS; - -#define FSBANK_MODE_DEFAULT 0x00000000 /* Sample has default mode settings. */ -#define FSBANK_MODE_FSB4_ALLMONO 0x00000400 /* Sample is a collection of mono channels. */ -#define FSBANK_MODE_FSB4_ALLSTEREO 0x00000800 /* Sample is a collection of stereo channel pairs. */ -#define FSBANK_MODE_FSB4_PROTOOLS 0x00010000 /* Sample is 6ch and uses L C R LS RS LFE standard. */ - - -typedef enum FSBANK_RESULT -{ - FSBANK_OK, /* No errors. */ - FSBANK_ERR_CACHE_CHUNKNOTFOUND, /* An expected chunk is missing from the cache, perhaps try deleting cache files. */ - FSBANK_ERR_CANCELLED, /* The build process was cancelled during compilation by the user. */ - FSBANK_ERR_CANNOT_CONTINUE, /* The build process cannot continue due to previously ignored errors. */ - FSBANK_ERR_ENCODER, /* Encoder for chosen format has encountered an unexpected error. */ - FSBANK_ERR_ENCODER_INIT, /* Encoder initialization failed. */ - FSBANK_ERR_ENCODER_NOTSUPPORTED, /* Encoder for chosen format is not supported on this platform. */ - FSBANK_ERR_FILE_OS, /* An operating system based file error was encountered. */ - FSBANK_ERR_FILE_NOTFOUND, /* A specified file could not be found. */ - FSBANK_ERR_FMOD, /* Internal error from FMOD sub-system. */ - FSBANK_ERR_INITIALIZED, /* Already initialized. */ - FSBANK_ERR_INVALID_FORMAT, /* The format of the source file is invalid, see output for details. */ - FSBANK_ERR_INVALID_PARAM, /* An invalid parameter has been passed to this function. */ - FSBANK_ERR_MEMORY, /* Ran out of memory. */ - FSBANK_ERR_UNINITIALIZED, /* Not initialized yet. */ - FSBANK_WARN_CANNOTLOOP, /* Source file is too short for seamless looping. Looping disabled. */ - FSBANK_WARN_IGNORED_OPTIMIZESAMPLERATE, /* FSBANK_BUILD_OPTIMIZESAMPLERATE flag ignored: MP2, MP3 and CELT formats, and the USEBASICHEADERS flag make this option irrelevant. */ - FSBANK_WARN_IGNORED_FILTERHIGHFREQ, /* FSBANK_BUILD_FILTERHIGHFREQ flag ignored: feature only supported by XMA format. */ - FSBANK_WARN_IGNORED_DISABLESEEKING, /* FSBANK_BUILD_DISABLESEEKING flag ignored: feature only supported by XMA format. */ - FSBANK_WARN_IGNORED_DONTINTERLEAVE, /* FSBANK_BUILD_DONTINTERLEAVE flag ignored: feature only supported by VAG and GCADPCM formats. */ -} FSBANK_RESULT; - - -typedef enum FSBANK_FORMAT -{ - FSBANK_FORMAT_PCM, /* PCM (1:1) All platforms. */ - FSBANK_FORMAT_PCM_BIGENDIAN, /* PCM Big Endian (1:1) Xbox360 and PS3 only. */ - FSBANK_FORMAT_IMAADPCM, /* IMA ADPCM (3.5:1) All platforms. */ - FSBANK_FORMAT_MP2, /* MPEG Layer 2 (CBR) All platforms except PS3. Depends on toolame. */ - FSBANK_FORMAT_MP3, /* MPEG Layer 3 (CBR) All platforms. Depends on libmp3lame. */ - FSBANK_FORMAT_XMA, /* XMA (VBR) Xbox360 only (hardware). Depends on xmaencoder. */ - FSBANK_FORMAT_GCADPCM, /* GCADPCM (3.5:1) Wii Only (hardware). Depends on dsptool. */ - FSBANK_FORMAT_VAG, /* VAG (3.5:1) PSP and PS2 only (hardware). Depends on encvag. */ - FSBANK_FORMAT_HEVAG, /* High Efficiency VAG (3.5:1) NGP only (hardware). Depends on vagconv2. */ - FSBANK_FORMAT_CELT, /* Constrained Energy Lapped Transform (CBR) All platforms. Depends on celt_encoder. */ - - FSBANK_FORMAT_MAX /* Upper bound for this enumeration, for use with validation */ -} FSBANK_FORMAT; - - -typedef enum FSBANK_FSBVERSION -{ - FSBANK_FSBVERSION_FSB4, /* Produce FSB version 4 files. */ - - FSBANK_FSBVERSION_MAX /* Upper bound for this enumeration, for use with validation */ -} FSBANK_FSBVERSION; - - -typedef enum FSBANK_STATE -{ - FSBANK_STATE_DECODING, /* Decode a file to usable raw sample data. */ - FSBANK_STATE_ANALYSING, /* Scan sound data for details (such as optimized sample rate). */ - FSBANK_STATE_PREPROCESSING, /* Prepares sound data for encoder. */ - FSBANK_STATE_ENCODING, /* Pass the sample data to the chosen encoder. */ - FSBANK_STATE_WRITING, /* Write encoded data into an FSB. */ - FSBANK_STATE_FINISHED, /* Process complete. */ - FSBANK_STATE_FAILED, /* An error has occured, check data (as FSBANK_STATEDATA_FAILED) for details. */ - FSBANK_STATE_WARNING, /* A warning has been issued, check data (as FSBANK_STATEDATA_WARNING) for details. */ -} FSBANK_STATE; - - -typedef struct FSBANK_SUBSOUND -{ - const char* const *fileNames; /* List of file names used to produce an interleaved sound. */ - unsigned int numFileNames; /* Number of files in above file name list, up to 16. */ - FSBANK_MODEFLAGS modeFlags; /* Flags that affect the runtime mode for this subsound. */ - FSBANK_BUILDFLAGS overrideFlags; /* Flags that will reverse the equivalent flags passed to FSBank_Build. */ - unsigned int overrideQuality; /* Override the quality setting passed to FSBank_Build. */ - float desiredSampleRate; /* Resample to this sample rate (ignores optimize sample rate setting), up to 192000Hz. */ - float percentOptimizedRate; /* If using FSBANK_BUILD_OPTIMIZESAMPLERATE, this is the percentage of that rate to be used, up to 100.0%. */ -} FSBANK_SUBSOUND; - - -typedef struct FSBANK_PROGRESSITEM -{ - int subSoundIndex; /* Index into the subsound list passed to FSBank_Build that this update relates to (-1 indicates no specific subsound). */ - int threadIndex; /* Which thread index is serving this update (-1 indicates FSBank_Build / main thread). */ - FSBANK_STATE state; /* Progress through the encoding process. */ - const void *stateData; /* Cast to state specific data structure for extra information. */ -} FSBANK_PROGRESSITEM; - - -typedef struct FSBANK_STATEDATA_FAILED -{ - FSBANK_RESULT errorCode; /* Error result code. */ - char errorString[256]; /* Description for error code. */ -} FSBANK_STATEDATA_FAILED; - - -typedef struct FSBANK_STATEDATA_WARNING -{ - FSBANK_RESULT warnCode; /* Warning result code. */ - char warningString[256]; /* Description for warning code. */ -} FSBANK_STATEDATA_WARNING; - - -#ifdef __cplusplus -extern "C" { -#endif - -/* -[API] -[ - [DESCRIPTION] - Initialize the FSBank system. - - [PARAMETERS] - 'version' FSB version, currently only FSBANK_FSBVERSION_FSB4 is supported. - 'flags' Initialization flags which control how the system behaves. - 'numSimultaneousJobs' The maximum number of threads to create for parallel encoding. Set this - to your number of CPU 'cores' for best performance. - 'cacheDirectory' Optional location to store the temporary cache files, default is a - directory off the current working directory. -] -*/ -FSBANK_RESULT FB_API FSBank_Init(FSBANK_FSBVERSION version, FSBANK_INITFLAGS flags, unsigned int numSimultaneousJobs, const char *cacheDirectory); - - -/* -[API] -[ - [DESCRIPTION] - Release the FSBank system, clean up used resources. - - Note: All progress items retrieved with FSBank_FetchNextProgressItem will be released by this function. -] -*/ -FSBANK_RESULT FB_API FSBank_Release(); - - -/* -[API] -[ - [DESCRIPTION] - Begin the building process for the provided subsound descriptions, function will block until - complete. - - [PARAMETERS] - 'subSounds' An array of subsound descriptions each defining one subsound for the - final FSB. - 'numSubSounds' The number of elements in the 'subSounds' array. - 'encodeFormat' The format to be used for encoding the FSB. - 'buildFlags' Building flags which control how the sample data is encoded. - 'quality' Controls the quality level after compression from 1 (high compression - / low quality) to 100 (high quality / low compression), use 0 for - default quality. MPEG, CELT and XMA only. MPEG / CELT bitrate based on - quality * 3.2. - 'encryptKey' Optional string 'key' used to encrypt the FSB, same key is required at - runtime for decryption. - 'outputFileName' Name (and path) of the FSB to produce. -] -*/ -FSBANK_RESULT FB_API FSBank_Build(const FSBANK_SUBSOUND *subSounds, unsigned int numSubSounds, FSBANK_FORMAT encodeFormat, FSBANK_BUILDFLAGS buildFlags, unsigned int quality, const char *encryptKey, const char *outputFileName); - - -/* -[API] -[ - [DESCRIPTION] - Halt the build in progress, must be called from a different thread to FSBank_Build. -] -*/ -FSBANK_RESULT FB_API FSBank_BuildCancel(); - - -/* -[API] -[ - [DESCRIPTION] - Fetch build progress items that describe the current state of the build. Can be called while - the build is in progress to get realtime updates or after the build for a report. Call - FSBank_ReleaseProgressItem to free allocated memory. - - [PARAMETERS] - 'progressItem' One status update about the progress of a particular subsound. -] -*/ -FSBANK_RESULT FB_API FSBank_FetchNextProgressItem(const FSBANK_PROGRESSITEM **progressItem); - - -/* -[API] -[ - [DESCRIPTION] - Release memory associated with a progress item. - - [PARAMETERS] - 'progressItem' One status update about the progress of a particular subsound. -] -*/ -FSBANK_RESULT FB_API FSBank_ReleaseProgressItem(const FSBANK_PROGRESSITEM *progressItem); - - -/* -[API] -[ - [DESCRIPTION] - Query the current and maximum memory usage of the FSBank system. - FSBank_Build. - - [PARAMETERS] - 'currentAllocated' Address of a variable that receives the currently allocated memory at time of call. Optional. Specify 0 or NULL to ignore. - 'maximumAllocated' Address of a variable that receives the maximum allocated memory since FSBank_Init. Optional. Specify 0 or NULL to ignore. -] -*/ -FSBANK_RESULT FB_API FSBank_MemoryGetStats(unsigned int *currentAllocated, unsigned int *maximumAllocated); - -#ifdef __cplusplus -} -#endif - -#endif // _FSBANK_H diff --git a/CocosDenshion/third_party/fmod/tools/fsbanklib/libfsbankex.a.REMOVED.git-id b/CocosDenshion/third_party/fmod/tools/fsbanklib/libfsbankex.a.REMOVED.git-id deleted file mode 100644 index 5e3175033f..0000000000 --- a/CocosDenshion/third_party/fmod/tools/fsbanklib/libfsbankex.a.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -7c4b9fbeb5e4a11f0fe0b0086afeb806cd5cdb39 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/tools/fsbanklib/libmp3lame.so.REMOVED.git-id b/CocosDenshion/third_party/fmod/tools/fsbanklib/libmp3lame.so.REMOVED.git-id deleted file mode 100644 index fa8233dc21..0000000000 --- a/CocosDenshion/third_party/fmod/tools/fsbanklib/libmp3lame.so.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -7e13b14baadf985f33cab88cadb071baf398bb01 \ No newline at end of file diff --git a/CocosDenshion/third_party/fmod/tools/fsbanklib/twolame.so.REMOVED.git-id b/CocosDenshion/third_party/fmod/tools/fsbanklib/twolame.so.REMOVED.git-id deleted file mode 100644 index d2b6c382a7..0000000000 --- a/CocosDenshion/third_party/fmod/tools/fsbanklib/twolame.so.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -977578711cad3b8aa90c35dc191a7e38e4929eda \ No newline at end of file