annotate lib/OpenAL/xram.h @ 2397:eff78dab2142

Fixing GameUI_WritePointedObjectStatusString conditions
author Grumpy7
date Thu, 10 Jul 2014 00:58:45 +0200
parents 992d2e6f907d
children
rev   line source
2134
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
1 #include <al.h>
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
2
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
3 // X-RAM Function pointer definitions
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
4 typedef ALboolean (__cdecl *EAXSetBufferMode)(ALsizei n, ALuint *buffers, ALint value);
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
5 typedef ALenum (__cdecl *EAXGetBufferMode)(ALuint buffer, ALint *value);
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
6
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
7 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
8 // Query for X-RAM extension
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
9 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
10 // if (alIsExtensionPresent("EAX-RAM") == AL_TRUE)
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
11 // X-RAM Extension found
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
12 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
13 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
14
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
15
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
16 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
17 // X-RAM enum names
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
18 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
19 // "AL_EAX_RAM_SIZE"
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
20 // "AL_EAX_RAM_FREE"
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
21 // "AL_STORAGE_AUTOMATIC"
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
22 // "AL_STORAGE_HARDWARE"
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
23 // "AL_STORAGE_ACCESSIBLE"
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
24 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
25 // Query enum values using alGetEnumValue, for example
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
26 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
27 // long lRamSizeEnum = alGetEnumValue("AL_EAX_RAM_SIZE")
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
28 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
29 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
30
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
31
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
32 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
33 // Query total amount of X-RAM
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
34 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
35 // long lTotalSize = alGetInteger(alGetEnumValue("AL_EAX_RAM_SIZE")
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
36 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
37 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
38
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
39
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
40 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
41 // Query free X-RAM available
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
42 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
43 // long lFreeSize = alGetInteger(alGetEnumValue("AL_EAX_RAM_FREE")
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
44 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
45 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
46
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
47
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
48 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
49 // Query X-RAM Function pointers
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
50 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
51 // Use typedefs defined above to get the X-RAM function pointers using
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
52 // alGetProcAddress
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
53 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
54 // EAXSetBufferMode eaxSetBufferMode;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
55 // EAXGetBufferMode eaxGetBufferMode;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
56 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
57 // eaxSetBufferMode = (EAXSetBufferMode)alGetProcAddress("EAXSetBufferMode");
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
58 // eaxGetBufferMode = (EAXGetBufferMode)alGetProcAddress("EAXGetBufferMode");
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
59 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
60 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
61
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
62
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
63 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
64 // Force an Open AL Buffer into X-RAM (good for non-streaming buffers)
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
65 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
66 // ALuint uiBuffer;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
67 // alGenBuffers(1, &uiBuffer);
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
68 // eaxSetBufferMode(1, &uiBuffer, alGetEnumValue("AL_STORAGE_HARDWARE"));
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
69 // alBufferData(...);
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
70 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
71 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
72
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
73
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
74 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
75 // Force an Open AL Buffer into 'accessible' (currently host) RAM (good for streaming buffers)
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
76 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
77 // ALuint uiBuffer;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
78 // alGenBuffers(1, &uiBuffer);
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
79 // eaxSetBufferMode(1, &uiBuffer, alGetEnumValue("AL_STORAGE_ACCESSIBLE"));
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
80 // alBufferData(...);
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
81 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
82 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
83
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
84
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
85 //////////////////////////////////////////////////////////////////////////////
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
86 // Put an Open AL Buffer into X-RAM if memory is available, otherwise use
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
87 // host RAM. This is the default mode.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
88 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
89 // ALuint uiBuffer;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
90 // alGenBuffers(1, &uiBuffer);
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
91 // eaxSetBufferMode(1, &uiBuffer, alGetEnumValue("AL_STORAGE_AUTOMATIC"));
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
92 // alBufferData(...);
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
93 //
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
94 //////////////////////////////////////////////////////////////////////////////