MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / audioBufferMs

Function audioBufferMs

src/gui/NetworkDiagnosticsDialog.cpp:2162–2171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2160}
2161
2162static 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
2173static QString formatAudioBuffer(qsizetype bytes, int sampleRate)
2174{

Callers 3

formatAudioBufferFunction · 0.85
sampleNowMethod · 0.85
refreshMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected