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

add error if number of mono tracks is uneven


Signed-off-by: default avatarConrad Zelck <git@simpel.cc>
parent 28b1a9b1
No related branches found
Tags 1.1.0.12
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#AutoIt3Wrapper_Icon=Icons\peakmeter.ico #AutoIt3Wrapper_Icon=Icons\peakmeter.ico
#AutoIt3Wrapper_Res_Comment=Measure loudness with ffmpeg according to R128. #AutoIt3Wrapper_Res_Comment=Measure loudness with ffmpeg according to R128.
#AutoIt3Wrapper_Res_Description=Measure loudness with ffmpeg according to R128. #AutoIt3Wrapper_Res_Description=Measure loudness with ffmpeg according to R128.
#AutoIt3Wrapper_Res_Fileversion=1.1.0.12 #AutoIt3Wrapper_Res_Fileversion=1.1.0.13
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Res_CompanyName=Norddeutscher Rundfunk #AutoIt3Wrapper_Res_CompanyName=Norddeutscher Rundfunk
#AutoIt3Wrapper_Res_LegalCopyright=Conrad Zelck #AutoIt3Wrapper_Res_LegalCopyright=Conrad Zelck
...@@ -92,8 +92,9 @@ If @extended > 0 Then ...@@ -92,8 +92,9 @@ If @extended > 0 Then
$iMonoCount = @extended $iMonoCount = @extended
If $iMonoCount = $aChannels[0] Then If $iMonoCount = $aChannels[0] Then
$iLayout = $eMONO $iLayout = $eMONO
If Mod($iMonoCount, 2) <> 0 Then $iLayout = 0 ; uneven counter
EndIf EndIf
ConsoleWrite("Monofiles: " & @extended & @CRLF) ConsoleWrite("Monofiles: " & $iMonoCount & @CRLF)
EndIf EndIf
StringReplace($sChannels, "2", "2") ; just to get the count StringReplace($sChannels, "2", "2") ; just to get the count
If @extended > 0 Then If @extended > 0 Then
...@@ -101,7 +102,7 @@ If @extended > 0 Then ...@@ -101,7 +102,7 @@ If @extended > 0 Then
If $iStereoCount = $aChannels[0] Then If $iStereoCount = $aChannels[0] Then
$iLayout = $eSTEREO $iLayout = $eSTEREO
EndIf EndIf
ConsoleWrite("Stereofiles: " & @extended & @CRLF) ConsoleWrite("Stereofiles: " & $iStereoCount & @CRLF)
EndIf EndIf
Local $iMeasuringPairs = 0 Local $iMeasuringPairs = 0
Switch $iLayout Switch $iLayout
...@@ -113,7 +114,7 @@ Switch $iLayout ...@@ -113,7 +114,7 @@ Switch $iLayout
ConsoleWrite("All STEREO" & @CRLF) ConsoleWrite("All STEREO" & @CRLF)
Case Else Case Else
ConsoleWrite("UNDEFINED Layout" & @CRLF) ConsoleWrite("UNDEFINED Layout" & @CRLF)
MsgBox($MB_TOPMOST, "Error", "Track layout is undefined." & @CRLF & "Application exits.") MsgBox($MB_TOPMOST, "Error", "Track layout is undefined." & @CRLF & @CRLF & "Application exits.")
Exit Exit
EndSwitch EndSwitch
ConsoleWrite("Pairs for measuring: " & $iMeasuringPairs & @CRLF) ConsoleWrite("Pairs for measuring: " & $iMeasuringPairs & @CRLF)
......
...@@ -3,4 +3,5 @@ This application measures loudness according to EBU R128 with ffmpeg. ...@@ -3,4 +3,5 @@ This application measures loudness according to EBU R128 with ffmpeg.
You can send video or audio files to the app. You can send video or audio files to the app.
Channel layout inside video can be mono or stereo. But mono files will temporarily merge to a stereo file at first. Channel layout inside video can be mono or stereo. But mono files will temporarily merge to a stereo file at first.
If number of mono tracks is uneven it will return an error.
Temporary output.wav is exported to %temp% in 24bit 48kHz. Temporary output.wav is exported to %temp% in 24bit 48kHz.
\ No newline at end of file
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