diff --git a/ATL.unit-test/IO/MetaData/MetaIOTest.cs b/ATL.unit-test/IO/MetaData/MetaIOTest.cs index e2dd8435..0cfcd608 100644 --- a/ATL.unit-test/IO/MetaData/MetaIOTest.cs +++ b/ATL.unit-test/IO/MetaData/MetaIOTest.cs @@ -404,7 +404,7 @@ public void test_RW_Empty( // Source : totally metadata-free file string location = TestUtils.GetResourceLocationRoot() + fileName; string testFileLocation = TestUtils.CopyAsTempTestFile(fileName); - AudioDataManager theFile = new AudioDataManager(ATL.AudioData.AudioDataIOFactory.GetInstance().GetFromPath(testFileLocation)); + AudioDataManager theFile = new AudioDataManager(AudioDataIOFactory.GetInstance().GetFromPath(testFileLocation)); // Check that it is indeed metadata-free diff --git a/ATL.unit-test/IO/MetaData/SPX.cs b/ATL.unit-test/IO/MetaData/SPX.cs new file mode 100644 index 00000000..97976f0a --- /dev/null +++ b/ATL.unit-test/IO/MetaData/SPX.cs @@ -0,0 +1,52 @@ +using ATL.AudioData; + +namespace ATL.test.IO.MetaData +{ + [TestClass] + public class SPX : MetaIOTest + { + public SPX() + { + emptyFile = "SPX/empty.spx"; + notEmptyFile = "SPX/spx.spx"; + tagType = MetaDataIOFactory.TagType.NATIVE; + + supportsExtraEmbeddedPictures = false; + + testData.EmbeddedPictures.Clear(); + testData.Conductor = null; + testData.Date = DateTime.Parse("1997-06-20"); + testData.PublishingDate = DateTime.Parse("1998-07-21"); + testData.CatalogNumber = "44887733"; + + testData.AdditionalFields = new Dictionary + { + { "TEST", "xxx" }, + { "VORBIS-VENDOR", "Lavf61.1.100" } + }; + } + + [TestMethod] + public void TagIO_R_SPX_simple() + { + new ConsoleLogger(); + + string location = TestUtils.GetResourceLocationRoot() + notEmptyFile; + AudioDataManager theFile = new AudioDataManager(AudioDataIOFactory.GetInstance().GetFromPath(location)); + + readExistingTagsOnFile(theFile); + } + + [TestMethod] + public void TagIO_RW_SPX_Empty() + { + test_RW_Empty(emptyFile, true, true, true, false); + } + + [TestMethod] + public void tagIO_RW_SPX_Existing() + { + test_RW_Existing(notEmptyFile, 0); + } + } +} diff --git a/ATL/AudioData/IO/Ogg.cs b/ATL/AudioData/IO/Ogg.cs index 0bed5291..d826fbbd 100644 --- a/ATL/AudioData/IO/Ogg.cs +++ b/ATL/AudioData/IO/Ogg.cs @@ -926,7 +926,7 @@ public async Task WriteAsync(Stream s, TagData tag, ProgressToken w } else if (CONTENTS_SPEEX == contents) { - vorbisTag.switchOggBehaviour(); + vorbisTag.switchFlacBehaviour(); await vorbisTag.WriteAsync(memStream, tag); } else if (CONTENTS_FLAC == contents)