MCPcopy Create free account
hub / github.com/AlexandreRouma/SDRPlusPlus / basebandMenu

Method basebandMenu

misc_modules/recorder/src/main.cpp:230–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers 1

menuHandlerMethod · 0.80

Calls 6

beginDisabledFunction · 0.85
ImVec2Function · 0.85
gmtimeFunction · 0.85
ImVec4Class · 0.85
endDisabledFunction · 0.85
pathIsValidMethod · 0.45

Tested by

no test coverage detected