public void WeHackAroundUnicodePathProblemsInWindowsSox() { if (!AppConfigHelper.IsWindows) { return; } var sox = new SoxAudioUtility( AppConfigHelper.SoxExe.ToFileInfo(), this.outputDirectory, enableShortNameHack: false); // create a file we know sox can't handle var fixture = "different_channels_tone.wav"; var fixtureAsset = PathHelper.ResolveAsset(fixture); var path = this.outputDirectory.CombineFile("🤷♂️20180616_145526😂.wav"); fixtureAsset.CopyTo(path.FullName); // SoX should fail - if it ever doesn't fail here we can remove // the short name/unicode hack Assert.ThrowsException <AudioUtilityException>( () => sox.Info(path)); // and with the hack it should work sox = new SoxAudioUtility( AppConfigHelper.SoxExe.ToFileInfo(), this.outputDirectory, enableShortNameHack: true); var actual = sox.Info(path); TestHelper.CheckAudioUtilityInfo(TestHelper.AudioDetails[fixture], actual); }
public static IAudioUtility GetAudioUtilitySox() { var soxExe = PathHelper.GetExe(AppConfigHelper.SoxExe); var sox = new SoxAudioUtility(soxExe); return(sox); }
public static IAudioUtility GetAudioUtilitySox() { var soxExe = AppConfigHelper.SoxExe?.ToFileInfo(); var sox = new SoxAudioUtility(soxExe); return(sox); }
public static IAudioUtility GetAudioUtility() { var ffmpegExe = new FileInfo(AppConfigHelper.FfmpegExe); var ffmpeg = new FfmpegAudioUtility(ffmpegExe, new FileInfo(AppConfigHelper.FfprobeExe)); var ffmpegRawPcm = new FfmpegRawPcmAudioUtility(ffmpegExe); var mp3Splt = new Mp3SpltAudioUtility(new FileInfo(AppConfigHelper.Mp3SpltExe)); var wvunpack = new WavPackAudioUtility(new FileInfo(AppConfigHelper.WvunpackExe)); var sox = new SoxAudioUtility(new FileInfo(AppConfigHelper.SoxExe)); return(new MasterAudioUtility(ffmpeg, mp3Splt, wvunpack, sox, ffmpegRawPcm, PathHelper.GetTempDir())); }
public static IAudioUtility GetAudioUtility() { var ffmpegExe = new FileInfo(AppConfigHelper.FfmpegExe); var ffmpeg = new FfmpegAudioUtility(ffmpegExe, AppConfigHelper.FfprobeExe.ToFileInfo()); var ffmpegRawPcm = new FfmpegRawPcmAudioUtility(ffmpegExe); var wvunpack = AppConfigHelper.WvunpackExe; var wvunpackUtility = wvunpack != null ? new WavPackAudioUtility(wvunpack.ToFileInfo()) : null; var sox = new SoxAudioUtility(AppConfigHelper.SoxExe.ToFileInfo()); return(new MasterAudioUtility(ffmpeg, wvunpackUtility, sox, ffmpegRawPcm, PathHelper.GetTempDir())); }