(times)
| 72 | |
| 73 | |
| 74 | def sample_rate_from_times(times): |
| 75 | # Derive the capture rate from the Elapsed (s) column so the user does not |
| 76 | # have to know it up front. Needs at least two samples and a positive span. |
| 77 | if len(times) < 2: |
| 78 | return None |
| 79 | |
| 80 | span = times[-1] - times[0] |
| 81 | if span <= 0.0: |
| 82 | return None |
| 83 | |
| 84 | return int(round((len(times) - 1) / span)) |
| 85 | |
| 86 | |
| 87 | def decode_input_to_float(audio, in_format): |
no test coverage detected