bool Ogg::FLAC::File::save()
{
- d->xiphCommentData = d->comment->render();
+ d->xiphCommentData = d->comment->render(false);
// Create FLAC metadata-block:
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/trueaudio
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ogg
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ogg/vorbis
+ ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ogg/flac
+ ${CMAKE_CURRENT_SOURCE_DIR}/../taglib/flac
)
SET(test_runner_SRCS
test_aiff.cpp
test_riff.cpp
test_ogg.cpp
+ test_oggflac.cpp
)
IF(WITH_MP4)
SET(test_runner_SRCS ${test_runner_SRCS} test_mp4.cpp)
-I$(top_srcdir)/taglib/mpeg/id3v2 \
-I$(top_srcdir)/taglib/ogg \
-I$(top_srcdir)/taglib/ogg/vorbis \
+ -I$(top_srcdir)/taglib/ogg/flac \
+ -I$(top_srcdir)/taglib/flac \
-I$(top_srcdir)/taglib/riff \
-I$(top_srcdir)/taglib/riff/aiff \
-I$(top_srcdir)/taglib/mpeg/id3v2/frames
test_xiphcomment.cpp \
test_riff.cpp \
test_aiff.cpp \
- test_ogg.cpp
+ test_ogg.cpp \
+ test_oggflac.cpp
if build_tests
TESTS = test_runner
--- /dev/null
+#include <cppunit/extensions/HelperMacros.h>
+#include <string>
+#include <stdio.h>
+#include <tag.h>
+#include <tstringlist.h>
+#include <tbytevectorlist.h>
+#include <oggfile.h>
+#include <oggflacfile.h>
+#include "utils.h"
+
+using namespace std;
+using namespace TagLib;
+
+class TestOggFLAC : public CppUnit::TestFixture
+{
+ CPPUNIT_TEST_SUITE(TestOggFLAC);
+ CPPUNIT_TEST(testFramingBit);
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+
+ void testFramingBit()
+ {
+ string newname = copyFile("empty_flac", ".oga");
+
+ Ogg::FLAC::File *f = new Ogg::FLAC::File(newname.c_str());
+ f->tag()->setArtist("The Artist");
+ f->save();
+ delete f;
+
+ f = new Ogg::FLAC::File(newname.c_str());
+ CPPUNIT_ASSERT_EQUAL(String("The Artist"), f->tag()->artist());
+
+ f->seek(0, File::End);
+ int size = f->tell();
+ CPPUNIT_ASSERT_EQUAL(9134, size);
+
+ delete f;
+ //deleteFile(newname);
+ }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(TestOggFLAC);