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 } ;
2323var tabs = { 65535 :[ "t0" , "All Methods" ] , 2 :[ "t2" , "Instance Methods" ] , 8 :[ "t4" , "Concrete Methods" ] } ;
2424var altColor = "altColor" ;
2525var 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 > ​(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 >
409409< td class ="colLast "> </ 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 > ​(int frameIndex,
424+ int channelIndex)</ code > </ th >
425+ < td class ="colLast "> </ 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 > ​(int frames)</ code > </ th >
424430< td class ="colLast "> </ 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 > ​(int frames,
429435boolean 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 > ​(float rate,
445451float 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 > ​(float[] 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 > ​(int index,
469475float value)</ code > </ th >
470476< td class ="colLast "> </ 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 > ​(int startFrame,
475481float[] 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 > < 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 >
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 > < 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 >
10441069</ dl >
10451070</ section >
10461071</ li >
0 commit comments