19
19
< script type ="text/javascript " src ="../../script-dir/jquery-ui.js "> </ script >
20
20
</ head >
21
21
< 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 } ;
23
23
var tabs = { 65535 :[ "t0" , "All Methods" ] , 2 :[ "t2" , "Instance Methods" ] , 8 :[ "t4" , "Concrete Methods" ] } ;
24
24
var altColor = "altColor" ;
25
25
var rowColor = "rowColor" ;
@@ -405,7 +405,7 @@ <h2>Method Summary</h2>
405
405
</ tr >
406
406
< tr class ="rowColor " id ="i29 ">
407
407
< td class ="colFirst "> < code > float</ code > </ td >
408
- < th class ="colSecond " scope ="row "> < code > < span class ="memberNameLink "> < a href ="#read(int) "> read</ a > </ span > ​(int index )</ code > </ th >
408
+ < th class ="colSecond " scope ="row "> < code > < span class ="memberNameLink "> < a href ="#read(int) "> read</ a > </ span > ​(int frameIndex )</ code > </ th >
409
409
< td class ="colLast "> </ td >
410
410
</ tr >
411
411
< tr class ="altColor " id ="i30 ">
@@ -419,11 +419,17 @@ <h2>Method Summary</h2>
419
419
</ td >
420
420
</ tr >
421
421
< 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 > ​(int frameIndex,
424
+ int channelIndex)</ code > </ th >
425
+ < td class ="colLast "> </ td >
426
+ </ tr >
427
+ < tr class ="altColor " id ="i32 ">
422
428
< td class ="colFirst "> < code > void</ code > </ td >
423
429
< th class ="colSecond " scope ="row "> < code > < span class ="memberNameLink "> < a href ="#resize(int) "> resize</ a > </ span > ​(int frames)</ code > </ th >
424
430
< td class ="colLast "> </ td >
425
431
</ tr >
426
- < tr class ="altColor " id ="i32 ">
432
+ < tr class ="rowColor " id ="i33 ">
427
433
< td class ="colFirst "> < code > void</ code > </ td >
428
434
< th class ="colSecond " scope ="row "> < code > < span class ="memberNameLink "> < a href ="#resize(int,boolean) "> resize</ a > </ span > ​(int frames,
429
435
boolean stereo)</ code > </ th >
@@ -432,14 +438,14 @@ <h2>Method Summary</h2>
432
438
frames.</ div >
433
439
</ td >
434
440
</ tr >
435
- < tr class ="rowColor " id ="i33 ">
441
+ < tr class ="altColor " id ="i34 ">
436
442
< td class ="colFirst "> < code > int</ code > </ td >
437
443
< th class ="colSecond " scope ="row "> < code > < span class ="memberNameLink "> < a href ="#sampleRate() "> sampleRate</ a > </ span > ()</ code > </ th >
438
444
< td class ="colLast ">
439
445
< div class ="block "> Returns the underlying sample rate of the audiosample.</ div >
440
446
</ td >
441
447
</ tr >
442
- < tr class ="altColor " id ="i34 ">
448
+ < tr class ="rowColor " id ="i35 ">
443
449
< td class ="colFirst "> < code > void</ code > </ td >
444
450
< th class ="colSecond " scope ="row "> < code > < span class ="memberNameLink "> < a href ="#set(float,float,float,float) "> set</ a > </ span > ​(float rate,
445
451
float pos,
@@ -449,27 +455,27 @@ <h2>Method Summary</h2>
449
455
< div class ="block "> Set multiple parameters at once</ div >
450
456
</ td >
451
457
</ tr >
452
- < tr class ="rowColor " id ="i35 ">
458
+ < tr class ="altColor " id ="i36 ">
453
459
< td class ="colFirst "> < code > void</ code > </ td >
454
460
< th class ="colSecond " scope ="row "> < code > < span class ="memberNameLink "> < a href ="#stop() "> stop</ a > </ span > ()</ code > </ th >
455
461
< td class ="colLast ">
456
462
< div class ="block "> Stops the playback.</ div >
457
463
</ td >
458
464
</ tr >
459
- < tr class ="altColor " id ="i36 ">
465
+ < tr class ="rowColor " id ="i37 ">
460
466
< td class ="colFirst "> < code > void</ code > </ td >
461
467
< th class ="colSecond " scope ="row "> < code > < span class ="memberNameLink "> < a href ="#write(float%5B%5D) "> write</ a > </ span > ​(float[] data)</ code > </ th >
462
468
< td class ="colLast ">
463
469
< div class ="block "> Overwrite the sample with the data from the given array.</ div >
464
470
</ td >
465
471
</ tr >
466
- < tr class ="rowColor " id ="i37 ">
472
+ < tr class ="altColor " id ="i38 ">
467
473
< td class ="colFirst "> < code > void</ code > </ td >
468
474
< th class ="colSecond " scope ="row "> < code > < span class ="memberNameLink "> < a href ="#write(int,float) "> write</ a > </ span > ​(int index,
469
475
float value)</ code > </ th >
470
476
< td class ="colLast "> </ td >
471
477
</ tr >
472
- < tr class ="altColor " id ="i38 ">
478
+ < tr class ="rowColor " id ="i39 ">
473
479
< td class ="colFirst "> < code > void</ code > </ td >
474
480
< th class ="colSecond " scope ="row "> < code > < span class ="memberNameLink "> < a href ="#write(int,float%5B%5D,int,int) "> write</ a > </ span > ​(int startFrame,
475
481
float[] data,
@@ -1034,13 +1040,32 @@ <h3><a id="read(int,float[],int,int)">read</a></h3>
1034
1040
< li class ="blockList ">
1035
1041
< section class ="detail ">
1036
1042
< h3 > < a id ="read(int) "> read</ a > </ h3 >
1037
- < div class ="memberSignature "> < span class ="modifiers "> public</ span > < span class ="returnType "> float</ span > < span class ="memberName "> read</ span > ​(< span class ="arguments "> int index )</ span > </ div >
1043
+ < div class ="memberSignature "> < span class ="modifiers "> public</ span > < span class ="returnType "> float</ span > < span class ="memberName "> read</ span > ​(< span class ="arguments "> int frameIndex )</ span > </ div >
1038
1044
< dl >
1039
1045
< 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 >
1042
1054
< 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 > < span class ="returnType "> float</ span > < span class ="memberName "> read</ span > ​(< span class ="arguments "> int frameIndex,
1063
+ int 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 >
1044
1069
</ dl >
1045
1070
</ section >
1046
1071
</ li >
0 commit comments