mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Refactoring codecs infrastructure:
AudioWriterSettings passed to IAdioDest constructors now AudioWriterSettings now includes AudioPCMConfig
This commit is contained in:
@@ -79,7 +79,7 @@ namespace CUETools.TestCodecs
|
||||
AudioBuffer buff = WAVReader.ReadAllSamples("test.wav", null);
|
||||
ALACWriter target;
|
||||
|
||||
target = new ALACWriter("alacwriter1.m4a", null, buff.PCM);
|
||||
target = new ALACWriter("alacwriter1.m4a", null, new ALACWriterSettings() { PCM = buff.PCM });
|
||||
target.Settings.Padding = 1;
|
||||
target.Vendor = "CUETools";
|
||||
target.CreationTime = DateTime.Parse("15 Aug 1976");
|
||||
@@ -88,7 +88,7 @@ namespace CUETools.TestCodecs
|
||||
target.Close();
|
||||
CollectionAssert.AreEqual(File.ReadAllBytes("alac.m4a"), File.ReadAllBytes("alacwriter1.m4a"), "alacwriter1.m4a doesn't match.");
|
||||
|
||||
target = new ALACWriter("alacwriter0.m4a", null, buff.PCM);
|
||||
target = new ALACWriter("alacwriter0.m4a", null, new ALACWriterSettings() { PCM = buff.PCM });
|
||||
target.Settings.Padding = 1;
|
||||
target.Vendor = "CUETools";
|
||||
target.CreationTime = DateTime.Parse("15 Aug 1976");
|
||||
|
||||
@@ -336,13 +336,13 @@ namespace CUETools.TestCodecs
|
||||
AudioBuffer buff = WAVReader.ReadAllSamples("test.wav", null);
|
||||
WAVWriter target;
|
||||
|
||||
target = new WAVWriter("wavwriter0.wav", null, buff.PCM);
|
||||
target = new WAVWriter("wavwriter0.wav", null, new WAVWriterSettings(buff.PCM));
|
||||
//target.FinalSampleCount = buff.Length;
|
||||
target.Write(buff);
|
||||
target.Close();
|
||||
CollectionAssert.AreEqual(File.ReadAllBytes("test.wav"), File.ReadAllBytes("wavwriter0.wav"), "wavwriter0.wav doesn't match.");
|
||||
|
||||
target = new WAVWriter("wavwriter1.wav", null, buff.PCM);
|
||||
target = new WAVWriter("wavwriter1.wav", null, new WAVWriterSettings(buff.PCM));
|
||||
target.FinalSampleCount = buff.Length;
|
||||
target.Write(buff);
|
||||
target.Close();
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace CUETools.TestCodecs
|
||||
AudioBuffer buff = WAVReader.ReadAllSamples("test.wav", null);
|
||||
FLACWriter target;
|
||||
|
||||
target = new FLACWriter("flacwriter2.flac", buff.PCM);
|
||||
target = new FLACWriter("flacwriter2.flac", new FLACWriterSettings() { PCM = buff.PCM });
|
||||
target.Settings.Padding = 1;
|
||||
target.Settings.BlockSize = 32;
|
||||
//target.Vendor = "CUETools";
|
||||
|
||||
@@ -73,31 +73,31 @@ namespace CUETools.TestCodecs
|
||||
/// <summary>
|
||||
///A test for FlakeWriter (string, int, int, int, Stream)
|
||||
///</summary>
|
||||
[TestMethod()]
|
||||
public void ConstructorTest()
|
||||
{
|
||||
AudioBuffer buff = WAVReader.ReadAllSamples("test.wav", null);
|
||||
FlakeWriter target;
|
||||
[TestMethod()]
|
||||
public void ConstructorTest()
|
||||
{
|
||||
AudioBuffer buff = WAVReader.ReadAllSamples("test.wav", null);
|
||||
FlakeWriter target;
|
||||
|
||||
target = new FlakeWriter("flakewriter0.flac", null, buff.PCM);
|
||||
target.Settings.Padding = 1;
|
||||
target.DoSeekTable = false;
|
||||
//target.Vendor = "CUETools";
|
||||
//target.CreationTime = DateTime.Parse("15 Aug 1976");
|
||||
target.FinalSampleCount = buff.Length;
|
||||
target.Write(buff);
|
||||
target.Close();
|
||||
CollectionAssert.AreEqual(File.ReadAllBytes("flake.flac"), File.ReadAllBytes("flakewriter0.flac"), "flakewriter0.flac doesn't match.");
|
||||
target = new FlakeWriter("flakewriter0.flac", null, new FlakeWriterSettings() { PCM = buff.PCM });
|
||||
target.Settings.Padding = 1;
|
||||
target.DoSeekTable = false;
|
||||
//target.Vendor = "CUETools";
|
||||
//target.CreationTime = DateTime.Parse("15 Aug 1976");
|
||||
target.FinalSampleCount = buff.Length;
|
||||
target.Write(buff);
|
||||
target.Close();
|
||||
CollectionAssert.AreEqual(File.ReadAllBytes("flake.flac"), File.ReadAllBytes("flakewriter0.flac"), "flakewriter0.flac doesn't match.");
|
||||
|
||||
target = new FlakeWriter("flakewriter1.flac", null, buff.PCM);
|
||||
target.Settings.Padding = 1;
|
||||
target.DoSeekTable = false;
|
||||
//target.Vendor = "CUETools";
|
||||
//target.CreationTime = DateTime.Parse("15 Aug 1976");
|
||||
target.Write(buff);
|
||||
target.Close();
|
||||
CollectionAssert.AreEqual(File.ReadAllBytes("flake.flac"), File.ReadAllBytes("flakewriter1.flac"), "flakewriter1.flac doesn't match.");
|
||||
}
|
||||
target = new FlakeWriter("flakewriter1.flac", null, new FlakeWriterSettings() { PCM = buff.PCM });
|
||||
target.Settings.Padding = 1;
|
||||
target.DoSeekTable = false;
|
||||
//target.Vendor = "CUETools";
|
||||
//target.CreationTime = DateTime.Parse("15 Aug 1976");
|
||||
target.Write(buff);
|
||||
target.Close();
|
||||
CollectionAssert.AreEqual(File.ReadAllBytes("flake.flac"), File.ReadAllBytes("flakewriter1.flac"), "flakewriter1.flac doesn't match.");
|
||||
}
|
||||
|
||||
public static unsafe void
|
||||
compute_schur_reflection(/*const*/ double* autoc, uint max_order,
|
||||
|
||||
Reference in New Issue
Block a user