-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path[X3DAudio HRTF] DEF to MHR.bat
44 lines (34 loc) · 1.12 KB
/
[X3DAudio HRTF] DEF to MHR.bat
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
41
42
43
@ECHO off
setlocal enabledelayedexpansion
IF NOT EXIST Output (
mkdir Output
)
if exist *.def (
for %%i in (*.def) do (
set HRIRFolder=%%~ni
set HRIRFolderID1=!HRIRFolder: [OpenAL Soft]=!
set HRIRFolderID2=!HRIRFolderID1: [X3DAudio HRTF]=!
IF NOT EXIST "Output\!HRIRFolderID2!" (
mkdir "Output\!HRIRFolderID2!"
)
echo Generating "!HRIRFolderID2!-32000.mhr"...
Resources\makehrtf.exe -m -r=32000 -d=sphere -i="%%i" -o="Output\!HRIRFolderID2!\!HRIRFolderID2!-32000.mhr"
echo.
echo Generating "!HRIRFolderID2!-44100.mhr"
Resources\makehrtf.exe -m -r=44100 -d=sphere -i="%%i" -o="Output\!HRIRFolderID2!\!HRIRFolderID2!-44100.mhr"
echo.
echo Generating "!HRIRFolderID2!-48000.mhr"
Resources\makehrtf.exe -m -r=48000 -d=sphere -i="%%i" -o="Output\!HRIRFolderID2!\!HRIRFolderID2!-48000.mhr"
echo.
echo Generating "!HRIRFolderID2!-96000.mhr"
Resources\makehrtf.exe -m -r=96000 -d=sphere -i="%%i" -o="Output\!HRIRFolderID2!\!HRIRFolderID2!-96000.mhr"
echo.
)
echo MHR files have been generated. Continue to the output folder?
pause
start Output
) else (
echo DEF files not found.
pause
exit
)