diff --git a/Pro_Audio.au3 b/Pro_Audio.au3 index 096fa4e4fd34529aa966ae8d1ba593f1fa872454..74b2030a3476d0855b51250842314b80d82752d3 100644 --- a/Pro_Audio.au3 +++ b/Pro_Audio.au3 @@ -3,7 +3,7 @@ #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Res_Comment=Converting to wav with 48kHz 16bit. #AutoIt3Wrapper_Res_Description=Converting to wav with 48kHz 16bit. -#AutoIt3Wrapper_Res_Fileversion=1.1.0.22 +#AutoIt3Wrapper_Res_Fileversion=1.1.0.23 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p #AutoIt3Wrapper_Res_CompanyName=Norddeutscher Rundfunk #AutoIt3Wrapper_Res_LegalCopyright=Conrad Zelck @@ -33,6 +33,9 @@ GUICtrlCreateLabel("Analyse...", 20, 20, 130, 30) GUICtrlSetFont(-1, 14, 400, 0, "Lucida Sans Typewriter") GUISetState() +Global $g_24bit = False ; for Ingest it is necessary to have 16 bit; that is default; when really pro have '24' in script name +If StringInStr(@ScriptName, "24") Then $g_24bit = True + Opt("GUICloseOnESC", 0) FileInstall('K:\ffmpeg\bin\ffmpeg.exe', @TempDir & "\ffmpeg.exe", $FC_OVERWRITE) Local $sPathFFmpeg = @TempDir & "\" @@ -130,8 +133,13 @@ For $i = 1 To $aFileList[0] GUICtrlSetData($idLabelFileName, $i & "/" & $aFileList[0] & ": " & _FileName($sCurTrack)) $iDelimiter = StringInStr($sCurTrack, ".", 0, -1) $sCurTrackMinusExt = StringLeft($sCurTrack, $iDelimiter - 1) - $sCurTrackNewExt = '_48kHz_16bit.wav' - $sCommand = '-i "' & $sCurTrack & '" -c:a pcm_s16le -ar 48000 -y "' & $sCurTrackMinusExt & $sCurTrackNewExt & '"' + If $g_24bit Then + $sCurTrackNewExt = '_48kHz_24bit.wav' + $sCommand = '-i "' & $sCurTrack & '" -c:a pcm_s24le -ar 48000 -y "' & $sCurTrackMinusExt & $sCurTrackNewExt & '"' + Else + $sCurTrackNewExt = '_48kHz_16bit.wav' + $sCommand = '-i "' & $sCurTrack & '" -c:a pcm_s16le -ar 48000 -y "' & $sCurTrackMinusExt & $sCurTrackNewExt & '"' + EndIf _runFFmpeg('ffmpeg ' & $sCommand, $sPathFFmpeg) GUICtrlSetData($g_idProgress, 100) ; if ffmpeg is done than set progress to 100 - sometimes last StderrRead with 100 is missed Next