File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020## Usage
2121```
22- xa-interleaver <input> <stride> <2336/2352 > <output>
22+ xa-interleaver <input> <stride> <size > <output>
2323```
2424```
25- xa-deinterleaver <input> <2336/2352 > <output>
25+ xa-deinterleaver <input> <size > <output>
2626```
2727
2828### Commands
@@ -35,13 +35,13 @@ xa-deinterleaver <input> <2336/2352> <output>
3535Required:
3636```
3737<input> For interleave can be a .csv, .txt, or any text file properly formated.
38- For deinterleave can be any mixed audio file. A CD image file (bin/iso) can work , but is not recommended.
38+ For deinterleave can be any mixed audio file. A .bin CD image file works , but is not recommended.
3939```
4040Optional:
4141```
4242<stride> (Only for interleave) Stride of sectors to interleave, 2/4/8/16/32. Defaults to 8
43- <2336/2352> Output file sector size (2336 or 2352). Defaults to input file (or the first file in the manifest) sector size
44- <output> Optional output file(s) path. Defaults to input file path
43+ <size> Optional output file sector size (2336 or 2352). Defaults to input file (or the first file in the manifest) sector size
44+ <output> Optional output dir/ file path. Defaults to input dir/ file path
4545```
4646Examples:
4747```
Original file line number Diff line number Diff line change 33
44int main (int argc, char *argv[])
55{
6- if (argc < 2 )
6+ if (argc < 2 || strcmp (argv[ 1 ], " -h " ) == 0 || strcmp (argv[ 1 ], " --help " ) == 0 )
77 {
8- printf (" xa-deinterleaver " VER " by N4gtan\n\n " );
9- printf ( " Usage: xa-deinterleaver <input> <2336/2352 > <output>\n\n " );
10- printf ( " Input: XA interleaved file\n " );
11- printf ( " 2336/2352: Output file sector size (2336 or 2352). Defaults to input file sector size\n " );
12- printf ( " Output: Optional output file(s) path. Defaults to input file path\n " );
8+ printf (" xa-deinterleaver " VER " by N4gtan\n\n "
9+ " Usage: xa-deinterleaver <input> <size > <output>\n\n "
10+ " Input: XA interleaved file\n "
11+ " Size: Optional output file sector size (2336 or 2352). Defaults to input file sector size\n "
12+ " Output: Optional output directory path. Defaults to input directory path\n " );
1313 return EXIT_SUCCESS ;
1414 }
1515
Original file line number Diff line number Diff line change 33
44int main (int argc, char *argv[])
55{
6- if (argc < 2 )
6+ if (argc < 2 || strcmp (argv[ 1 ], " -h " ) == 0 || strcmp (argv[ 1 ], " --help " ) == 0 )
77 {
8- printf (" xa-interleaver " VER " by N4gtan\n\n " );
9- printf ( " Usage: xa-interleaver <input> <stride> <2336/2352 > <output>\n\n " );
10- printf ( " Input: Manifest .csv file (or any text file with the appropriate format)\n " );
11- printf ( " Stride: Stride of sectors to interleave. Defaults to 8\n " );
12- printf ( " 2336/2352: Output file sector size (2336 or 2352). Defaults to first file sector size\n " );
13- printf ( " Output: Optional output file path. Defaults to input file path\n " );
8+ printf (" xa-interleaver " VER " by N4gtan\n\n "
9+ " Usage: xa-interleaver <input> <stride> <size > <output>\n\n "
10+ " Input: Manifest .csv file (or any text file with the appropriate format)\n "
11+ " Stride: Optional stride of sectors to interleave (2/4/8/16/32) . Defaults to 8\n "
12+ " Size: Optional output file sector size (2336 or 2352). Defaults to first file sector size\n "
13+ " Output: Optional output file path. Defaults to input file path\n " );
1414 return EXIT_SUCCESS ;
1515 }
1616
@@ -26,7 +26,7 @@ int main(int argc, char *argv[])
2626 return EXIT_FAILURE ;
2727 }
2828
29- const std::filesystem::path outputPath = argc >= 4 ? argv[3 ] : inputFile.stem () += " _NEW.XA" ;
29+ const std::filesystem::path outputPath = argc >= 5 ? argv[4 ] : inputFile. parent_path () / inputFile.stem () += " _NEW.XA" ;
3030 FILE *outputFile = fopen (outputPath.string ().c_str (), " w+b" );
3131 if (!outputFile)
3232 {
You can’t perform that action at this time.
0 commit comments