sdl2-bindings 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +83 -79
- data/LICENSE.txt +1 -1
- data/README.md +49 -49
- data/lib/sdl2.rb +170 -170
- data/lib/sdl2_audio.rb +219 -201
- data/lib/sdl2_blendmode.rb +69 -69
- data/lib/sdl2_clipboard.rb +51 -51
- data/lib/sdl2_cpuinfo.rb +106 -106
- data/lib/sdl2_error.rb +64 -64
- data/lib/sdl2_events.rb +530 -530
- data/lib/sdl2_filesystem.rb +48 -48
- data/lib/sdl2_framerate.rb +67 -67
- data/lib/sdl2_gamecontroller.rb +254 -254
- data/lib/sdl2_gesture.rb +55 -55
- data/lib/sdl2_gfxPrimitives.rb +222 -222
- data/lib/sdl2_haptic.rb +269 -269
- data/lib/sdl2_hints.rb +174 -174
- data/lib/sdl2_image.rb +185 -185
- data/lib/sdl2_imageFilter.rb +132 -132
- data/lib/sdl2_joystick.rb +230 -230
- data/lib/sdl2_keyboard.rb +99 -99
- data/lib/sdl2_keycode.rb +304 -304
- data/lib/sdl2_log.rb +115 -115
- data/lib/sdl2_main.rb +67 -67
- data/lib/sdl2_messagebox.rb +98 -98
- data/lib/sdl2_mixer.rb +317 -307
- data/lib/sdl2_mouse.rb +117 -117
- data/lib/sdl2_pixels.rb +224 -224
- data/lib/sdl2_platform.rb +45 -45
- data/lib/sdl2_power.rb +51 -51
- data/lib/sdl2_rect.rb +102 -102
- data/lib/sdl2_render.rb +290 -290
- data/lib/sdl2_rotozoom.rb +66 -66
- data/lib/sdl2_rwops.rb +208 -208
- data/lib/sdl2_scancode.rb +287 -287
- data/lib/sdl2_shape.rb +77 -77
- data/lib/sdl2_stdinc.rb +393 -393
- data/lib/sdl2_surface.rb +182 -182
- data/lib/sdl2_syswm.rb +154 -154
- data/lib/sdl2_timer.rb +62 -62
- data/lib/sdl2_touch.rb +73 -73
- data/lib/sdl2_ttf.rb +202 -190
- data/lib/sdl2_version.rb +62 -62
- data/lib/sdl2_video.rb +411 -411
- data/lib/sdl2_vulkan.rb +64 -64
- metadata +6 -6
data/lib/sdl2_mixer.rb
CHANGED
@@ -1,307 +1,317 @@
|
|
1
|
-
# Ruby-SDL2 : Yet another SDL2 wrapper for Ruby
|
2
|
-
#
|
3
|
-
# * https://github.com/vaiorabbit/sdl2-bindings
|
4
|
-
#
|
5
|
-
# [NOTICE] This is an automatically generated file.
|
6
|
-
|
7
|
-
require 'ffi'
|
8
|
-
|
9
|
-
module SDL2
|
10
|
-
extend FFI::Library
|
11
|
-
# Define/Macro
|
12
|
-
|
13
|
-
SDL_MIXER_MAJOR_VERSION = 2
|
14
|
-
SDL_MIXER_MINOR_VERSION = 0
|
15
|
-
SDL_MIXER_PATCHLEVEL = 4
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
:
|
65
|
-
:
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
:
|
75
|
-
:
|
76
|
-
:
|
77
|
-
:
|
78
|
-
:
|
79
|
-
:
|
80
|
-
:
|
81
|
-
:
|
82
|
-
:
|
83
|
-
:
|
84
|
-
:
|
85
|
-
:
|
86
|
-
:
|
87
|
-
:
|
88
|
-
:
|
89
|
-
:
|
90
|
-
:
|
91
|
-
:
|
92
|
-
:
|
93
|
-
:
|
94
|
-
:
|
95
|
-
:
|
96
|
-
:
|
97
|
-
:
|
98
|
-
:
|
99
|
-
:
|
100
|
-
:
|
101
|
-
:
|
102
|
-
:
|
103
|
-
:
|
104
|
-
:
|
105
|
-
:
|
106
|
-
:
|
107
|
-
:
|
108
|
-
:
|
109
|
-
:
|
110
|
-
:
|
111
|
-
:
|
112
|
-
:
|
113
|
-
:
|
114
|
-
:
|
115
|
-
:
|
116
|
-
:
|
117
|
-
:
|
118
|
-
:
|
119
|
-
:
|
120
|
-
:
|
121
|
-
:
|
122
|
-
:
|
123
|
-
:
|
124
|
-
:
|
125
|
-
:
|
126
|
-
:
|
127
|
-
:
|
128
|
-
:
|
129
|
-
:
|
130
|
-
:
|
131
|
-
:
|
132
|
-
:
|
133
|
-
:
|
134
|
-
:
|
135
|
-
:
|
136
|
-
:
|
137
|
-
:
|
138
|
-
:
|
139
|
-
:
|
140
|
-
|
141
|
-
|
142
|
-
:
|
143
|
-
:
|
144
|
-
:
|
145
|
-
:
|
146
|
-
:
|
147
|
-
:
|
148
|
-
:
|
149
|
-
:
|
150
|
-
|
151
|
-
|
152
|
-
:
|
153
|
-
:
|
154
|
-
:
|
155
|
-
:
|
156
|
-
:
|
157
|
-
:
|
158
|
-
:
|
159
|
-
:
|
160
|
-
:
|
161
|
-
:
|
162
|
-
:
|
163
|
-
:
|
164
|
-
:
|
165
|
-
:
|
166
|
-
:
|
167
|
-
:
|
168
|
-
:
|
169
|
-
:
|
170
|
-
:
|
171
|
-
:
|
172
|
-
:
|
173
|
-
:
|
174
|
-
:
|
175
|
-
:
|
176
|
-
:
|
177
|
-
:
|
178
|
-
:
|
179
|
-
:
|
180
|
-
:
|
181
|
-
:
|
182
|
-
:
|
183
|
-
:
|
184
|
-
:
|
185
|
-
:
|
186
|
-
:
|
187
|
-
:
|
188
|
-
:
|
189
|
-
:
|
190
|
-
:
|
191
|
-
:
|
192
|
-
:
|
193
|
-
:
|
194
|
-
:
|
195
|
-
:
|
196
|
-
:
|
197
|
-
:
|
198
|
-
:
|
199
|
-
:
|
200
|
-
:
|
201
|
-
:
|
202
|
-
:
|
203
|
-
:
|
204
|
-
:
|
205
|
-
:
|
206
|
-
:
|
207
|
-
:
|
208
|
-
:
|
209
|
-
:
|
210
|
-
:
|
211
|
-
:
|
212
|
-
:
|
213
|
-
:
|
214
|
-
:
|
215
|
-
:
|
216
|
-
:
|
217
|
-
:
|
218
|
-
|
219
|
-
|
220
|
-
:
|
221
|
-
:
|
222
|
-
:
|
223
|
-
:
|
224
|
-
:
|
225
|
-
:
|
226
|
-
:
|
227
|
-
:
|
228
|
-
|
229
|
-
|
230
|
-
:
|
231
|
-
:
|
232
|
-
:
|
233
|
-
:
|
234
|
-
:
|
235
|
-
:
|
236
|
-
:
|
237
|
-
:
|
238
|
-
:
|
239
|
-
:
|
240
|
-
:
|
241
|
-
:
|
242
|
-
:
|
243
|
-
:
|
244
|
-
:
|
245
|
-
:
|
246
|
-
:
|
247
|
-
:
|
248
|
-
:
|
249
|
-
:
|
250
|
-
:
|
251
|
-
:
|
252
|
-
:
|
253
|
-
:
|
254
|
-
:
|
255
|
-
:
|
256
|
-
:
|
257
|
-
:
|
258
|
-
:
|
259
|
-
:
|
260
|
-
:
|
261
|
-
:
|
262
|
-
:
|
263
|
-
:
|
264
|
-
:
|
265
|
-
:
|
266
|
-
:
|
267
|
-
:
|
268
|
-
:
|
269
|
-
:
|
270
|
-
:
|
271
|
-
:
|
272
|
-
:
|
273
|
-
:
|
274
|
-
:
|
275
|
-
:
|
276
|
-
:
|
277
|
-
:
|
278
|
-
:
|
279
|
-
:
|
280
|
-
:
|
281
|
-
:
|
282
|
-
:
|
283
|
-
:
|
284
|
-
:
|
285
|
-
:
|
286
|
-
:
|
287
|
-
:
|
288
|
-
:
|
289
|
-
:
|
290
|
-
:
|
291
|
-
:
|
292
|
-
:
|
293
|
-
:
|
294
|
-
:
|
295
|
-
:
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
1
|
+
# Ruby-SDL2 : Yet another SDL2 wrapper for Ruby
|
2
|
+
#
|
3
|
+
# * https://github.com/vaiorabbit/sdl2-bindings
|
4
|
+
#
|
5
|
+
# [NOTICE] This is an automatically generated file.
|
6
|
+
|
7
|
+
require 'ffi'
|
8
|
+
|
9
|
+
module SDL2
|
10
|
+
extend FFI::Library
|
11
|
+
# Define/Macro
|
12
|
+
|
13
|
+
SDL_MIXER_MAJOR_VERSION = 2
|
14
|
+
SDL_MIXER_MINOR_VERSION = 0
|
15
|
+
SDL_MIXER_PATCHLEVEL = 4
|
16
|
+
MIX_MAJOR_VERSION = SDL_MIXER_MAJOR_VERSION
|
17
|
+
MIX_MINOR_VERSION = SDL_MIXER_MINOR_VERSION
|
18
|
+
MIX_PATCHLEVEL = SDL_MIXER_PATCHLEVEL
|
19
|
+
MIX_CHANNELS = 8
|
20
|
+
MIX_DEFAULT_FREQUENCY = 22050
|
21
|
+
MIX_DEFAULT_FORMAT = AUDIO_S16LSB
|
22
|
+
MIX_DEFAULT_CHANNELS = 2
|
23
|
+
MIX_MAX_VOLUME = SDL_MIX_MAXVOLUME
|
24
|
+
MIX_CHANNEL_POST = -2
|
25
|
+
MIX_EFFECTSMAXSPEED = "MIX_EFFECTSMAXSPEED"
|
26
|
+
|
27
|
+
# Enum
|
28
|
+
|
29
|
+
MIX_INIT_FLAC = 1
|
30
|
+
MIX_INIT_MOD = 2
|
31
|
+
MIX_INIT_MP3 = 8
|
32
|
+
MIX_INIT_OGG = 16
|
33
|
+
MIX_INIT_MID = 32
|
34
|
+
MIX_INIT_OPUS = 64
|
35
|
+
MIX_NO_FADING = 0
|
36
|
+
MIX_FADING_OUT = 1
|
37
|
+
MIX_FADING_IN = 2
|
38
|
+
MUS_NONE = 0
|
39
|
+
MUS_CMD = 1
|
40
|
+
MUS_WAV = 2
|
41
|
+
MUS_MOD = 3
|
42
|
+
MUS_MID = 4
|
43
|
+
MUS_OGG = 5
|
44
|
+
MUS_MP3 = 6
|
45
|
+
MUS_MP3_MAD_UNUSED = 7
|
46
|
+
MUS_FLAC = 8
|
47
|
+
MUS_MODPLUG_UNUSED = 9
|
48
|
+
MUS_OPUS = 10
|
49
|
+
|
50
|
+
# Typedef
|
51
|
+
|
52
|
+
typedef :int, :MIX_InitFlags
|
53
|
+
typedef :int, :Mix_Fading
|
54
|
+
typedef :int, :Mix_MusicType
|
55
|
+
callback :Mix_EffectFunc_t, [:int, :pointer, :int, :pointer], :void
|
56
|
+
callback :Mix_EffectDone_t, [:int, :pointer], :void
|
57
|
+
|
58
|
+
# Struct
|
59
|
+
|
60
|
+
class Mix_Chunk < FFI::Struct
|
61
|
+
layout(
|
62
|
+
:allocated, :int,
|
63
|
+
:abuf, :pointer,
|
64
|
+
:alen, :uint,
|
65
|
+
:volume, :uchar,
|
66
|
+
)
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
# Function
|
71
|
+
|
72
|
+
def self.setup_mixer_symbols()
|
73
|
+
symbols = [
|
74
|
+
:Mix_Linked_Version,
|
75
|
+
:Mix_Init,
|
76
|
+
:Mix_Quit,
|
77
|
+
:Mix_OpenAudio,
|
78
|
+
:Mix_OpenAudioDevice,
|
79
|
+
:Mix_AllocateChannels,
|
80
|
+
:Mix_QuerySpec,
|
81
|
+
:Mix_LoadWAV_RW,
|
82
|
+
:Mix_LoadMUS,
|
83
|
+
:Mix_LoadMUS_RW,
|
84
|
+
:Mix_LoadMUSType_RW,
|
85
|
+
:Mix_QuickLoad_WAV,
|
86
|
+
:Mix_QuickLoad_RAW,
|
87
|
+
:Mix_FreeChunk,
|
88
|
+
:Mix_FreeMusic,
|
89
|
+
:Mix_GetNumChunkDecoders,
|
90
|
+
:Mix_GetChunkDecoder,
|
91
|
+
:Mix_HasChunkDecoder,
|
92
|
+
:Mix_GetNumMusicDecoders,
|
93
|
+
:Mix_GetMusicDecoder,
|
94
|
+
:Mix_HasMusicDecoder,
|
95
|
+
:Mix_GetMusicType,
|
96
|
+
:Mix_SetPostMix,
|
97
|
+
:Mix_HookMusic,
|
98
|
+
:Mix_HookMusicFinished,
|
99
|
+
:Mix_GetMusicHookData,
|
100
|
+
:Mix_ChannelFinished,
|
101
|
+
:Mix_RegisterEffect,
|
102
|
+
:Mix_UnregisterEffect,
|
103
|
+
:Mix_UnregisterAllEffects,
|
104
|
+
:Mix_SetPanning,
|
105
|
+
:Mix_SetPosition,
|
106
|
+
:Mix_SetDistance,
|
107
|
+
:Mix_SetReverseStereo,
|
108
|
+
:Mix_ReserveChannels,
|
109
|
+
:Mix_GroupChannel,
|
110
|
+
:Mix_GroupChannels,
|
111
|
+
:Mix_GroupAvailable,
|
112
|
+
:Mix_GroupCount,
|
113
|
+
:Mix_GroupOldest,
|
114
|
+
:Mix_GroupNewer,
|
115
|
+
:Mix_PlayChannelTimed,
|
116
|
+
:Mix_PlayMusic,
|
117
|
+
:Mix_FadeInMusic,
|
118
|
+
:Mix_FadeInMusicPos,
|
119
|
+
:Mix_FadeInChannelTimed,
|
120
|
+
:Mix_Volume,
|
121
|
+
:Mix_VolumeChunk,
|
122
|
+
:Mix_VolumeMusic,
|
123
|
+
:Mix_HaltChannel,
|
124
|
+
:Mix_HaltGroup,
|
125
|
+
:Mix_HaltMusic,
|
126
|
+
:Mix_ExpireChannel,
|
127
|
+
:Mix_FadeOutChannel,
|
128
|
+
:Mix_FadeOutGroup,
|
129
|
+
:Mix_FadeOutMusic,
|
130
|
+
:Mix_FadingMusic,
|
131
|
+
:Mix_FadingChannel,
|
132
|
+
:Mix_Pause,
|
133
|
+
:Mix_Resume,
|
134
|
+
:Mix_Paused,
|
135
|
+
:Mix_PauseMusic,
|
136
|
+
:Mix_ResumeMusic,
|
137
|
+
:Mix_RewindMusic,
|
138
|
+
:Mix_PausedMusic,
|
139
|
+
:Mix_SetMusicPosition,
|
140
|
+
:Mix_Playing,
|
141
|
+
:Mix_PlayingMusic,
|
142
|
+
:Mix_SetMusicCMD,
|
143
|
+
:Mix_SetSynchroValue,
|
144
|
+
:Mix_GetSynchroValue,
|
145
|
+
:Mix_SetSoundFonts,
|
146
|
+
:Mix_GetSoundFonts,
|
147
|
+
:Mix_EachSoundFont,
|
148
|
+
:Mix_GetChunk,
|
149
|
+
:Mix_CloseAudio,
|
150
|
+
]
|
151
|
+
args = {
|
152
|
+
:Mix_Linked_Version => [],
|
153
|
+
:Mix_Init => [:int],
|
154
|
+
:Mix_Quit => [],
|
155
|
+
:Mix_OpenAudio => [:int, :ushort, :int, :int],
|
156
|
+
:Mix_OpenAudioDevice => [:int, :ushort, :int, :int, :pointer, :int],
|
157
|
+
:Mix_AllocateChannels => [:int],
|
158
|
+
:Mix_QuerySpec => [:pointer, :pointer, :pointer],
|
159
|
+
:Mix_LoadWAV_RW => [:pointer, :int],
|
160
|
+
:Mix_LoadMUS => [:pointer],
|
161
|
+
:Mix_LoadMUS_RW => [:pointer, :int],
|
162
|
+
:Mix_LoadMUSType_RW => [:pointer, :int, :int],
|
163
|
+
:Mix_QuickLoad_WAV => [:pointer],
|
164
|
+
:Mix_QuickLoad_RAW => [:pointer, :uint],
|
165
|
+
:Mix_FreeChunk => [:pointer],
|
166
|
+
:Mix_FreeMusic => [:pointer],
|
167
|
+
:Mix_GetNumChunkDecoders => [],
|
168
|
+
:Mix_GetChunkDecoder => [:int],
|
169
|
+
:Mix_HasChunkDecoder => [:pointer],
|
170
|
+
:Mix_GetNumMusicDecoders => [],
|
171
|
+
:Mix_GetMusicDecoder => [:int],
|
172
|
+
:Mix_HasMusicDecoder => [:pointer],
|
173
|
+
:Mix_GetMusicType => [:pointer],
|
174
|
+
:Mix_SetPostMix => [:pointer, :pointer],
|
175
|
+
:Mix_HookMusic => [:pointer, :pointer],
|
176
|
+
:Mix_HookMusicFinished => [:pointer],
|
177
|
+
:Mix_GetMusicHookData => [],
|
178
|
+
:Mix_ChannelFinished => [:pointer],
|
179
|
+
:Mix_RegisterEffect => [:int, :Mix_EffectFunc_t, :Mix_EffectDone_t, :pointer],
|
180
|
+
:Mix_UnregisterEffect => [:int, :Mix_EffectFunc_t],
|
181
|
+
:Mix_UnregisterAllEffects => [:int],
|
182
|
+
:Mix_SetPanning => [:int, :uchar, :uchar],
|
183
|
+
:Mix_SetPosition => [:int, :short, :uchar],
|
184
|
+
:Mix_SetDistance => [:int, :uchar],
|
185
|
+
:Mix_SetReverseStereo => [:int, :int],
|
186
|
+
:Mix_ReserveChannels => [:int],
|
187
|
+
:Mix_GroupChannel => [:int, :int],
|
188
|
+
:Mix_GroupChannels => [:int, :int, :int],
|
189
|
+
:Mix_GroupAvailable => [:int],
|
190
|
+
:Mix_GroupCount => [:int],
|
191
|
+
:Mix_GroupOldest => [:int],
|
192
|
+
:Mix_GroupNewer => [:int],
|
193
|
+
:Mix_PlayChannelTimed => [:int, :pointer, :int, :int],
|
194
|
+
:Mix_PlayMusic => [:pointer, :int],
|
195
|
+
:Mix_FadeInMusic => [:pointer, :int, :int],
|
196
|
+
:Mix_FadeInMusicPos => [:pointer, :int, :int, :double],
|
197
|
+
:Mix_FadeInChannelTimed => [:int, :pointer, :int, :int, :int],
|
198
|
+
:Mix_Volume => [:int, :int],
|
199
|
+
:Mix_VolumeChunk => [:pointer, :int],
|
200
|
+
:Mix_VolumeMusic => [:int],
|
201
|
+
:Mix_HaltChannel => [:int],
|
202
|
+
:Mix_HaltGroup => [:int],
|
203
|
+
:Mix_HaltMusic => [],
|
204
|
+
:Mix_ExpireChannel => [:int, :int],
|
205
|
+
:Mix_FadeOutChannel => [:int, :int],
|
206
|
+
:Mix_FadeOutGroup => [:int, :int],
|
207
|
+
:Mix_FadeOutMusic => [:int],
|
208
|
+
:Mix_FadingMusic => [],
|
209
|
+
:Mix_FadingChannel => [:int],
|
210
|
+
:Mix_Pause => [:int],
|
211
|
+
:Mix_Resume => [:int],
|
212
|
+
:Mix_Paused => [:int],
|
213
|
+
:Mix_PauseMusic => [],
|
214
|
+
:Mix_ResumeMusic => [],
|
215
|
+
:Mix_RewindMusic => [],
|
216
|
+
:Mix_PausedMusic => [],
|
217
|
+
:Mix_SetMusicPosition => [:double],
|
218
|
+
:Mix_Playing => [:int],
|
219
|
+
:Mix_PlayingMusic => [],
|
220
|
+
:Mix_SetMusicCMD => [:pointer],
|
221
|
+
:Mix_SetSynchroValue => [:int],
|
222
|
+
:Mix_GetSynchroValue => [],
|
223
|
+
:Mix_SetSoundFonts => [:pointer],
|
224
|
+
:Mix_GetSoundFonts => [],
|
225
|
+
:Mix_EachSoundFont => [:pointer, :pointer],
|
226
|
+
:Mix_GetChunk => [:int],
|
227
|
+
:Mix_CloseAudio => [],
|
228
|
+
}
|
229
|
+
retvals = {
|
230
|
+
:Mix_Linked_Version => :pointer,
|
231
|
+
:Mix_Init => :int,
|
232
|
+
:Mix_Quit => :void,
|
233
|
+
:Mix_OpenAudio => :int,
|
234
|
+
:Mix_OpenAudioDevice => :int,
|
235
|
+
:Mix_AllocateChannels => :int,
|
236
|
+
:Mix_QuerySpec => :int,
|
237
|
+
:Mix_LoadWAV_RW => :pointer,
|
238
|
+
:Mix_LoadMUS => :pointer,
|
239
|
+
:Mix_LoadMUS_RW => :pointer,
|
240
|
+
:Mix_LoadMUSType_RW => :pointer,
|
241
|
+
:Mix_QuickLoad_WAV => :pointer,
|
242
|
+
:Mix_QuickLoad_RAW => :pointer,
|
243
|
+
:Mix_FreeChunk => :void,
|
244
|
+
:Mix_FreeMusic => :void,
|
245
|
+
:Mix_GetNumChunkDecoders => :int,
|
246
|
+
:Mix_GetChunkDecoder => :pointer,
|
247
|
+
:Mix_HasChunkDecoder => :int,
|
248
|
+
:Mix_GetNumMusicDecoders => :int,
|
249
|
+
:Mix_GetMusicDecoder => :pointer,
|
250
|
+
:Mix_HasMusicDecoder => :int,
|
251
|
+
:Mix_GetMusicType => :int,
|
252
|
+
:Mix_SetPostMix => :void,
|
253
|
+
:Mix_HookMusic => :void,
|
254
|
+
:Mix_HookMusicFinished => :void,
|
255
|
+
:Mix_GetMusicHookData => :pointer,
|
256
|
+
:Mix_ChannelFinished => :void,
|
257
|
+
:Mix_RegisterEffect => :int,
|
258
|
+
:Mix_UnregisterEffect => :int,
|
259
|
+
:Mix_UnregisterAllEffects => :int,
|
260
|
+
:Mix_SetPanning => :int,
|
261
|
+
:Mix_SetPosition => :int,
|
262
|
+
:Mix_SetDistance => :int,
|
263
|
+
:Mix_SetReverseStereo => :int,
|
264
|
+
:Mix_ReserveChannels => :int,
|
265
|
+
:Mix_GroupChannel => :int,
|
266
|
+
:Mix_GroupChannels => :int,
|
267
|
+
:Mix_GroupAvailable => :int,
|
268
|
+
:Mix_GroupCount => :int,
|
269
|
+
:Mix_GroupOldest => :int,
|
270
|
+
:Mix_GroupNewer => :int,
|
271
|
+
:Mix_PlayChannelTimed => :int,
|
272
|
+
:Mix_PlayMusic => :int,
|
273
|
+
:Mix_FadeInMusic => :int,
|
274
|
+
:Mix_FadeInMusicPos => :int,
|
275
|
+
:Mix_FadeInChannelTimed => :int,
|
276
|
+
:Mix_Volume => :int,
|
277
|
+
:Mix_VolumeChunk => :int,
|
278
|
+
:Mix_VolumeMusic => :int,
|
279
|
+
:Mix_HaltChannel => :int,
|
280
|
+
:Mix_HaltGroup => :int,
|
281
|
+
:Mix_HaltMusic => :int,
|
282
|
+
:Mix_ExpireChannel => :int,
|
283
|
+
:Mix_FadeOutChannel => :int,
|
284
|
+
:Mix_FadeOutGroup => :int,
|
285
|
+
:Mix_FadeOutMusic => :int,
|
286
|
+
:Mix_FadingMusic => :int,
|
287
|
+
:Mix_FadingChannel => :int,
|
288
|
+
:Mix_Pause => :void,
|
289
|
+
:Mix_Resume => :void,
|
290
|
+
:Mix_Paused => :int,
|
291
|
+
:Mix_PauseMusic => :void,
|
292
|
+
:Mix_ResumeMusic => :void,
|
293
|
+
:Mix_RewindMusic => :void,
|
294
|
+
:Mix_PausedMusic => :int,
|
295
|
+
:Mix_SetMusicPosition => :int,
|
296
|
+
:Mix_Playing => :int,
|
297
|
+
:Mix_PlayingMusic => :int,
|
298
|
+
:Mix_SetMusicCMD => :int,
|
299
|
+
:Mix_SetSynchroValue => :int,
|
300
|
+
:Mix_GetSynchroValue => :int,
|
301
|
+
:Mix_SetSoundFonts => :int,
|
302
|
+
:Mix_GetSoundFonts => :pointer,
|
303
|
+
:Mix_EachSoundFont => :int,
|
304
|
+
:Mix_GetChunk => :pointer,
|
305
|
+
:Mix_CloseAudio => :void,
|
306
|
+
}
|
307
|
+
symbols.each do |sym|
|
308
|
+
begin
|
309
|
+
attach_function sym, args[sym], retvals[sym]
|
310
|
+
rescue FFI::NotFoundError => error
|
311
|
+
$stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
|
312
|
+
end
|
313
|
+
end
|
314
|
+
end
|
315
|
+
|
316
|
+
end
|
317
|
+
|