Audacity 3.2.0
SoundActivatedRecord.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 SoundActivatedRecord.cpp
6
7 Martyn Shaw
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13
14********************************************************************//********************************************************************/
20
21
23
24#include "ShuttleGui.h"
25#include "Prefs.h"
26#include "Decibels.h"
27
31
33: wxDialogWrapper(parent, -1, XO("Sound Activated Record"), wxDefaultPosition,
34 wxDefaultSize, wxCAPTION )
35// wxDefaultSize, wxCAPTION | wxTHICK_FRAME)
36{
37 SetName();
39 PopulateOrExchange(S);
40 Fit();
41 Center();
42}
43
45{
46}
47
49{
50 S.SetBorder(5);
51
52 S.StartVerticalLay();
53 {
54 S.StartMultiColumn(2, wxEXPAND);
55 S.SetStretchyCol(1);
56 S.TieSlider(
57 XXO("Activation level (dB):"),
58 {wxT("/AudioIO/SilenceLevel"), -50},
60 )->SetMinSize(wxSize(300, wxDefaultCoord));
61 S.EndMultiColumn();
62 }
63 S.EndVerticalLay();
64 S.AddStandardButtons();
65}
66
67void SoundActivatedRecordDialog::OnOK(wxCommandEvent & WXUNUSED(event))
68{
71
72 gPrefs->Flush();
73
74 EndModal(0);
75}
76
wxT("CloseDown"))
END_EVENT_TABLE()
IntSetting DecibelScaleCutoff
Negation of this value is the lowest dB level that should be shown in dB scales.
Definition: Decibels.cpp:12
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
XO("Cut/Copy/Paste")
XXO("&Cut/Copy/Paste Toolbar")
FileConfig * gPrefs
Definition: Prefs.cpp:70
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46
@ eIsSavingToPrefs
Definition: ShuttleGui.h:47
#define S(N)
Definition: ToChars.cpp:64
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:200
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:625
Configures sound activated recording.
void OnOK(wxCommandEvent &event)
void PopulateOrExchange(ShuttleGui &S)