From d4433cc888c9bde33c6366e12a529c130fd85f7a Mon Sep 17 00:00:00 2001 From: ScriptTiger Date: Wed, 9 Oct 2024 21:36:53 +0800 Subject: [PATCH] Fixed broken pipes - Some software, like FFmpeg, will only accept temporary sizes of 0xFFFFFFFF --- README.md | 2 +- go.mod | 11 +++++++++++ go.sum | 7 +++++++ ref/Build.cmd | 17 +---------------- 4 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 go.sum diff --git a/README.md b/README.md index ce57347..9140c54 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Argument | Description `-bits ` | Bit depth of mix WAV file (16\|24\|32) `-attenuate` | Attenuate linearly to prevent clipping, dividing by number of tracks mixed -If no output file is given, or `-` is given, the mix is written to standard output with a bit depth of 24 and can be piped into VLC or other compatible media applications. +If no output file is given, or `-` is given, the mix is written to standard output with a bit depth of 24 and can be piped into FFmpeg, FFplay, VLC, or other compatible media applications. Attenuating linearly is best done when going from source tracks of lower bit depths to mixes of higher bit depths to diminish resolution loss. This will result in an output mix which will always be perceptually "quieter," but still retain better resolution than if it were a mix of the same or lower bit depth as the original tracks. This is because the mix itself, and attenuation division, is performed in 64-bit floating point and results in trailing digits behind a decimal which will be removed when the mix track is truncated to its destination bit depth, of 32 bits or lower, signed and not floating point. So, mixing to higher bit depths than the original will scale some of that data which would otherwise be behind the decimal to in front of the decimal and preserve it in the resulting mix. diff --git a/go.mod b/go.mod index fa3beb8..1e3fb12 100644 --- a/go.mod +++ b/go.mod @@ -1 +1,12 @@ module github.com/ScriptTiger/mixerInG + +go 1.23.0 + +replace github.com/go-audio/wav => github.com/ScriptTiger/wav v0.0.0-20241009130152-f2b055a7031c + +require ( + github.com/go-audio/audio v1.0.0 + github.com/go-audio/wav v0.0.0-20181013172942-de841e69b884 +) + +require github.com/go-audio/riff v1.0.0 // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..91c8e80 --- /dev/null +++ b/go.sum @@ -0,0 +1,7 @@ +github.com/ScriptTiger/wav v0.0.0-20241009130152-f2b055a7031c h1:VVBkoMERw8nWSNPCXmnK/rA+hKURU7+2gomWDWleLi4= +github.com/ScriptTiger/wav v0.0.0-20241009130152-f2b055a7031c/go.mod h1:bp2870jtp/ixAJLIOdShBfl1WpyLGDZ57jnVWMgkgIc= +github.com/go-audio/aiff v1.0.0/go.mod h1:Kazp+9JR/Y1ITCXaDlO6OIIOrz6eGGAn+dGT04V4HPM= +github.com/go-audio/audio v1.0.0 h1:zS9vebldgbQqktK4H0lUqWrG8P0NxCJVqcj7ZpNnwd4= +github.com/go-audio/audio v1.0.0/go.mod h1:6uAu0+H2lHkwdGsAY+j2wHPNPpPoeg5AaEFh9FlA+Zs= +github.com/go-audio/riff v1.0.0 h1:d8iCGbDvox9BfLagY94fBynxSPHO80LmZCaOsmKxokA= +github.com/go-audio/riff v1.0.0/go.mod h1:l3cQwc85y79NQFCRB7TiPoNiaijp6q8Z0Uv38rVG498= diff --git a/ref/Build.cmd b/ref/Build.cmd index b722172..211bd37 100644 --- a/ref/Build.cmd +++ b/ref/Build.cmd @@ -3,16 +3,6 @@ set APP=mixerInG if not exist "Release" md "Release" -cd .. - -if not exist go.sum ( - echo Initializing go.mod... - go mod init github.com/ScriptTiger/%APP% 2> nul - go mod tidy 2> nul -) - -cd ref - choice /m "Dev build?" if %errorlevel% == 1 (set dev=1) else set dev=0 @@ -25,12 +15,7 @@ set GOARCH=386 call :Build_OS :Exit -choice /m "Clean up go.mod before exiting?" -if %errorlevel% == 1 ( - cd .. - del go.sum - echo module github.com/ScriptTiger/%APP%>go.mod -) +pause exit /b :Build_OS