dxopal 1.0.0
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.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/.ignore +5 -0
- data/.nojekyll +4 -0
- data/CHANGELOG.md +90 -0
- data/DEVELOPMENT.md +57 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +39 -0
- data/README.md +22 -0
- data/Rakefile +66 -0
- data/TODO.md +278 -0
- data/build/dxopal.js +46590 -0
- data/build/dxopal.min.js +1 -0
- data/config.ru +39 -0
- data/doc/api/DXOpal.html +129 -0
- data/doc/api/DXOpal/Font.html +485 -0
- data/doc/api/DXOpal/Image.html +2533 -0
- data/doc/api/DXOpal/Input.html +1086 -0
- data/doc/api/DXOpal/Input/MouseCodes.html +146 -0
- data/doc/api/DXOpal/RemoteResource.html +641 -0
- data/doc/api/DXOpal/Sound.html +568 -0
- data/doc/api/DXOpal/SoundEffect.html +444 -0
- data/doc/api/DXOpal/SoundEffect/WaveTypes.html +130 -0
- data/doc/api/DXOpal/Sprite.html +1419 -0
- data/doc/api/DXOpal/Window.html +1915 -0
- data/doc/api/_index.html +228 -0
- data/doc/api/class_list.html +51 -0
- data/doc/api/css/common.css +1 -0
- data/doc/api/css/full_list.css +58 -0
- data/doc/api/css/style.css +492 -0
- data/doc/api/file.CHANGELOG.html +162 -0
- data/doc/api/file.README.html +124 -0
- data/doc/api/file_list.html +61 -0
- data/doc/api/frames.html +17 -0
- data/doc/api/index.html +124 -0
- data/doc/api/js/app.js +248 -0
- data/doc/api/js/full_list.js +216 -0
- data/doc/api/js/jquery.js +4 -0
- data/doc/api/method_list.html +939 -0
- data/doc/api/top-level-namespace.html +110 -0
- data/doc/en/index.html +93 -0
- data/doc/ja/index.html +92 -0
- data/dxopal.gemspec +29 -0
- data/exe/dxopal +44 -0
- data/index.html +56 -0
- data/opal/dxopal.rb +54 -0
- data/opal/dxopal/constants/colors.rb +16 -0
- data/opal/dxopal/font.rb +20 -0
- data/opal/dxopal/image.rb +301 -0
- data/opal/dxopal/input.rb +170 -0
- data/opal/dxopal/input/key_codes.rb +168 -0
- data/opal/dxopal/remote_resource.rb +65 -0
- data/opal/dxopal/sound.rb +53 -0
- data/opal/dxopal/sound_effect.rb +84 -0
- data/opal/dxopal/sprite.rb +94 -0
- data/opal/dxopal/sprite/collision_area.rb +288 -0
- data/opal/dxopal/sprite/collision_check.rb +106 -0
- data/opal/dxopal/sprite/collision_checker.rb +169 -0
- data/opal/dxopal/sprite/physics.rb +82 -0
- data/opal/dxopal/version.rb +3 -0
- data/opal/dxopal/window.rb +173 -0
- data/template/index.html +13 -0
- data/template/main.rb +9 -0
- metadata +191 -0
@@ -0,0 +1,444 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: DXOpal::SoundEffect
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "DXOpal::SoundEffect";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (S)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../DXOpal.html" title="DXOpal (module)">DXOpal</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">SoundEffect</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: DXOpal::SoundEffect
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="Sound.html" title="DXOpal::Sound (class)">Sound</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="RemoteResource.html" title="DXOpal::RemoteResource (class)">RemoteResource</a></span></li>
|
78
|
+
|
79
|
+
<li class="next"><span class='object_link'><a href="Sound.html" title="DXOpal::Sound (class)">Sound</a></span></li>
|
80
|
+
|
81
|
+
<li class="next">DXOpal::SoundEffect</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<dl>
|
100
|
+
<dt>Defined in:</dt>
|
101
|
+
<dd>opal/dxopal/sound_effect.rb</dd>
|
102
|
+
</dl>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<h2>Overview</h2><div class="docstring">
|
107
|
+
<div class="discussion">
|
108
|
+
|
109
|
+
<p>User-generated sound</p>
|
110
|
+
|
111
|
+
<p>Example:</p>
|
112
|
+
|
113
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_v'>v</span> <span class='op'>=</span> <span class='int'>80</span>
|
114
|
+
<span class='const'>SoundEffect</span><span class='period'>.</span><span class='id identifier rubyid_register'><span class='object_link'><a href="RemoteResource.html#register-class_method" title="DXOpal::RemoteResource.register (method)">register</a></span></span><span class='lparen'>(</span><span class='symbol'>:sound1</span><span class='comma'>,</span> <span class='int'>4000</span><span class='comma'>,</span> <span class='const'>WAVE_RECT</span><span class='comma'>,</span> <span class='int'>5000</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
115
|
+
<span class='id identifier rubyid_v'>v</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='op'>-</span> <span class='float'>0.03</span>
|
116
|
+
<span class='lbracket'>[</span><span class='id identifier rubyid_rand'>rand</span><span class='lparen'>(</span><span class='int'>300</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='rbracket'>]</span>
|
117
|
+
<span class='kw'>end</span>
|
118
|
+
</code></pre>
|
119
|
+
|
120
|
+
|
121
|
+
</div>
|
122
|
+
</div>
|
123
|
+
<div class="tags">
|
124
|
+
|
125
|
+
|
126
|
+
</div><h2>Defined Under Namespace</h2>
|
127
|
+
<p class="children">
|
128
|
+
|
129
|
+
|
130
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="SoundEffect/WaveTypes.html" title="DXOpal::SoundEffect::WaveTypes (module)">WaveTypes</a></span>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</p>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<h2>Instance Attribute Summary</h2>
|
143
|
+
|
144
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Sound.html" title="DXOpal::Sound (class)">Sound</a></span></h3>
|
145
|
+
<p class="inherited"><span class='object_link'><a href="Sound.html#decoded-instance_method" title="DXOpal::Sound#decoded (method)">#decoded</a></span></p>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<h2>
|
150
|
+
Class Method Summary
|
151
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
152
|
+
</h2>
|
153
|
+
|
154
|
+
<ul class="summary">
|
155
|
+
|
156
|
+
<li class="public ">
|
157
|
+
<span class="summary_signature">
|
158
|
+
|
159
|
+
<a href="#_load-class_method" title="_load (class method)">.<strong>_load</strong>(time, wave_type = WAVE_RECT, resolution = 1000, &block) ⇒ Object </a>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
</span>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<span class="summary_desc"><div class='inline'>
|
174
|
+
<p>time : Total number of ticks When resolution=1000(default), `time` is
|
175
|
+
equivalent to the total length of the sound in milliseconds.</p>
|
176
|
+
</div></span>
|
177
|
+
|
178
|
+
</li>
|
179
|
+
|
180
|
+
|
181
|
+
</ul>
|
182
|
+
|
183
|
+
<h2>
|
184
|
+
Instance Method Summary
|
185
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
186
|
+
</h2>
|
187
|
+
|
188
|
+
<ul class="summary">
|
189
|
+
|
190
|
+
<li class="public ">
|
191
|
+
<span class="summary_signature">
|
192
|
+
|
193
|
+
<a href="#add-instance_method" title="#add (instance method)">#<strong>add</strong>(wave_type = WAVE_RECT, resolution = 1000) ⇒ Object </a>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
</span>
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
208
|
+
|
209
|
+
</li>
|
210
|
+
|
211
|
+
|
212
|
+
</ul>
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Sound.html" title="DXOpal::Sound (class)">Sound</a></span></h3>
|
225
|
+
<p class="inherited"><span class='object_link'><a href="Sound.html#audio_context-class_method" title="DXOpal::Sound.audio_context (method)">audio_context</a></span>, <span class='object_link'><a href="Sound.html#initialize-instance_method" title="DXOpal::Sound#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Sound.html#play-instance_method" title="DXOpal::Sound#play (method)">#play</a></span></p>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="RemoteResource.html" title="DXOpal::RemoteResource (class)">RemoteResource</a></span></h3>
|
236
|
+
<p class="inherited"><span class='object_link'><a href="RemoteResource.html#[]-class_method" title="DXOpal::RemoteResource.[] (method)">[]</a></span>, <span class='object_link'><a href="RemoteResource.html#_klass_name-class_method" title="DXOpal::RemoteResource._klass_name (method)">_klass_name</a></span>, <span class='object_link'><a href="RemoteResource.html#_load_resources-class_method" title="DXOpal::RemoteResource._load_resources (method)">_load_resources</a></span>, <span class='object_link'><a href="RemoteResource.html#add_class-class_method" title="DXOpal::RemoteResource.add_class (method)">add_class</a></span>, <span class='object_link'><a href="RemoteResource.html#register-class_method" title="DXOpal::RemoteResource.register (method)">register</a></span></p>
|
237
|
+
<div id="constructor_details" class="method_details_list">
|
238
|
+
<h2>Constructor Details</h2>
|
239
|
+
|
240
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Sound.html#initialize-instance_method" title="DXOpal::Sound#initialize (method)">DXOpal::Sound</a></span></p>
|
241
|
+
|
242
|
+
</div>
|
243
|
+
|
244
|
+
|
245
|
+
<div id="class_method_details" class="method_details_list">
|
246
|
+
<h2>Class Method Details</h2>
|
247
|
+
|
248
|
+
|
249
|
+
<div class="method_details first">
|
250
|
+
<h3 class="signature first" id="_load-class_method">
|
251
|
+
|
252
|
+
.<strong>_load</strong>(time, wave_type = WAVE_RECT, resolution = 1000, &block) ⇒ <tt>Object</tt>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
</h3><div class="docstring">
|
259
|
+
<div class="discussion">
|
260
|
+
|
261
|
+
<p>time : Total number of ticks</p>
|
262
|
+
|
263
|
+
<pre class="code ruby"><code class="ruby">When resolution=1000(default), `time` is equivalent to the
|
264
|
+
total length of the sound in milliseconds.</code></pre>
|
265
|
+
|
266
|
+
<p>wave_type : Type of wave form resolution : Number of ticks per second block
|
267
|
+
: Should return [freq(0~44100), volume(0~255)]</p>
|
268
|
+
|
269
|
+
|
270
|
+
</div>
|
271
|
+
</div>
|
272
|
+
<div class="tags">
|
273
|
+
|
274
|
+
|
275
|
+
</div><table class="source_code">
|
276
|
+
<tr>
|
277
|
+
<td>
|
278
|
+
<pre class="lines">
|
279
|
+
|
280
|
+
|
281
|
+
26
|
282
|
+
27
|
283
|
+
28
|
284
|
+
29
|
285
|
+
30
|
286
|
+
31
|
287
|
+
32
|
288
|
+
33
|
289
|
+
34
|
290
|
+
35
|
291
|
+
36
|
292
|
+
37
|
293
|
+
38
|
294
|
+
39
|
295
|
+
40
|
296
|
+
41
|
297
|
+
42
|
298
|
+
43
|
299
|
+
44
|
300
|
+
45
|
301
|
+
46
|
302
|
+
47
|
303
|
+
48
|
304
|
+
49
|
305
|
+
50
|
306
|
+
51
|
307
|
+
52
|
308
|
+
53
|
309
|
+
54
|
310
|
+
55
|
311
|
+
56
|
312
|
+
57
|
313
|
+
58
|
314
|
+
59
|
315
|
+
60
|
316
|
+
61
|
317
|
+
62
|
318
|
+
63
|
319
|
+
64
|
320
|
+
65
|
321
|
+
66
|
322
|
+
67
|
323
|
+
68
|
324
|
+
69
|
325
|
+
70
|
326
|
+
71
|
327
|
+
72
|
328
|
+
73
|
329
|
+
74
|
330
|
+
75
|
331
|
+
76
|
332
|
+
77
|
333
|
+
78
|
334
|
+
79</pre>
|
335
|
+
</td>
|
336
|
+
<td>
|
337
|
+
<pre class="code"><span class="info file"># File 'opal/dxopal/sound_effect.rb', line 26</span>
|
338
|
+
|
339
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__load'>_load</span><span class='lparen'>(</span><span class='id identifier rubyid_time'>time</span><span class='comma'>,</span> <span class='id identifier rubyid_wave_type'>wave_type</span><span class='op'>=</span><span class='const'>WAVE_RECT</span><span class='comma'>,</span> <span class='id identifier rubyid_resolution'>resolution</span><span class='op'>=</span><span class='int'>1000</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
340
|
+
<span class='id identifier rubyid_snd'>snd</span> <span class='op'>=</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(soundeffect)</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
341
|
+
<span class='id identifier rubyid_snd_promise'>snd_promise</span> <span class='op'>=</span> <span class='backtick'>%x{</span><span class='tstring_content'>
|
342
|
+
new Promise(function(resolve, reject){
|
343
|
+
var n_channels = 1;
|
344
|
+
var context = </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Sound.html" title="DXOpal::Sound (class)">Sound</a></span></span><span class='period'>.</span><span class='id identifier rubyid_audio_context'><span class='object_link'><a href="Sound.html#audio_context-class_method" title="DXOpal::Sound.audio_context (method)">audio_context</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'>;
|
345
|
+
var n_ticks = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_time'>time</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
|
346
|
+
var totalSeconds = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_time'>time</span> <span class='op'>/</span> <span class='id identifier rubyid_resolution'>resolution</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
|
347
|
+
var valuesPerSecond = context.sampleRate;
|
348
|
+
var n_values = totalSeconds * valuesPerSecond;
|
349
|
+
var myArrayBuffer = context.createBuffer(n_channels, n_values, valuesPerSecond);
|
350
|
+
var values = myArrayBuffer.getChannelData(0);
|
351
|
+
var n = 0;
|
352
|
+
for (var i = 0; i < n_ticks; i++) {
|
353
|
+
var ret = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
|
354
|
+
var freq = ret[0], volume = ret[1];
|
355
|
+
if (freq < 0) freq = 0;
|
356
|
+
if (freq > 44100) freq = 44100;
|
357
|
+
if (volume < 0) volume = 0;
|
358
|
+
if (volume > 255) volume = 255;
|
359
|
+
var vol = volume / 255; // 0.0~1.0
|
360
|
+
|
361
|
+
var period = valuesPerSecond * 1 / freq;
|
362
|
+
for (; n < ((i+1) / n_ticks * n_values); n++) {
|
363
|
+
var phase = (n % period) / period; // 0.0~1.0
|
364
|
+
var value; // -1.0~1.0
|
365
|
+
switch(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_wave_type'>wave_type</span><span class='embexpr_end'>}</span><span class='tstring_content'>) {
|
366
|
+
case "sine":
|
367
|
+
value = Math.sin(2 * Math.PI * phase) * 2 - 1;
|
368
|
+
break;
|
369
|
+
case "sawtooth":
|
370
|
+
value = phase * 2 - 1;
|
371
|
+
break;
|
372
|
+
case "triangle":
|
373
|
+
value = phase < 0.25 ? 0+phase*4 :
|
374
|
+
phase < 0.5 ? 1-(phase-0.25)*4 :
|
375
|
+
phase < 0.75 ? 0-(phase-0.5)*4 :
|
376
|
+
-1+(phase-0.75)*4;
|
377
|
+
break;
|
378
|
+
case "square":
|
379
|
+
value = (phase < 0.5 ? 1 : -1);
|
380
|
+
break;
|
381
|
+
default:
|
382
|
+
</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>unknown wave_type: </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_wave_type'>wave_type</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>;
|
383
|
+
}
|
384
|
+
values[n] = value * vol;
|
385
|
+
}
|
386
|
+
}
|
387
|
+
snd['$decoded='](myArrayBuffer);
|
388
|
+
resolve();
|
389
|
+
});
|
390
|
+
</span><span class='tstring_end'>}</span></span>
|
391
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_snd'>snd</span><span class='comma'>,</span> <span class='id identifier rubyid_snd_promise'>snd_promise</span>
|
392
|
+
<span class='kw'>end</span></pre>
|
393
|
+
</td>
|
394
|
+
</tr>
|
395
|
+
</table>
|
396
|
+
</div>
|
397
|
+
|
398
|
+
</div>
|
399
|
+
|
400
|
+
<div id="instance_method_details" class="method_details_list">
|
401
|
+
<h2>Instance Method Details</h2>
|
402
|
+
|
403
|
+
|
404
|
+
<div class="method_details first">
|
405
|
+
<h3 class="signature first" id="add-instance_method">
|
406
|
+
|
407
|
+
#<strong>add</strong>(wave_type = WAVE_RECT, resolution = 1000) ⇒ <tt>Object</tt>
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
</h3><table class="source_code">
|
414
|
+
<tr>
|
415
|
+
<td>
|
416
|
+
<pre class="lines">
|
417
|
+
|
418
|
+
|
419
|
+
81
|
420
|
+
82</pre>
|
421
|
+
</td>
|
422
|
+
<td>
|
423
|
+
<pre class="code"><span class="info file"># File 'opal/dxopal/sound_effect.rb', line 81</span>
|
424
|
+
|
425
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='id identifier rubyid_wave_type'>wave_type</span><span class='op'>=</span><span class='const'>WAVE_RECT</span><span class='comma'>,</span> <span class='id identifier rubyid_resolution'>resolution</span><span class='op'>=</span><span class='int'>1000</span><span class='rparen'>)</span>
|
426
|
+
<span class='kw'>end</span></pre>
|
427
|
+
</td>
|
428
|
+
</tr>
|
429
|
+
</table>
|
430
|
+
</div>
|
431
|
+
|
432
|
+
</div>
|
433
|
+
|
434
|
+
</div>
|
435
|
+
|
436
|
+
<div id="footer">
|
437
|
+
Generated on Tue Oct 17 13:56:28 2017 by
|
438
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
439
|
+
0.9.9 (ruby-2.4.2).
|
440
|
+
</div>
|
441
|
+
|
442
|
+
</div>
|
443
|
+
</body>
|
444
|
+
</html>
|
@@ -0,0 +1,130 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: DXOpal::SoundEffect::WaveTypes
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "DXOpal::SoundEffect::WaveTypes";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (W)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../DXOpal.html" title="DXOpal (module)">DXOpal</a></span></span> » <span class='title'><span class='object_link'><a href="../SoundEffect.html" title="DXOpal::SoundEffect (class)">SoundEffect</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">WaveTypes</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: DXOpal::SoundEffect::WaveTypes
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>opal/dxopal/sound_effect.rb</dd>
|
82
|
+
</dl>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
<h2>Constant Summary</h2>
|
88
|
+
<dl class="constants">
|
89
|
+
|
90
|
+
<dt id="WAVE_SIN-constant" class="">WAVE_SIN =
|
91
|
+
|
92
|
+
</dt>
|
93
|
+
<dd><pre class="code"><span class='symbol'>:sine</span></pre></dd>
|
94
|
+
|
95
|
+
<dt id="WAVE_SAW-constant" class="">WAVE_SAW =
|
96
|
+
|
97
|
+
</dt>
|
98
|
+
<dd><pre class="code"><span class='symbol'>:sawtooth</span></pre></dd>
|
99
|
+
|
100
|
+
<dt id="WAVE_TRI-constant" class="">WAVE_TRI =
|
101
|
+
|
102
|
+
</dt>
|
103
|
+
<dd><pre class="code"><span class='symbol'>:triangle</span></pre></dd>
|
104
|
+
|
105
|
+
<dt id="WAVE_RECT-constant" class="">WAVE_RECT =
|
106
|
+
|
107
|
+
</dt>
|
108
|
+
<dd><pre class="code"><span class='symbol'>:square</span></pre></dd>
|
109
|
+
|
110
|
+
</dl>
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
</div>
|
121
|
+
|
122
|
+
<div id="footer">
|
123
|
+
Generated on Tue Oct 17 13:56:27 2017 by
|
124
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
125
|
+
0.9.9 (ruby-2.4.2).
|
126
|
+
</div>
|
127
|
+
|
128
|
+
</div>
|
129
|
+
</body>
|
130
|
+
</html>
|