| 228 | } |
| 229 | |
| 230 | void basebandMenu(float menuColumnWidth) { |
| 231 | if (!folderSelect.pathIsValid()) { style::beginDisabled(); } |
| 232 | if (!recording) { |
| 233 | if (ImGui::Button(CONCAT("Record##_recorder_rec_", name), ImVec2(menuColumnWidth, 0))) { |
| 234 | std::lock_guard lck(recMtx); |
| 235 | startRecording(); |
| 236 | } |
| 237 | ImGui::TextColored(ImGui::GetStyleColorVec4(ImGuiCol_Text), "Idle --:--:--"); |
| 238 | } |
| 239 | else { |
| 240 | if (ImGui::Button(CONCAT("Stop##_recorder_rec_", name), ImVec2(menuColumnWidth, 0))) { |
| 241 | std::lock_guard lck(recMtx); |
| 242 | stopRecording(); |
| 243 | } |
| 244 | uint64_t seconds = samplesWritten / (uint64_t)sampleRate; |
| 245 | time_t diff = seconds; |
| 246 | tm *dtm = gmtime(&diff); |
| 247 | ImGui::TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), "Recording %02d:%02d:%02d", dtm->tm_hour, dtm->tm_min, dtm->tm_sec); |
| 248 | } |
| 249 | if (!folderSelect.pathIsValid()) { style::endDisabled(); } |
| 250 | } |
| 251 | |
| 252 | void audioMenu(float menuColumnWidth) { |
| 253 | ImGui::PushItemWidth(menuColumnWidth); |
no test coverage detected