File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -108,13 +108,12 @@ public uint Binpos(uint sample) =>
108
108
public float [ ] GetData ( uint startsample , uint length , int [ ] channelList )
109
109
{
110
110
if ( startsample + length > nsample ) throw new ArgumentOutOfRangeException ( nameof ( startsample ) ) ;
111
- if ( channelList == null ) channelList = Enumerable . Range ( 0 , ( int ) nchan ) . ToArray ( ) ;
112
- if ( channelList . Any ( i => i >= nchan ) )
111
+ channelList ?? = Enumerable . Range ( 0 , ( int ) nchan ) . ToArray ( ) ;
112
+ if ( channelList . Any ( i => i >= nchan || i < 0 ) )
113
113
throw new ArgumentOutOfRangeException ( nameof ( channelList ) ) ;
114
114
var res = new float [ channelList . Length * length ] ;
115
115
116
116
const double multiplier = 2400000 / ( 6.0 * 8388607 ) ;
117
- //const double multiplier = 1; // Test: get raw values
118
117
infile . Seek ( Binpos ( startsample ) , SeekOrigin . Begin ) ;
119
118
var chanlen = channelList . Length ;
120
119
var buffer = new byte [ Samplesize ( ) ] ;
You can’t perform that action at this time.
0 commit comments