ruby-alsa 0.0.5 → 0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/refs/pcm_wrap.rb ADDED
@@ -0,0 +1,552 @@
1
+ SND_PCM_CLASS_GENERIC = 0
2
+ SND_PCM_CLASS_MULTI = 1
3
+ SND_PCM_CLASS_MODEM = 2
4
+ SND_PCM_CLASS_DIGITIZER = 3
5
+ SND_PCM_CLASS_LAST = SND_PCM_CLASS_DIGITIZER
6
+
7
+ SND_PCM_SUBCLASS_GENERIC_MIX = 0
8
+ SND_PCM_SUBCLASS_MULTI_MIX = 1
9
+ SND_PCM_SUBCLASS_LAST = SND_PCM_SUBCLASS_MULTI_MIX
10
+
11
+ SND_PCM_STREAM_PLAYBACK = 0
12
+ SND_PCM_STREAM_CAPTURE = 1
13
+ SND_PCM_STREAM_LAST = SND_PCM_STREAM_CAPTURE
14
+
15
+ SND_PCM_ACCESS_MMAP_INTERLEAVED = 0
16
+ SND_PCM_ACCESS_MMAP_NONINTERLEAVED = 1
17
+ SND_PCM_ACCESS_MMAP_COMPLEX = 2
18
+ SND_PCM_ACCESS_RW_INTERLEAVED = 3
19
+ SND_PCM_ACCESS_RW_NONINTERLEAVED = 4
20
+ SND_PCM_ACCESS_LAST = SND_PCM_ACCESS_RW_NONINTERLEAVED
21
+
22
+ SND_PCM_FORMAT_UNKNOWN = -1
23
+ SND_PCM_FORMAT_S8 = 0
24
+ SND_PCM_FORMAT_U8 = 1
25
+ SND_PCM_FORMAT_S32_LE = 10
26
+ SND_PCM_FORMAT_S32_BE = 11
27
+ SND_PCM_FORMAT_U32_LE = 12
28
+ SND_PCM_FORMAT_U32_BE = 13
29
+ SND_PCM_FORMAT_FLOAT_LE = 14
30
+ SND_PCM_FORMAT_FLOAT_BE = 15
31
+ SND_PCM_FORMAT_FLOAT64_LE = 16
32
+ SND_PCM_FORMAT_FLOAT64_BE = 17
33
+ SND_PCM_FORMAT_IEC958_SUBFRAME_LE = 18
34
+ SND_PCM_FORMAT_IEC958_SUBFRAME_BE = 19
35
+ SND_PCM_FORMAT_S16_LE = 2
36
+ SND_PCM_FORMAT_MU_LAW = 20
37
+ SND_PCM_FORMAT_A_LAW = 21
38
+ SND_PCM_FORMAT_IMA_ADPCM = 22
39
+ SND_PCM_FORMAT_MPEG = 23
40
+ SND_PCM_FORMAT_GSM = 24
41
+ SND_PCM_FORMAT_S16_BE = 3
42
+ SND_PCM_FORMAT_SPECIAL = 31
43
+ SND_PCM_FORMAT_S24_3LE = 32
44
+ SND_PCM_FORMAT_S24_3BE = 33
45
+ SND_PCM_FORMAT_U24_3LE = 34
46
+ SND_PCM_FORMAT_U24_3BE = 35
47
+ SND_PCM_FORMAT_S20_3LE = 36
48
+ SND_PCM_FORMAT_S20_3BE = 37
49
+ SND_PCM_FORMAT_U20_3LE = 38
50
+ SND_PCM_FORMAT_U20_3BE = 39
51
+ SND_PCM_FORMAT_U16_LE = 4
52
+ SND_PCM_FORMAT_S18_3LE = 40
53
+ SND_PCM_FORMAT_S18_3BE = 41
54
+ SND_PCM_FORMAT_U18_3LE = 42
55
+ SND_PCM_FORMAT_U18_3BE = 43
56
+ SND_PCM_FORMAT_U16_BE = 5
57
+ SND_PCM_FORMAT_S24_LE = 6
58
+ SND_PCM_FORMAT_S24_BE = 7
59
+ SND_PCM_FORMAT_U24_LE = 8
60
+ SND_PCM_FORMAT_U24_BE = 9
61
+ SND_PCM_FORMAT_FLOAT64 = SND_PCM_FORMAT_FLOAT64_LE
62
+ SND_PCM_FORMAT_FLOAT = SND_PCM_FORMAT_FLOAT_LE
63
+ SND_PCM_FORMAT_IEC958_SUBFRAME = SND_PCM_FORMAT_IEC958_SUBFRAME_LE
64
+ SND_PCM_FORMAT_S16 = SND_PCM_FORMAT_S16_LE
65
+ SND_PCM_FORMAT_S24 = SND_PCM_FORMAT_S24_LE
66
+ SND_PCM_FORMAT_S32 = SND_PCM_FORMAT_S32_LE
67
+ SND_PCM_FORMAT_U16 = SND_PCM_FORMAT_U16_LE
68
+ SND_PCM_FORMAT_LAST = SND_PCM_FORMAT_U18_3BE
69
+ SND_PCM_FORMAT_U24 = SND_PCM_FORMAT_U24_LE
70
+ SND_PCM_FORMAT_U32 = SND_PCM_FORMAT_U32_LE
71
+
72
+ SND_PCM_SUBFORMAT_STD = 0
73
+ SND_PCM_SUBFORMAT_LAST = SND_PCM_SUBFORMAT_STD
74
+
75
+ SND_PCM_STATE_OPEN = 0
76
+ SND_PCM_STATE_SETUP = 1
77
+ SND_PCM_STATE_PREPARED = 2
78
+ SND_PCM_STATE_RUNNING = 3
79
+ SND_PCM_STATE_XRUN = 4
80
+ SND_PCM_STATE_DRAINING = 5
81
+ SND_PCM_STATE_PAUSED = 6
82
+ SND_PCM_STATE_SUSPENDED = 7
83
+ SND_PCM_STATE_DISCONNECTED = 8
84
+ SND_PCM_STATE_LAST = SND_PCM_STATE_DISCONNECTED
85
+
86
+ SND_PCM_START_DATA = 0
87
+ SND_PCM_START_EXPLICIT = 1
88
+ SND_PCM_START_LAST = SND_PCM_START_EXPLICIT
89
+
90
+ SND_PCM_XRUN_NONE = 0
91
+ SND_PCM_XRUN_STOP = 1
92
+ SND_PCM_XRUN_LAST = SND_PCM_XRUN_STOP
93
+
94
+ SND_PCM_TSTAMP_NONE = 0
95
+ SND_PCM_TSTAMP_ENABLE = 1
96
+ SND_PCM_TSTAMP_LAST = SND_PCM_TSTAMP_ENABLE
97
+ SND_PCM_TSTAMP_MMAP = SND_PCM_TSTAMP_ENABLE
98
+
99
+ SND_PCM_NONBLOCK = 0x00000001
100
+ SND_PCM_ASYNC = 0x00000002
101
+ SND_PCM_NO_AUTO_RESAMPLE = 0x00010000
102
+ SND_PCM_NO_AUTO_CHANNELS = 0x00020000
103
+ SND_PCM_NO_AUTO_FORMAT = 0x00040000
104
+ SND_PCM_NO_SOFTVOL = 0x00080000
105
+ SND_PCM_TYPE_HW = 0
106
+ SND_PCM_TYPE_HOOKS = 1
107
+ SND_PCM_TYPE_MULAW = 10
108
+ SND_PCM_TYPE_ADPCM = 11
109
+ SND_PCM_TYPE_RATE = 12
110
+ SND_PCM_TYPE_ROUTE = 13
111
+ SND_PCM_TYPE_PLUG = 14
112
+ SND_PCM_TYPE_SHARE = 15
113
+ SND_PCM_TYPE_METER = 16
114
+ SND_PCM_TYPE_MIX = 17
115
+ SND_PCM_TYPE_DROUTE = 18
116
+ SND_PCM_TYPE_LBSERVER = 19
117
+ SND_PCM_TYPE_MULTI = 2
118
+ SND_PCM_TYPE_LINEAR_FLOAT = 20
119
+ SND_PCM_TYPE_LADSPA = 21
120
+ SND_PCM_TYPE_DMIX = 22
121
+ SND_PCM_TYPE_JACK = 23
122
+ SND_PCM_TYPE_DSNOOP = 24
123
+ SND_PCM_TYPE_DSHARE = 25
124
+ SND_PCM_TYPE_IEC958 = 26
125
+ SND_PCM_TYPE_SOFTVOL = 27
126
+ SND_PCM_TYPE_IOPLUG = 28
127
+ SND_PCM_TYPE_EXTPLUG = 29
128
+ SND_PCM_TYPE_FILE = 3
129
+ SND_PCM_TYPE_MMAP_EMUL = 30
130
+ SND_PCM_TYPE_NULL = 4
131
+ SND_PCM_TYPE_SHM = 5
132
+ SND_PCM_TYPE_INET = 6
133
+ SND_PCM_TYPE_COPY = 7
134
+ SND_PCM_TYPE_LINEAR = 8
135
+ SND_PCM_TYPE_ALAW = 9
136
+ SND_PCM_TYPE_LAST = SND_PCM_TYPE_MMAP_EMUL
137
+
138
+ class SndPcmChannelArea < FFI::Struct
139
+ layout(
140
+ :addr, :pointer,
141
+ :first, :uint,
142
+ :step, :uint
143
+ )
144
+ end
145
+ class SndPcmSyncId < FFI::Union
146
+ layout(
147
+ :id, [:uchar, 16],
148
+ :id16, [:ushort, 8],
149
+ :id32, [:uint, 4]
150
+ )
151
+ end
152
+ attach_function :snd_pcm_open, [ :pointer, :string, :int, :int ], :int
153
+ attach_function :snd_pcm_open_lconf, [ :pointer, :string, :int, :int, :pointer ], :int
154
+ attach_function :snd_pcm_close, [ :pointer ], :int
155
+ attach_function :snd_pcm_name, [ :pointer ], :string
156
+ attach_function :snd_pcm_type, [ :pointer ], :int
157
+ attach_function :snd_pcm_stream, [ :pointer ], :int
158
+ attach_function :snd_pcm_poll_descriptors_count, [ :pointer ], :int
159
+ attach_function :snd_pcm_poll_descriptors, [ :pointer, :pointer, :uint ], :int
160
+ attach_function :snd_pcm_poll_descriptors_revents, [ :pointer, :pointer, :uint, :pointer ], :int
161
+ attach_function :snd_pcm_nonblock, [ :pointer, :int ], :int
162
+ attach_function :snd_async_add_pcm_handler, [ :pointer, :pointer, snd_async_callback_t, :pointer ], :int
163
+ attach_function :snd_async_handler_get_pcm, [ :pointer ], :pointer
164
+ attach_function :snd_pcm_info, [ :pointer, :pointer ], :int
165
+ attach_function :snd_pcm_hw_params_current, [ :pointer, :pointer ], :int
166
+ attach_function :snd_pcm_hw_params, [ :pointer, :pointer ], :int
167
+ attach_function :snd_pcm_hw_free, [ :pointer ], :int
168
+ attach_function :snd_pcm_sw_params_current, [ :pointer, :pointer ], :int
169
+ attach_function :snd_pcm_sw_params, [ :pointer, :pointer ], :int
170
+ attach_function :snd_pcm_prepare, [ :pointer ], :int
171
+ attach_function :snd_pcm_reset, [ :pointer ], :int
172
+ attach_function :snd_pcm_status, [ :pointer, :pointer ], :int
173
+ attach_function :snd_pcm_start, [ :pointer ], :int
174
+ attach_function :snd_pcm_drop, [ :pointer ], :int
175
+ attach_function :snd_pcm_drain, [ :pointer ], :int
176
+ attach_function :snd_pcm_pause, [ :pointer, :int ], :int
177
+ attach_function :snd_pcm_state, [ :pointer ], :int
178
+ attach_function :snd_pcm_hwsync, [ :pointer ], :int
179
+ attach_function :snd_pcm_delay, [ :pointer, :pointer ], :int
180
+ attach_function :snd_pcm_resume, [ :pointer ], :int
181
+ attach_function :snd_pcm_htimestamp, [ :pointer, :pointer, :pointer ], :int
182
+ attach_function :snd_pcm_avail, [ :pointer ], :long
183
+ attach_function :snd_pcm_avail_update, [ :pointer ], :long
184
+ attach_function :snd_pcm_avail_delay, [ :pointer, :pointer, :pointer ], :int
185
+ attach_function :snd_pcm_rewindable, [ :pointer ], :long
186
+ attach_function :snd_pcm_rewind, [ :pointer, :ulong ], :long
187
+ attach_function :snd_pcm_forwardable, [ :pointer ], :long
188
+ attach_function :snd_pcm_forward, [ :pointer, :ulong ], :long
189
+ attach_function :snd_pcm_writei, [ :pointer, :pointer, :ulong ], :long
190
+ attach_function :snd_pcm_readi, [ :pointer, :pointer, :ulong ], :long
191
+ attach_function :snd_pcm_writen, [ :pointer, :pointer, :ulong ], :long
192
+ attach_function :snd_pcm_readn, [ :pointer, :pointer, :ulong ], :long
193
+ attach_function :snd_pcm_wait, [ :pointer, :int ], :int
194
+ attach_function :snd_pcm_link, [ :pointer, :pointer ], :int
195
+ attach_function :snd_pcm_unlink, [ :pointer ], :int
196
+ attach_function :snd_pcm_recover, [ :pointer, :int, :int ], :int
197
+ attach_function :snd_pcm_set_params, [ :pointer, :int, :int, :uint, :uint, :int, :uint ], :int
198
+ attach_function :snd_pcm_get_params, [ :pointer, :pointer, :pointer ], :int
199
+ attach_function :snd_pcm_info_sizeof, [ ], :uint
200
+ attach_function :snd_pcm_info_malloc, [ :pointer ], :int
201
+ attach_function :snd_pcm_info_free, [ :pointer ], :void
202
+ attach_function :snd_pcm_info_copy, [ :pointer, :pointer ], :void
203
+ attach_function :snd_pcm_info_get_device, [ :pointer ], :uint
204
+ attach_function :snd_pcm_info_get_subdevice, [ :pointer ], :uint
205
+ attach_function :snd_pcm_info_get_stream, [ :pointer ], :int
206
+ attach_function :snd_pcm_info_get_card, [ :pointer ], :int
207
+ attach_function :snd_pcm_info_get_id, [ :pointer ], :string
208
+ attach_function :snd_pcm_info_get_name, [ :pointer ], :string
209
+ attach_function :snd_pcm_info_get_subdevice_name, [ :pointer ], :string
210
+ attach_function :snd_pcm_info_get_class, [ :pointer ], :int
211
+ attach_function :snd_pcm_info_get_subclass, [ :pointer ], :int
212
+ attach_function :snd_pcm_info_get_subdevices_count, [ :pointer ], :uint
213
+ attach_function :snd_pcm_info_get_subdevices_avail, [ :pointer ], :uint
214
+ attach_function :snd_pcm_info_get_sync, [ :pointer ], SndPcmSyncId
215
+ attach_function :snd_pcm_info_set_device, [ :pointer, :uint ], :void
216
+ attach_function :snd_pcm_info_set_subdevice, [ :pointer, :uint ], :void
217
+ attach_function :snd_pcm_info_set_stream, [ :pointer, :int ], :void
218
+ attach_function :snd_pcm_hw_params_any, [ :pointer, :pointer ], :int
219
+ attach_function :snd_pcm_hw_params_can_mmap_sample_resolution, [ :pointer ], :int
220
+ attach_function :snd_pcm_hw_params_is_double, [ :pointer ], :int
221
+ attach_function :snd_pcm_hw_params_is_batch, [ :pointer ], :int
222
+ attach_function :snd_pcm_hw_params_is_block_transfer, [ :pointer ], :int
223
+ attach_function :snd_pcm_hw_params_is_monotonic, [ :pointer ], :int
224
+ attach_function :snd_pcm_hw_params_can_overrange, [ :pointer ], :int
225
+ attach_function :snd_pcm_hw_params_can_forward, [ :pointer ], :int
226
+ attach_function :snd_pcm_hw_params_can_rewind, [ :pointer ], :int
227
+ attach_function :snd_pcm_hw_params_can_pause, [ :pointer ], :int
228
+ attach_function :snd_pcm_hw_params_can_resume, [ :pointer ], :int
229
+ attach_function :snd_pcm_hw_params_is_half_duplex, [ :pointer ], :int
230
+ attach_function :snd_pcm_hw_params_is_joint_duplex, [ :pointer ], :int
231
+ attach_function :snd_pcm_hw_params_can_sync_start, [ :pointer ], :int
232
+ attach_function :snd_pcm_hw_params_get_rate_numden, [ :pointer, :pointer, :pointer ], :int
233
+ attach_function :snd_pcm_hw_params_get_sbits, [ :pointer ], :int
234
+ attach_function :snd_pcm_hw_params_get_fifo_size, [ :pointer ], :int
235
+ attach_function :snd_pcm_hw_params_sizeof, [ ], :uint
236
+ attach_function :snd_pcm_hw_params_malloc, [ :pointer ], :int
237
+ attach_function :snd_pcm_hw_params_free, [ :pointer ], :void
238
+ attach_function :snd_pcm_hw_params_copy, [ :pointer, :pointer ], :void
239
+ attach_function :snd_pcm_hw_params_get_access, [ :pointer, :pointer ], :int
240
+ attach_function :snd_pcm_hw_params_test_access, [ :pointer, :pointer, :int ], :int
241
+ attach_function :snd_pcm_hw_params_set_access, [ :pointer, :pointer, :int ], :int
242
+ attach_function :snd_pcm_hw_params_set_access_first, [ :pointer, :pointer, :pointer ], :int
243
+ attach_function :snd_pcm_hw_params_set_access_last, [ :pointer, :pointer, :pointer ], :int
244
+ attach_function :snd_pcm_hw_params_set_access_mask, [ :pointer, :pointer, :pointer ], :int
245
+ attach_function :snd_pcm_hw_params_get_access_mask, [ :pointer, :pointer ], :int
246
+ attach_function :snd_pcm_hw_params_get_format, [ :pointer, :pointer ], :int
247
+ attach_function :snd_pcm_hw_params_test_format, [ :pointer, :pointer, :int ], :int
248
+ attach_function :snd_pcm_hw_params_set_format, [ :pointer, :pointer, :int ], :int
249
+ attach_function :snd_pcm_hw_params_set_format_first, [ :pointer, :pointer, :pointer ], :int
250
+ attach_function :snd_pcm_hw_params_set_format_last, [ :pointer, :pointer, :pointer ], :int
251
+ attach_function :snd_pcm_hw_params_set_format_mask, [ :pointer, :pointer, :pointer ], :int
252
+ attach_function :snd_pcm_hw_params_get_format_mask, [ :pointer, :pointer ], :void
253
+ attach_function :snd_pcm_hw_params_get_subformat, [ :pointer, :pointer ], :int
254
+ attach_function :snd_pcm_hw_params_test_subformat, [ :pointer, :pointer, :int ], :int
255
+ attach_function :snd_pcm_hw_params_set_subformat, [ :pointer, :pointer, :int ], :int
256
+ attach_function :snd_pcm_hw_params_set_subformat_first, [ :pointer, :pointer, :pointer ], :int
257
+ attach_function :snd_pcm_hw_params_set_subformat_last, [ :pointer, :pointer, :pointer ], :int
258
+ attach_function :snd_pcm_hw_params_set_subformat_mask, [ :pointer, :pointer, :pointer ], :int
259
+ attach_function :snd_pcm_hw_params_get_subformat_mask, [ :pointer, :pointer ], :void
260
+ attach_function :snd_pcm_hw_params_get_channels, [ :pointer, :pointer ], :int
261
+ attach_function :snd_pcm_hw_params_get_channels_min, [ :pointer, :pointer ], :int
262
+ attach_function :snd_pcm_hw_params_get_channels_max, [ :pointer, :pointer ], :int
263
+ attach_function :snd_pcm_hw_params_test_channels, [ :pointer, :pointer, :uint ], :int
264
+ attach_function :snd_pcm_hw_params_set_channels, [ :pointer, :pointer, :uint ], :int
265
+ attach_function :snd_pcm_hw_params_set_channels_min, [ :pointer, :pointer, :pointer ], :int
266
+ attach_function :snd_pcm_hw_params_set_channels_max, [ :pointer, :pointer, :pointer ], :int
267
+ attach_function :snd_pcm_hw_params_set_channels_minmax, [ :pointer, :pointer, :pointer, :pointer ], :int
268
+ attach_function :snd_pcm_hw_params_set_channels_near, [ :pointer, :pointer, :pointer ], :int
269
+ attach_function :snd_pcm_hw_params_set_channels_first, [ :pointer, :pointer, :pointer ], :int
270
+ attach_function :snd_pcm_hw_params_set_channels_last, [ :pointer, :pointer, :pointer ], :int
271
+ attach_function :snd_pcm_hw_params_get_rate, [ :pointer, :pointer, :pointer ], :int
272
+ attach_function :snd_pcm_hw_params_get_rate_min, [ :pointer, :pointer, :pointer ], :int
273
+ attach_function :snd_pcm_hw_params_get_rate_max, [ :pointer, :pointer, :pointer ], :int
274
+ attach_function :snd_pcm_hw_params_test_rate, [ :pointer, :pointer, :uint, :int ], :int
275
+ attach_function :snd_pcm_hw_params_set_rate, [ :pointer, :pointer, :uint, :int ], :int
276
+ attach_function :snd_pcm_hw_params_set_rate_min, [ :pointer, :pointer, :pointer, :pointer ], :int
277
+ attach_function :snd_pcm_hw_params_set_rate_max, [ :pointer, :pointer, :pointer, :pointer ], :int
278
+ attach_function :snd_pcm_hw_params_set_rate_minmax, [ :pointer, :pointer, :pointer, :pointer, :pointer, :pointer ], :int
279
+ attach_function :snd_pcm_hw_params_set_rate_near, [ :pointer, :pointer, :pointer, :pointer ], :int
280
+ attach_function :snd_pcm_hw_params_set_rate_first, [ :pointer, :pointer, :pointer, :pointer ], :int
281
+ attach_function :snd_pcm_hw_params_set_rate_last, [ :pointer, :pointer, :pointer, :pointer ], :int
282
+ attach_function :snd_pcm_hw_params_set_rate_resample, [ :pointer, :pointer, :uint ], :int
283
+ attach_function :snd_pcm_hw_params_get_rate_resample, [ :pointer, :pointer, :pointer ], :int
284
+ attach_function :snd_pcm_hw_params_set_export_buffer, [ :pointer, :pointer, :uint ], :int
285
+ attach_function :snd_pcm_hw_params_get_export_buffer, [ :pointer, :pointer, :pointer ], :int
286
+ attach_function :snd_pcm_hw_params_get_period_time, [ :pointer, :pointer, :pointer ], :int
287
+ attach_function :snd_pcm_hw_params_get_period_time_min, [ :pointer, :pointer, :pointer ], :int
288
+ attach_function :snd_pcm_hw_params_get_period_time_max, [ :pointer, :pointer, :pointer ], :int
289
+ attach_function :snd_pcm_hw_params_test_period_time, [ :pointer, :pointer, :uint, :int ], :int
290
+ attach_function :snd_pcm_hw_params_set_period_time, [ :pointer, :pointer, :uint, :int ], :int
291
+ attach_function :snd_pcm_hw_params_set_period_time_min, [ :pointer, :pointer, :pointer, :pointer ], :int
292
+ attach_function :snd_pcm_hw_params_set_period_time_max, [ :pointer, :pointer, :pointer, :pointer ], :int
293
+ attach_function :snd_pcm_hw_params_set_period_time_minmax, [ :pointer, :pointer, :pointer, :pointer, :pointer, :pointer ], :int
294
+ attach_function :snd_pcm_hw_params_set_period_time_near, [ :pointer, :pointer, :pointer, :pointer ], :int
295
+ attach_function :snd_pcm_hw_params_set_period_time_first, [ :pointer, :pointer, :pointer, :pointer ], :int
296
+ attach_function :snd_pcm_hw_params_set_period_time_last, [ :pointer, :pointer, :pointer, :pointer ], :int
297
+ attach_function :snd_pcm_hw_params_get_period_size, [ :pointer, :pointer, :pointer ], :int
298
+ attach_function :snd_pcm_hw_params_get_period_size_min, [ :pointer, :pointer, :pointer ], :int
299
+ attach_function :snd_pcm_hw_params_get_period_size_max, [ :pointer, :pointer, :pointer ], :int
300
+ attach_function :snd_pcm_hw_params_test_period_size, [ :pointer, :pointer, :ulong, :int ], :int
301
+ attach_function :snd_pcm_hw_params_set_period_size, [ :pointer, :pointer, :ulong, :int ], :int
302
+ attach_function :snd_pcm_hw_params_set_period_size_min, [ :pointer, :pointer, :pointer, :pointer ], :int
303
+ attach_function :snd_pcm_hw_params_set_period_size_max, [ :pointer, :pointer, :pointer, :pointer ], :int
304
+ attach_function :snd_pcm_hw_params_set_period_size_minmax, [ :pointer, :pointer, :pointer, :pointer, :pointer, :pointer ], :int
305
+ attach_function :snd_pcm_hw_params_set_period_size_near, [ :pointer, :pointer, :pointer, :pointer ], :int
306
+ attach_function :snd_pcm_hw_params_set_period_size_first, [ :pointer, :pointer, :pointer, :pointer ], :int
307
+ attach_function :snd_pcm_hw_params_set_period_size_last, [ :pointer, :pointer, :pointer, :pointer ], :int
308
+ attach_function :snd_pcm_hw_params_set_period_size_integer, [ :pointer, :pointer ], :int
309
+ attach_function :snd_pcm_hw_params_get_periods, [ :pointer, :pointer, :pointer ], :int
310
+ attach_function :snd_pcm_hw_params_get_periods_min, [ :pointer, :pointer, :pointer ], :int
311
+ attach_function :snd_pcm_hw_params_get_periods_max, [ :pointer, :pointer, :pointer ], :int
312
+ attach_function :snd_pcm_hw_params_test_periods, [ :pointer, :pointer, :uint, :int ], :int
313
+ attach_function :snd_pcm_hw_params_set_periods, [ :pointer, :pointer, :uint, :int ], :int
314
+ attach_function :snd_pcm_hw_params_set_periods_min, [ :pointer, :pointer, :pointer, :pointer ], :int
315
+ attach_function :snd_pcm_hw_params_set_periods_max, [ :pointer, :pointer, :pointer, :pointer ], :int
316
+ attach_function :snd_pcm_hw_params_set_periods_minmax, [ :pointer, :pointer, :pointer, :pointer, :pointer, :pointer ], :int
317
+ attach_function :snd_pcm_hw_params_set_periods_near, [ :pointer, :pointer, :pointer, :pointer ], :int
318
+ attach_function :snd_pcm_hw_params_set_periods_first, [ :pointer, :pointer, :pointer, :pointer ], :int
319
+ attach_function :snd_pcm_hw_params_set_periods_last, [ :pointer, :pointer, :pointer, :pointer ], :int
320
+ attach_function :snd_pcm_hw_params_set_periods_integer, [ :pointer, :pointer ], :int
321
+ attach_function :snd_pcm_hw_params_get_buffer_time, [ :pointer, :pointer, :pointer ], :int
322
+ attach_function :snd_pcm_hw_params_get_buffer_time_min, [ :pointer, :pointer, :pointer ], :int
323
+ attach_function :snd_pcm_hw_params_get_buffer_time_max, [ :pointer, :pointer, :pointer ], :int
324
+ attach_function :snd_pcm_hw_params_test_buffer_time, [ :pointer, :pointer, :uint, :int ], :int
325
+ attach_function :snd_pcm_hw_params_set_buffer_time, [ :pointer, :pointer, :uint, :int ], :int
326
+ attach_function :snd_pcm_hw_params_set_buffer_time_min, [ :pointer, :pointer, :pointer, :pointer ], :int
327
+ attach_function :snd_pcm_hw_params_set_buffer_time_max, [ :pointer, :pointer, :pointer, :pointer ], :int
328
+ attach_function :snd_pcm_hw_params_set_buffer_time_minmax, [ :pointer, :pointer, :pointer, :pointer, :pointer, :pointer ], :int
329
+ attach_function :snd_pcm_hw_params_set_buffer_time_near, [ :pointer, :pointer, :pointer, :pointer ], :int
330
+ attach_function :snd_pcm_hw_params_set_buffer_time_first, [ :pointer, :pointer, :pointer, :pointer ], :int
331
+ attach_function :snd_pcm_hw_params_set_buffer_time_last, [ :pointer, :pointer, :pointer, :pointer ], :int
332
+ attach_function :snd_pcm_hw_params_get_buffer_size, [ :pointer, :pointer ], :int
333
+ attach_function :snd_pcm_hw_params_get_buffer_size_min, [ :pointer, :pointer ], :int
334
+ attach_function :snd_pcm_hw_params_get_buffer_size_max, [ :pointer, :pointer ], :int
335
+ attach_function :snd_pcm_hw_params_test_buffer_size, [ :pointer, :pointer, :ulong ], :int
336
+ attach_function :snd_pcm_hw_params_set_buffer_size, [ :pointer, :pointer, :ulong ], :int
337
+ attach_function :snd_pcm_hw_params_set_buffer_size_min, [ :pointer, :pointer, :pointer ], :int
338
+ attach_function :snd_pcm_hw_params_set_buffer_size_max, [ :pointer, :pointer, :pointer ], :int
339
+ attach_function :snd_pcm_hw_params_set_buffer_size_minmax, [ :pointer, :pointer, :pointer, :pointer ], :int
340
+ attach_function :snd_pcm_hw_params_set_buffer_size_near, [ :pointer, :pointer, :pointer ], :int
341
+ attach_function :snd_pcm_hw_params_set_buffer_size_first, [ :pointer, :pointer, :pointer ], :int
342
+ attach_function :snd_pcm_hw_params_set_buffer_size_last, [ :pointer, :pointer, :pointer ], :int
343
+ attach_function :snd_pcm_hw_params_get_min_align, [ :pointer, :pointer ], :int
344
+ attach_function :snd_pcm_sw_params_sizeof, [ ], :uint
345
+ attach_function :snd_pcm_sw_params_malloc, [ :pointer ], :int
346
+ attach_function :snd_pcm_sw_params_free, [ :pointer ], :void
347
+ attach_function :snd_pcm_sw_params_copy, [ :pointer, :pointer ], :void
348
+ attach_function :snd_pcm_sw_params_get_boundary, [ :pointer, :pointer ], :int
349
+ attach_function :snd_pcm_sw_params_set_tstamp_mode, [ :pointer, :pointer, :int ], :int
350
+ attach_function :snd_pcm_sw_params_get_tstamp_mode, [ :pointer, :pointer ], :int
351
+ attach_function :snd_pcm_sw_params_set_avail_min, [ :pointer, :pointer, :ulong ], :int
352
+ attach_function :snd_pcm_sw_params_get_avail_min, [ :pointer, :pointer ], :int
353
+ attach_function :snd_pcm_sw_params_set_period_event, [ :pointer, :pointer, :int ], :int
354
+ attach_function :snd_pcm_sw_params_get_period_event, [ :pointer, :pointer ], :int
355
+ attach_function :snd_pcm_sw_params_set_start_threshold, [ :pointer, :pointer, :ulong ], :int
356
+ attach_function :snd_pcm_sw_params_get_start_threshold, [ :pointer, :pointer ], :int
357
+ attach_function :snd_pcm_sw_params_set_stop_threshold, [ :pointer, :pointer, :ulong ], :int
358
+ attach_function :snd_pcm_sw_params_get_stop_threshold, [ :pointer, :pointer ], :int
359
+ attach_function :snd_pcm_sw_params_set_silence_threshold, [ :pointer, :pointer, :ulong ], :int
360
+ attach_function :snd_pcm_sw_params_get_silence_threshold, [ :pointer, :pointer ], :int
361
+ attach_function :snd_pcm_sw_params_set_silence_size, [ :pointer, :pointer, :ulong ], :int
362
+ attach_function :snd_pcm_sw_params_get_silence_size, [ :pointer, :pointer ], :int
363
+ attach_function :snd_pcm_access_mask_sizeof, [ ], :uint
364
+ attach_function :snd_pcm_access_mask_malloc, [ :pointer ], :int
365
+ attach_function :snd_pcm_access_mask_free, [ :pointer ], :void
366
+ attach_function :snd_pcm_access_mask_copy, [ :pointer, :pointer ], :void
367
+ attach_function :snd_pcm_access_mask_none, [ :pointer ], :void
368
+ attach_function :snd_pcm_access_mask_any, [ :pointer ], :void
369
+ attach_function :snd_pcm_access_mask_test, [ :pointer, :int ], :int
370
+ attach_function :snd_pcm_access_mask_empty, [ :pointer ], :int
371
+ attach_function :snd_pcm_access_mask_set, [ :pointer, :int ], :void
372
+ attach_function :snd_pcm_access_mask_reset, [ :pointer, :int ], :void
373
+ attach_function :snd_pcm_format_mask_sizeof, [ ], :uint
374
+ attach_function :snd_pcm_format_mask_malloc, [ :pointer ], :int
375
+ attach_function :snd_pcm_format_mask_free, [ :pointer ], :void
376
+ attach_function :snd_pcm_format_mask_copy, [ :pointer, :pointer ], :void
377
+ attach_function :snd_pcm_format_mask_none, [ :pointer ], :void
378
+ attach_function :snd_pcm_format_mask_any, [ :pointer ], :void
379
+ attach_function :snd_pcm_format_mask_test, [ :pointer, :int ], :int
380
+ attach_function :snd_pcm_format_mask_empty, [ :pointer ], :int
381
+ attach_function :snd_pcm_format_mask_set, [ :pointer, :int ], :void
382
+ attach_function :snd_pcm_format_mask_reset, [ :pointer, :int ], :void
383
+ attach_function :snd_pcm_subformat_mask_sizeof, [ ], :uint
384
+ attach_function :snd_pcm_subformat_mask_malloc, [ :pointer ], :int
385
+ attach_function :snd_pcm_subformat_mask_free, [ :pointer ], :void
386
+ attach_function :snd_pcm_subformat_mask_copy, [ :pointer, :pointer ], :void
387
+ attach_function :snd_pcm_subformat_mask_none, [ :pointer ], :void
388
+ attach_function :snd_pcm_subformat_mask_any, [ :pointer ], :void
389
+ attach_function :snd_pcm_subformat_mask_test, [ :pointer, :int ], :int
390
+ attach_function :snd_pcm_subformat_mask_empty, [ :pointer ], :int
391
+ attach_function :snd_pcm_subformat_mask_set, [ :pointer, :int ], :void
392
+ attach_function :snd_pcm_subformat_mask_reset, [ :pointer, :int ], :void
393
+ attach_function :snd_pcm_status_sizeof, [ ], :uint
394
+ attach_function :snd_pcm_status_malloc, [ :pointer ], :int
395
+ attach_function :snd_pcm_status_free, [ :pointer ], :void
396
+ attach_function :snd_pcm_status_copy, [ :pointer, :pointer ], :void
397
+ attach_function :snd_pcm_status_get_state, [ :pointer ], :int
398
+ attach_function :snd_pcm_status_get_trigger_tstamp, [ :pointer, :pointer ], :void
399
+ attach_function :snd_pcm_status_get_trigger_htstamp, [ :pointer, :pointer ], :void
400
+ attach_function :snd_pcm_status_get_tstamp, [ :pointer, :pointer ], :void
401
+ attach_function :snd_pcm_status_get_htstamp, [ :pointer, :pointer ], :void
402
+ attach_function :snd_pcm_status_get_delay, [ :pointer ], :long
403
+ attach_function :snd_pcm_status_get_avail, [ :pointer ], :ulong
404
+ attach_function :snd_pcm_status_get_avail_max, [ :pointer ], :ulong
405
+ attach_function :snd_pcm_status_get_overrange, [ :pointer ], :ulong
406
+ attach_function :snd_pcm_type_name, [ :int ], :string
407
+ attach_function :snd_pcm_stream_name, [ :int ], :string
408
+ attach_function :snd_pcm_access_name, [ :int ], :string
409
+ attach_function :snd_pcm_format_name, [ :int ], :string
410
+ attach_function :snd_pcm_format_description, [ :int ], :string
411
+ attach_function :snd_pcm_subformat_name, [ :int ], :string
412
+ attach_function :snd_pcm_subformat_description, [ :int ], :string
413
+ attach_function :snd_pcm_format_value, [ :string ], :int
414
+ attach_function :snd_pcm_tstamp_mode_name, [ :int ], :string
415
+ attach_function :snd_pcm_state_name, [ :int ], :string
416
+ attach_function :snd_pcm_dump, [ :pointer, :pointer ], :int
417
+ attach_function :snd_pcm_dump_hw_setup, [ :pointer, :pointer ], :int
418
+ attach_function :snd_pcm_dump_sw_setup, [ :pointer, :pointer ], :int
419
+ attach_function :snd_pcm_dump_setup, [ :pointer, :pointer ], :int
420
+ attach_function :snd_pcm_hw_params_dump, [ :pointer, :pointer ], :int
421
+ attach_function :snd_pcm_sw_params_dump, [ :pointer, :pointer ], :int
422
+ attach_function :snd_pcm_status_dump, [ :pointer, :pointer ], :int
423
+ attach_function :snd_pcm_mmap_begin, [ :pointer, :pointer, :pointer, :pointer ], :int
424
+ attach_function :snd_pcm_mmap_commit, [ :pointer, :ulong, :ulong ], :long
425
+ attach_function :snd_pcm_mmap_writei, [ :pointer, :pointer, :ulong ], :long
426
+ attach_function :snd_pcm_mmap_readi, [ :pointer, :pointer, :ulong ], :long
427
+ attach_function :snd_pcm_mmap_writen, [ :pointer, :pointer, :ulong ], :long
428
+ attach_function :snd_pcm_mmap_readn, [ :pointer, :pointer, :ulong ], :long
429
+ attach_function :snd_pcm_format_signed, [ :int ], :int
430
+ attach_function :snd_pcm_format_unsigned, [ :int ], :int
431
+ attach_function :snd_pcm_format_linear, [ :int ], :int
432
+ attach_function :snd_pcm_format_float, [ :int ], :int
433
+ attach_function :snd_pcm_format_little_endian, [ :int ], :int
434
+ attach_function :snd_pcm_format_big_endian, [ :int ], :int
435
+ attach_function :snd_pcm_format_cpu_endian, [ :int ], :int
436
+ attach_function :snd_pcm_format_width, [ :int ], :int
437
+ attach_function :snd_pcm_format_physical_width, [ :int ], :int
438
+ attach_function :snd_pcm_build_linear_format, [ :int, :int, :int, :int ], :int
439
+ attach_function :snd_pcm_format_size, [ :int, :uint ], ssize_t
440
+ attach_function :snd_pcm_format_silence, [ :int ], u_int8_t
441
+ attach_function :snd_pcm_format_silence_16, [ :int ], u_int16_t
442
+ attach_function :snd_pcm_format_silence_32, [ :int ], u_int32_t
443
+ attach_function :snd_pcm_format_silence_64, [ :int ], u_int64_t
444
+ attach_function :snd_pcm_format_set_silence, [ :int, :pointer, :uint ], :int
445
+ attach_function :snd_pcm_bytes_to_frames, [ :pointer, ssize_t ], :long
446
+ attach_function :snd_pcm_frames_to_bytes, [ :pointer, :long ], ssize_t
447
+ attach_function :snd_pcm_bytes_to_samples, [ :pointer, ssize_t ], :long
448
+ attach_function :snd_pcm_samples_to_bytes, [ :pointer, :long ], ssize_t
449
+ attach_function :snd_pcm_area_silence, [ :pointer, :ulong, :uint, :int ], :int
450
+ attach_function :snd_pcm_areas_silence, [ :pointer, :ulong, :uint, :ulong, :int ], :int
451
+ attach_function :snd_pcm_area_copy, [ :pointer, :ulong, :pointer, :ulong, :uint, :int ], :int
452
+ attach_function :snd_pcm_areas_copy, [ :pointer, :ulong, :pointer, :ulong, :uint, :ulong, :int ], :int
453
+ SND_PCM_HOOK_TYPE_HW_PARAMS = 0
454
+ SND_PCM_HOOK_TYPE_HW_FREE = 1
455
+ SND_PCM_HOOK_TYPE_CLOSE = 2
456
+ SND_PCM_HOOK_TYPE_LAST = SND_PCM_HOOK_TYPE_CLOSE
457
+
458
+ callback(:snd_pcm_hook_func_t, [ :pointer ], :int)
459
+ attach_function :snd_pcm_hook_get_pcm, [ :pointer ], :pointer
460
+ attach_function :snd_pcm_hook_get_private, [ :pointer ], :pointer
461
+ attach_function :snd_pcm_hook_set_private, [ :pointer, :pointer ], :void
462
+ attach_function :snd_pcm_hook_add, [ :pointer, :pointer, :int, :snd_pcm_hook_func_t, :pointer ], :int
463
+ attach_function :snd_pcm_hook_remove, [ :pointer ], :int
464
+ class SndPcmScopeOps < FF::Struct
465
+ layout(
466
+ :enable, callback([ :pointer ], :int),
467
+ :disable, callback([ :pointer ], :void),
468
+ :start, callback([ :pointer ], :void),
469
+ :stop, callback([ :pointer ], :void),
470
+ :update, callback([ :pointer ], :void),
471
+ :reset, callback([ :pointer ], :void),
472
+ :close, callback([ :pointer ], :void)
473
+ )
474
+ def enable=(cb)
475
+ @enable = cb
476
+ self[:enable] = @enable
477
+ end
478
+ def enable
479
+ @enable
480
+ end
481
+ def disable=(cb)
482
+ @disable = cb
483
+ self[:disable] = @disable
484
+ end
485
+ def disable
486
+ @disable
487
+ end
488
+ def start=(cb)
489
+ @start = cb
490
+ self[:start] = @start
491
+ end
492
+ def start
493
+ @start
494
+ end
495
+ def stop=(cb)
496
+ @stop = cb
497
+ self[:stop] = @stop
498
+ end
499
+ def stop
500
+ @stop
501
+ end
502
+ def update=(cb)
503
+ @update = cb
504
+ self[:update] = @update
505
+ end
506
+ def update
507
+ @update
508
+ end
509
+ def reset=(cb)
510
+ @reset = cb
511
+ self[:reset] = @reset
512
+ end
513
+ def reset
514
+ @reset
515
+ end
516
+ def close=(cb)
517
+ @close = cb
518
+ self[:close] = @close
519
+ end
520
+ def close
521
+ @close
522
+ end
523
+
524
+ end
525
+ attach_function :snd_pcm_meter_get_bufsize, [ :pointer ], :ulong
526
+ attach_function :snd_pcm_meter_get_channels, [ :pointer ], :uint
527
+ attach_function :snd_pcm_meter_get_rate, [ :pointer ], :uint
528
+ attach_function :snd_pcm_meter_get_now, [ :pointer ], :ulong
529
+ attach_function :snd_pcm_meter_get_boundary, [ :pointer ], :ulong
530
+ attach_function :snd_pcm_meter_add_scope, [ :pointer, :pointer ], :int
531
+ attach_function :snd_pcm_meter_search_scope, [ :pointer, :string ], :pointer
532
+ attach_function :snd_pcm_scope_malloc, [ :pointer ], :int
533
+ attach_function :snd_pcm_scope_set_ops, [ :pointer, :pointer ], :void
534
+ attach_function :snd_pcm_scope_set_name, [ :pointer, :string ], :void
535
+ attach_function :snd_pcm_scope_get_name, [ :pointer ], :string
536
+ attach_function :snd_pcm_scope_get_callback_private, [ :pointer ], :pointer
537
+ attach_function :snd_pcm_scope_set_callback_private, [ :pointer, :pointer ], :void
538
+ attach_function :snd_pcm_scope_s16_open, [ :pointer, :string, :pointer ], :int
539
+ attach_function :snd_pcm_scope_s16_get_channel_buffer, [ :pointer, :uint ], :pointer
540
+ SND_SPCM_LATENCY_STANDARD = 0
541
+ SND_SPCM_LATENCY_MEDIUM = 1
542
+ SND_SPCM_LATENCY_REALTIME = 2
543
+
544
+ SND_SPCM_XRUN_IGNORE = 0
545
+ SND_SPCM_XRUN_STOP = 1
546
+
547
+ SND_SPCM_DUPLEX_LIBERAL = 0
548
+ SND_SPCM_DUPLEX_PEDANTIC = 1
549
+
550
+ attach_function :snd_spcm_init, [ :pointer, :uint, :uint, :int, :int, :int, :int, :int ], :int
551
+ attach_function :snd_spcm_init_duplex, [ :pointer, :pointer, :uint, :uint, :int, :int, :int, :int, :int, :int ], :int
552
+ attach_function :snd_spcm_init_get_params, [ :pointer, :pointer, :pointer, :pointer ], :int