mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Remove DSF and DSDIFF from master to a feature branch
These can be merged back into master once they're in a more mature state.
This commit is contained in:
@ -26,8 +26,6 @@ INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/s3m
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/it
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/xm
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/dsf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/dsdiff
|
||||
)
|
||||
|
||||
SET(test_runner_SRCS
|
||||
@ -70,8 +68,6 @@ SET(test_runner_SRCS
|
||||
test_mpc.cpp
|
||||
test_opus.cpp
|
||||
test_speex.cpp
|
||||
test_dsf.cpp
|
||||
test_dsdiff.cpp
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CPPUNIT_INCLUDE_DIR})
|
||||
|
@ -1,116 +0,0 @@
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <tag.h>
|
||||
#include <tbytevectorlist.h>
|
||||
#include <dsdifffile.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include "utils.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace TagLib;
|
||||
|
||||
class TestDSDIFF : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestDSDIFF);
|
||||
CPPUNIT_TEST(testProperties);
|
||||
CPPUNIT_TEST(testTags);
|
||||
CPPUNIT_TEST(testSaveID3v2);
|
||||
CPPUNIT_TEST(testRepeatedSave);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
void testProperties()
|
||||
{
|
||||
DSDIFF::File f(TEST_FILE_PATH_C("empty10ms.dff"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(10, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(5644, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(2822400, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL((long long)28224, f.audioProperties()->sampleCount());
|
||||
}
|
||||
|
||||
void testTags()
|
||||
{
|
||||
ScopedFileCopy copy("empty10ms", ".dff");
|
||||
string newname = copy.fileName();
|
||||
|
||||
DSDIFF::File *f = new DSDIFF::File(newname.c_str());
|
||||
CPPUNIT_ASSERT_EQUAL(String(""), f->tag()->artist());
|
||||
f->tag()->setArtist("The Artist");
|
||||
f->save();
|
||||
delete f;
|
||||
|
||||
f = new DSDIFF::File(newname.c_str());
|
||||
CPPUNIT_ASSERT_EQUAL(String("The Artist"), f->tag()->artist());
|
||||
delete f;
|
||||
}
|
||||
|
||||
void testSaveID3v2()
|
||||
{
|
||||
ScopedFileCopy copy("empty10ms", ".dff");
|
||||
string newname = copy.fileName();
|
||||
|
||||
{
|
||||
DSDIFF::File f(newname.c_str());
|
||||
CPPUNIT_ASSERT(!f.hasID3v2Tag());
|
||||
|
||||
f.tag()->setTitle(L"TitleXXX");
|
||||
f.save();
|
||||
CPPUNIT_ASSERT(f.hasID3v2Tag());
|
||||
}
|
||||
{
|
||||
DSDIFF::File f(newname.c_str());
|
||||
CPPUNIT_ASSERT(f.hasID3v2Tag());
|
||||
CPPUNIT_ASSERT_EQUAL(String(L"TitleXXX"), f.tag()->title());
|
||||
|
||||
f.tag()->setTitle("");
|
||||
f.save();
|
||||
CPPUNIT_ASSERT(!f.hasID3v2Tag());
|
||||
}
|
||||
{
|
||||
DSDIFF::File f(newname.c_str());
|
||||
CPPUNIT_ASSERT(!f.hasID3v2Tag());
|
||||
f.tag()->setTitle(L"TitleXXX");
|
||||
f.save();
|
||||
CPPUNIT_ASSERT(f.hasID3v2Tag());
|
||||
}
|
||||
{
|
||||
DSDIFF::File f(newname.c_str());
|
||||
CPPUNIT_ASSERT(f.hasID3v2Tag());
|
||||
CPPUNIT_ASSERT_EQUAL(String(L"TitleXXX"), f.tag()->title());
|
||||
}
|
||||
}
|
||||
|
||||
void testRepeatedSave()
|
||||
{
|
||||
ScopedFileCopy copy("empty10ms", ".dff");
|
||||
string newname = copy.fileName();
|
||||
|
||||
{
|
||||
DSDIFF::File f(newname.c_str());
|
||||
CPPUNIT_ASSERT_EQUAL(String(""), f.tag()->title());
|
||||
f.tag()->setTitle("NEW TITLE");
|
||||
f.save();
|
||||
CPPUNIT_ASSERT_EQUAL(String("NEW TITLE"), f.tag()->title());
|
||||
f.tag()->setTitle("NEW TITLE 2");
|
||||
f.save();
|
||||
CPPUNIT_ASSERT_EQUAL(String("NEW TITLE 2"), f.tag()->title());
|
||||
CPPUNIT_ASSERT_EQUAL(8252L, f.length());
|
||||
f.save();
|
||||
CPPUNIT_ASSERT_EQUAL(8252L, f.length());
|
||||
}
|
||||
{
|
||||
DSDIFF::File f(newname.c_str());
|
||||
CPPUNIT_ASSERT_EQUAL(String("NEW TITLE 2"), f.tag()->title());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestDSDIFF);
|
@ -1,57 +0,0 @@
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <tag.h>
|
||||
#include <tbytevectorlist.h>
|
||||
#include <dsffile.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include "utils.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace TagLib;
|
||||
|
||||
class TestDSF : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestDSF);
|
||||
CPPUNIT_TEST(testBasic);
|
||||
CPPUNIT_TEST(testTags);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
void testBasic()
|
||||
{
|
||||
DSF::File f(TEST_FILE_PATH_C("empty10ms.dsf"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(10, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(5645, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(2822400, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->formatVersion());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->formatID());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channelType());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL((long long)28224, f.audioProperties()->sampleCount());
|
||||
CPPUNIT_ASSERT_EQUAL(4096, f.audioProperties()->blockSizePerChannel());
|
||||
}
|
||||
|
||||
void testTags()
|
||||
{
|
||||
ScopedFileCopy copy("empty10ms", ".dsf");
|
||||
string newname = copy.fileName();
|
||||
|
||||
DSF::File *f = new DSF::File(newname.c_str());
|
||||
CPPUNIT_ASSERT_EQUAL(String(""), f->tag()->artist());
|
||||
f->tag()->setArtist("The Artist");
|
||||
f->save();
|
||||
delete f;
|
||||
|
||||
f = new DSF::File(newname.c_str());
|
||||
CPPUNIT_ASSERT_EQUAL(String("The Artist"), f->tag()->artist());
|
||||
delete f;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestDSF);
|
@ -39,8 +39,6 @@
|
||||
#include <wavfile.h>
|
||||
#include <apefile.h>
|
||||
#include <aifffile.h>
|
||||
#include <dsffile.h>
|
||||
#include <dsdifffile.h>
|
||||
#include <tfilestream.h>
|
||||
#include <tbytevectorstream.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
@ -81,8 +79,6 @@ class TestFileRef : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testWav);
|
||||
CPPUNIT_TEST(testAIFF_1);
|
||||
CPPUNIT_TEST(testAIFF_2);
|
||||
CPPUNIT_TEST(testDSF);
|
||||
CPPUNIT_TEST(testDSDIFF);
|
||||
CPPUNIT_TEST(testUnsupported);
|
||||
CPPUNIT_TEST(testCreate);
|
||||
CPPUNIT_TEST(testFileResolver);
|
||||
@ -293,16 +289,6 @@ public:
|
||||
fileRefSave<RIFF::AIFF::File>("alaw", ".aifc");
|
||||
}
|
||||
|
||||
void testDSF()
|
||||
{
|
||||
fileRefSave<DSF::File>("empty10ms",".dsf");
|
||||
}
|
||||
|
||||
void testDSDIFF()
|
||||
{
|
||||
fileRefSave<DSDIFF::File>("empty10ms",".dff");
|
||||
}
|
||||
|
||||
void testUnsupported()
|
||||
{
|
||||
FileRef f1(TEST_FILE_PATH_C("no-extension"));
|
||||
|
Reference in New Issue
Block a user