Skip to content

Commit 8bc3339

Browse files
committed
Update Javadoc
1 parent 23ede78 commit 8bc3339

File tree

7 files changed

+42
-15
lines changed

7 files changed

+42
-15
lines changed

docs/index-all.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,8 @@ <h2 class="title">R</h2>
830830
<dd>
831831
<div class="block">Read some frames of this audio sample into an array.</div>
832832
</dd>
833+
<dt><span class="memberNameLink"><a href="processing/sound/AudioSample.html#read(int,int)">read(int, int)</a></span> - Method in class processing.sound.<a href="processing/sound/AudioSample.html" title="class in processing.sound">AudioSample</a></dt>
834+
<dd>&nbsp;</dd>
833835
<dt><span class="memberNameLink"><a href="processing/sound/SoundFile.html#removeFromCache()">removeFromCache()</a></span> - Method in class processing.sound.<a href="processing/sound/SoundFile.html" title="class in processing.sound">SoundFile</a></dt>
834836
<dd>
835837
<div class="block">Remove this SoundFile's decoded audio sample from the cache, allowing

docs/member-search-index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/member-search-index.zip

8 Bytes
Binary file not shown.

docs/package-search-index.zip

0 Bytes
Binary file not shown.

docs/processing/sound/AudioSample.html

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<script type="text/javascript" src="../../script-dir/jquery-ui.js"></script>
2020
</head>
2121
<body class="class-declaration">
22-
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10};
22+
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10};
2323
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
2424
var altColor = "altColor";
2525
var rowColor = "rowColor";
@@ -405,7 +405,7 @@ <h2>Method Summary</h2>
405405
</tr>
406406
<tr class="rowColor" id="i29">
407407
<td class="colFirst"><code>float</code></td>
408-
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#read(int)">read</a></span>&#8203;(int&nbsp;index)</code></th>
408+
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#read(int)">read</a></span>&#8203;(int&nbsp;frameIndex)</code></th>
409409
<td class="colLast">&nbsp;</td>
410410
</tr>
411411
<tr class="altColor" id="i30">
@@ -419,11 +419,17 @@ <h2>Method Summary</h2>
419419
</td>
420420
</tr>
421421
<tr class="rowColor" id="i31">
422+
<td class="colFirst"><code>float</code></td>
423+
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#read(int,int)">read</a></span>&#8203;(int&nbsp;frameIndex,
424+
int&nbsp;channelIndex)</code></th>
425+
<td class="colLast">&nbsp;</td>
426+
</tr>
427+
<tr class="altColor" id="i32">
422428
<td class="colFirst"><code>void</code></td>
423429
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resize(int)">resize</a></span>&#8203;(int&nbsp;frames)</code></th>
424430
<td class="colLast">&nbsp;</td>
425431
</tr>
426-
<tr class="altColor" id="i32">
432+
<tr class="rowColor" id="i33">
427433
<td class="colFirst"><code>void</code></td>
428434
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resize(int,boolean)">resize</a></span>&#8203;(int&nbsp;frames,
429435
boolean&nbsp;stereo)</code></th>
@@ -432,14 +438,14 @@ <h2>Method Summary</h2>
432438
frames.</div>
433439
</td>
434440
</tr>
435-
<tr class="rowColor" id="i33">
441+
<tr class="altColor" id="i34">
436442
<td class="colFirst"><code>int</code></td>
437443
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sampleRate()">sampleRate</a></span>()</code></th>
438444
<td class="colLast">
439445
<div class="block">Returns the underlying sample rate of the audiosample.</div>
440446
</td>
441447
</tr>
442-
<tr class="altColor" id="i34">
448+
<tr class="rowColor" id="i35">
443449
<td class="colFirst"><code>void</code></td>
444450
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#set(float,float,float,float)">set</a></span>&#8203;(float&nbsp;rate,
445451
float&nbsp;pos,
@@ -449,27 +455,27 @@ <h2>Method Summary</h2>
449455
<div class="block">Set multiple parameters at once</div>
450456
</td>
451457
</tr>
452-
<tr class="rowColor" id="i35">
458+
<tr class="altColor" id="i36">
453459
<td class="colFirst"><code>void</code></td>
454460
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stop()">stop</a></span>()</code></th>
455461
<td class="colLast">
456462
<div class="block">Stops the playback.</div>
457463
</td>
458464
</tr>
459-
<tr class="altColor" id="i36">
465+
<tr class="rowColor" id="i37">
460466
<td class="colFirst"><code>void</code></td>
461467
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(float%5B%5D)">write</a></span>&#8203;(float[]&nbsp;data)</code></th>
462468
<td class="colLast">
463469
<div class="block">Overwrite the sample with the data from the given array.</div>
464470
</td>
465471
</tr>
466-
<tr class="rowColor" id="i37">
472+
<tr class="altColor" id="i38">
467473
<td class="colFirst"><code>void</code></td>
468474
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(int,float)">write</a></span>&#8203;(int&nbsp;index,
469475
float&nbsp;value)</code></th>
470476
<td class="colLast">&nbsp;</td>
471477
</tr>
472-
<tr class="altColor" id="i38">
478+
<tr class="rowColor" id="i39">
473479
<td class="colFirst"><code>void</code></td>
474480
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#write(int,float%5B%5D,int,int)">write</a></span>&#8203;(int&nbsp;startFrame,
475481
float[]&nbsp;data,
@@ -1034,13 +1040,32 @@ <h3><a id="read(int,float[],int,int)">read</a></h3>
10341040
<li class="blockList">
10351041
<section class="detail">
10361042
<h3><a id="read(int)">read</a></h3>
1037-
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">read</span>&#8203;(<span class="arguments">int&nbsp;index)</span></div>
1043+
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">read</span>&#8203;(<span class="arguments">int&nbsp;frameIndex)</span></div>
10381044
<dl>
10391045
<dt><span class="paramLabel">Parameters:</span></dt>
1040-
<dd><code>index</code> - the index of the single frame of the audiosample that should be
1041-
read and returned as a float</dd>
1046+
<dd><code>frameIndex</code> - the index of the single frame of the audiosample that should be
1047+
read and returned. `frameIndex` has to be between 0 and
1048+
`sample.frames() * sample.channels() - 1` (inclusive)`.
1049+
For mono files, `read(frameIndex)` is identical to `read(frameIndex, 0)`.
1050+
For stereo files, unless you also specify a `channelIndex`,
1051+
`read(frameIndex)` will return the samples from both the left and
1052+
right channel in interleaved order. (See the Soundfile > StereoSample
1053+
example for a demonstration.)</dd>
10421054
<dt><span class="returnLabel">Returns:</span></dt>
1043-
<dd>the value of the audio sample at the given frame</dd>
1055+
<dd>float: the value of the audio sample at the given index</dd>
1056+
</dl>
1057+
</section>
1058+
</li>
1059+
<li class="blockList">
1060+
<section class="detail">
1061+
<h3><a id="read(int,int)">read</a></h3>
1062+
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">read</span>&#8203;(<span class="arguments">int&nbsp;frameIndex,
1063+
int&nbsp;channelIndex)</span></div>
1064+
<dl>
1065+
<dt><span class="paramLabel">Parameters:</span></dt>
1066+
<dd><code>channelIndex</code> - the channel from which to extract the frame value (0 for left,
1067+
1 for right). `read(frameIndex, channelIndex)` is the same as
1068+
calling `read(frameIndex * this.channels() + channelIndex)`.</dd>
10441069
</dl>
10451070
</section>
10461071
</li>

docs/processing/sound/SoundFile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ <h2>Method Summary</h2>
328328
<h3>Methods inherited from class&nbsp;processing.sound.<a href="AudioSample.html" title="class in processing.sound">AudioSample</a></h3>
329329
<a id="methods.inherited.from.class.processing.sound.AudioSample">
330330
<!-- -->
331-
</a><code><a href="AudioSample.html#cueFrame(int)">cueFrame</a>, <a href="AudioSample.html#jumpFrame(int)">jumpFrame</a>, <a href="AudioSample.html#percent()">percent</a>, <a href="AudioSample.html#playFor(float)">playFor</a>, <a href="AudioSample.html#playFor(float,float)">playFor</a>, <a href="AudioSample.html#position()">position</a>, <a href="AudioSample.html#positionFrame()">positionFrame</a>, <a href="AudioSample.html#read(float%5B%5D)">read</a>, <a href="AudioSample.html#read(int)">read</a>, <a href="AudioSample.html#read(int,float%5B%5D,int,int)">read</a>, <a href="AudioSample.html#resize(int)">resize</a>, <a href="AudioSample.html#resize(int,boolean)">resize</a>, <a href="AudioSample.html#sampleRate()">sampleRate</a>, <a href="AudioSample.html#set(float,float,float,float)">set</a>, <a href="AudioSample.html#write(float%5B%5D)">write</a>, <a href="AudioSample.html#write(int,float)">write</a>, <a href="AudioSample.html#write(int,float%5B%5D,int,int)">write</a></code></div>
331+
</a><code><a href="AudioSample.html#cueFrame(int)">cueFrame</a>, <a href="AudioSample.html#jumpFrame(int)">jumpFrame</a>, <a href="AudioSample.html#percent()">percent</a>, <a href="AudioSample.html#playFor(float)">playFor</a>, <a href="AudioSample.html#playFor(float,float)">playFor</a>, <a href="AudioSample.html#position()">position</a>, <a href="AudioSample.html#positionFrame()">positionFrame</a>, <a href="AudioSample.html#read(float%5B%5D)">read</a>, <a href="AudioSample.html#read(int)">read</a>, <a href="AudioSample.html#read(int,float%5B%5D,int,int)">read</a>, <a href="AudioSample.html#read(int,int)">read</a>, <a href="AudioSample.html#resize(int)">resize</a>, <a href="AudioSample.html#resize(int,boolean)">resize</a>, <a href="AudioSample.html#sampleRate()">sampleRate</a>, <a href="AudioSample.html#set(float,float,float,float)">set</a>, <a href="AudioSample.html#write(float%5B%5D)">write</a>, <a href="AudioSample.html#write(int,float)">write</a>, <a href="AudioSample.html#write(int,float%5B%5D,int,int)">write</a></code></div>
332332
<div class="inheritedList">
333333
<h3>Methods inherited from class&nbsp;processing.sound.<a href="SoundObject.html" title="class in processing.sound">SoundObject</a></h3>
334334
<a id="methods.inherited.from.class.processing.sound.SoundObject">

docs/type-search-index.zip

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)