summary refs log tree commit diff stats
path: root/libs/CocosDenshion/CDConfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/CocosDenshion/CDConfig.h')
-rwxr-xr-xlibs/CocosDenshion/CDConfig.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/libs/CocosDenshion/CDConfig.h b/libs/CocosDenshion/CDConfig.h new file mode 100755 index 0000000..2bd8f76 --- /dev/null +++ b/libs/CocosDenshion/CDConfig.h
@@ -0,0 +1,60 @@
1/*
2 Copyright (c) 2010 Steve Oldmeadow
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
21
22 $Id$
23 */
24#define COCOSDENSHION_VERSION "Aphex.rc"
25
26
27/**
28 If enabled code useful for debugging such as parameter check assertions will be performed.
29 If you experience any problems you should enable this and test your code with a debug build.
30 */
31//#define CD_DEBUG 1
32
33/**
34 The total number of sounds/buffers that can be loaded assuming memory is sufficient
35 */
36//Number of buffers slots that will be initially created
37#define CD_BUFFERS_START 64
38//Number of buffers that will be added
39#define CD_BUFFERS_INCREMENT 16
40
41/**
42 If enabled, OpenAL code will use static buffers. When static buffers are used the audio
43 data is managed outside of OpenAL, this eliminates a memcpy operation which leads to
44 higher performance when loading sounds.
45
46 However, the downside is that when the audio data is freed you must
47 be certain that it is no longer being accessed otherwise your app will crash. Testing on OS 2.2.1
48 and 3.1.2 has shown that this may occur if a buffer is being used by a source with state = AL_PLAYING
49 when the buffer is deleted. If the data is freed too quickly after the source is stopped then
50 a crash will occur. The implemented workaround is that when static buffers are used the unloadBuffer code will wait for
51 any playing sources to finish playing before the associated buffer and data are deleted, however, this delay may negate any
52 performance gains that are achieved during loading.
53
54 Performance tests on a 1st gen iPod running OS 2.2.1 loading the CocosDenshionDemo sounds were ~0.14 seconds without
55 static buffers and ~0.12 seconds when using static buffers.
56
57 */
58//#define CD_USE_STATIC_BUFFERS 1
59
60