18static void paintSCC(
const SCC& scc)
21 const auto& waveData = scc.getWaveData();
22 for (auto [channelNr, channelWaveData] : enumerate(waveData)) {
23 auto getFloatData = [](void* data, int idx) {
24 return float(static_cast<const int8_t*>(data)[idx]);
26 const auto scale = 2.0f;
27 auto size = scale * gl::vec2{32.0f, 64.0f} + 2.0f * gl::vec2(ImGui::GetStyle().FramePadding);
28 ImGui::PlotHistogram(tmpStrCat(
"##sccWave", channelNr).c_str(),
30 const_cast<int8_t*>(channelWaveData.data()),
31 narrow<int>(channelWaveData.size()),
35 if (channelNr < (waveData.size() - 1)) ImGui::SameLine();
43 if (!motherBoard)
return;
46 bool noDevices =
true;
48 if (
const auto* device =
dynamic_cast<const SCC*
>(info.device)) {
ImGuiSCCViewer(ImGuiManager &manager)
const auto & getDeviceInfos() const
const std::string & getName() const
Get the unique name that identifies this sound device.
void TextUnformatted(const std::string &str)
void Window(const char *name, bool *p_open, ImGuiWindowFlags flags, std::invocable<> auto next)
bool TreeNode(const char *label, ImGuiTreeNodeFlags flags, std::invocable<> auto next)
This file implemented 3 utility functions: