| 2160 | } |
| 2161 | |
| 2162 | static double audioBufferMs(qsizetype bytes, int sampleRate) |
| 2163 | { |
| 2164 | if (sampleRate <= 0) { |
| 2165 | return 0.0; |
| 2166 | } |
| 2167 | |
| 2168 | static constexpr int kStereoChannels = 2; |
| 2169 | static constexpr int kFloatBytesPerSample = 4; |
| 2170 | return (bytes * 1000.0) / (sampleRate * kStereoChannels * kFloatBytesPerSample); |
| 2171 | } |
| 2172 | |
| 2173 | static QString formatAudioBuffer(qsizetype bytes, int sampleRate) |
| 2174 | { |
no outgoing calls
no test coverage detected