Skip to content
Snippets Groups Projects
Commit 86576b8b authored by Conrad Zelck's avatar Conrad Zelck
Browse files

feat: introduce data export function


Measured data often needed later. So these data should exported as text
file to %temp%.

 - new button 'Export Data'
 - adjust label for measurement data which is to wide

Signed-off-by: default avatarConrad Zelck <git@simpel.cc>
parent 24d6d2b5
No related branches found
No related tags found
No related merge requests found
......@@ -168,11 +168,14 @@ Global $Progress1 = GUICtrlCreateProgress(10, 80, 580, 20)
GUICtrlCreateLabel("Loudness Audio:", 10, 120, 580, 30)
GUICtrlSetFont(-1, 12, 400, 0, "Courier New")
Global $Progress2 = GUICtrlCreateProgress(10, 150, 580, 20)
Global $Edit = GUICtrlCreateLabel("", 10, 200, 420, 90)
Global $Edit = GUICtrlCreateLabel("", 10, 200, 260, 60)
GUICtrlSetFont(-1, 14, 400, 0, "Courier New")
Local $g_hLabelRunningTime = GUICtrlCreateLabel("", 440, 200, 150, 30, $SS_CENTER)
GUICtrlSetFont(-1, 14, 400, 0, "Courier New")
Local $idButton = GUICtrlCreateButton("Copy Data", 440, 230, 150, 30)
Local $idButtonExport = GUICtrlCreateButton("Export Data", 280, 230, 150, 30)
GUICtrlSetFont(-1, 12, 400, 0, "Courier New")
GUICtrlSetState(-1, $GUI_DISABLE)
Local $idButtonCopy = GUICtrlCreateButton("Copy Data", 440, 230, 150, 30)
GUICtrlSetFont(-1, 12, 400, 0, "Courier New")
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
......@@ -197,7 +200,8 @@ Else
GUICtrlSetData($Progress2, 100) ; if ffmpeg is done than set progress to 100 - sometimes last StderrRead with 100 is missed
GUICtrlSetData($Edit, _GetR128($g_sStdErrAll))
GUICtrlSetState($idButton, $GUI_ENABLE)
GUICtrlSetState($idButtonExport, $GUI_ENABLE)
GUICtrlSetState($idButtonCopy, $GUI_ENABLE)
EndIf
WinActivate("R128","")
......@@ -205,7 +209,9 @@ While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idButton
Case $idButtonExport
FileWrite(@TempDir & '\' & $sOutputFileWithoutExtension & '.txt', $sFile & @CRLF & @CRLF & GUICtrlRead($Edit) & @CRLF & @CRLF & "measurement time: " & StringRegExpReplace(GUICtrlRead($g_hLabelRunningTime), "\W", ""))
Case $idButtonCopy
ClipPut($sFile & @CRLF & @CRLF & GUICtrlRead($Edit) & @CRLF & @CRLF & "measurement time: " & StringRegExpReplace(GUICtrlRead($g_hLabelRunningTime), "\W", ""))
EndSwitch
WEnd
......
......@@ -13,7 +13,7 @@ If there are more then one stereo or two mono tracks you get a popup to choose t
The choosen tracks are first extracted to `%temp%` in 24bit and 48kHz.
Progress is shown in the gui.
Then it measures this wave file. If ready you can copy the result to the clipboard.
Then it measures this wave file. If ready you can copy the result to the clipboard or export the data as text file to `%temp%`.
![GUI](./images/gui.png)
......
images/gui.png

8.9 KiB | W: | H:

images/gui.png

9.9 KiB | W: | H:

images/gui.png
images/gui.png
images/gui.png
images/gui.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment