(dataType: string)
| 134 | } |
| 135 | |
| 136 | export function dataTypeToBytesPerIQSample(dataType: string): number { |
| 137 | // remember there are 2 numbers per IQ sample |
| 138 | if (dataType.includes('8')) { |
| 139 | return 2; |
| 140 | } else if (dataType.includes('16')) { |
| 141 | return 4; |
| 142 | } else if (dataType.includes('32')) { |
| 143 | return 8; |
| 144 | } else if (dataType.includes('64')) { |
| 145 | return 16; |
| 146 | } else { |
| 147 | console.error('unsupported datatype'); |
| 148 | return 2; |
| 149 | } |
| 150 | } |
no outgoing calls
no test coverage detected