-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
40 lines (28 loc) · 830 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from clipper import Clipper
from recorder import Recorder
from ui import UI
from PyQt5.QtWidgets import QApplication
import sys
import time
def main():
# Load recorder config from file and update displayed status on UI
recr = Recorder()
recr.read_config()
recr.update_status()
# Load clipper config from file and update displayed status on UI
clpr = Clipper()
clpr.read_config()
clpr.update_status()
app = QApplication(sys.argv)
app.setApplicationName('Live Audio Tool')
app.setApplicationDisplayName('Live Audio Tool')
ex = UI(clpr, recr)
ex.show()
app.exec_()
# Ensure recorder is stopped
recr.is_recording = False
# Wait to ensure all clip exports are finished
time.sleep(clpr.post_buffer)
sys.exit()
if __name__ == "__main__":
main()