Project_Dep_Name utf8_static\r
End Project Dependency\r
Begin Project Dependency\r
+ Project_Dep_Name test_grabbag\r
+ End Project Dependency\r
+ Begin Project Dependency\r
Project_Dep_Name test_libFLAC\r
End Project Dependency\r
Begin Project Dependency\r
Project_Dep_Name utf8_static\r
End Project Dependency\r
Begin Project Dependency\r
+ Project_Dep_Name test_grabbag\r
+ End Project Dependency\r
+ Begin Project Dependency\r
Project_Dep_Name test_libFLAC\r
End Project Dependency\r
Begin Project Dependency\r
\r
###############################################################################\r
\r
+Project: "test_grabbag"=.\src\test_grabbag\test_grabbag.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+ Begin Project Dependency\r
+ Project_Dep_Name grabbag_static\r
+ End Project Dependency\r
+}}}\r
+\r
+###############################################################################\r
+\r
Project: "test_libFLAC"=.\src\test_libFLAC\test_libFLAC.dsp - Package Owner=<4>\r
\r
Package=<5>\r
topdir = .
-.PHONY: doc libFLAC libFLAC++ libOggFLAC libOggFLAC++ share plugin_common plugin_xmms flac metaflac test_libFLAC test_libFLAC++ test_libOggFLAC test_libOggFLAC++ test_streams
-all: doc libFLAC libFLAC++ libOggFLAC libOggFLAC++ share plugin_common plugin_xmms flac metaflac test_libFLAC test_libFLAC++ test_libOggFLAC test_libOggFLAC++ test_streams
+.PHONY: doc libFLAC libFLAC++ libOggFLAC libOggFLAC++ share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_libOggFLAC test_libOggFLAC++ test_streams
+all: doc libFLAC libFLAC++ libOggFLAC libOggFLAC++ share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_libOggFLAC test_libOggFLAC++ test_streams
DEFAULT_CONFIG = release
test_streams: libFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
+test_grabbag: grabbag
+ (cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
+
test_libFLAC: libFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
-(cd src/metaflac ; $(MAKE) -f Makefile.lite clean)
-(cd src/plugin_common ; $(MAKE) -f Makefile.lite clean)
-(cd src/plugin_xmms ; $(MAKE) -f Makefile.lite clean)
+ -(cd src/test_grabbag ; $(MAKE) -f Makefile.lite clean)
-(cd src/test_libFLAC ; $(MAKE) -f Makefile.lite clean)
-(cd src/test_libFLAC++ ; $(MAKE) -f Makefile.lite clean)
-(cd src/test_libOggFLAC ; $(MAKE) -f Makefile.lite clean)
$(XMMS_DIRS) \
plugin_winamp2 \
plugin_winamp3 \
+ test_grabbag \
test_libFLAC \
test_libFLAC++ \
$(OGGFLAC_TEST_DIRS) \
cd monkeys_audio_utilities\r
nmake /f Makefile.vc\r
cd ..\r
+ cd test_grabbag\r
+ nmake /f Makefile.vc\r
+ cd ..\r
cd test_libFLAC\r
nmake /f Makefile.vc\r
cd ..\r
cd monkeys_audio_utilities\r
nmake /f Makefile.vc clean\r
cd ..\r
+ cd test_grabbag\r
+ nmake /f Makefile.vc clean\r
+ cd ..\r
cd test_libFLAC\r
nmake /f Makefile.vc clean\r
cd ..\r
--- /dev/null
+# FLAC - Free Lossless Audio Codec
+# Copyright (C) 2002 Josh Coalson
+#
+# This program is part of FLAC; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+SUBDIRS = cuesheet
+
+EXTRA_DIST = \
+ Makefile.lite \
+ Makefile.vc
--- /dev/null
+# test_grabbag - Simple testers for the grabbag library
+# Copyright (C) 2002 Josh Coalson
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+.PHONY: cuesheet
+all: cuesheet
+
+DEFAULT_CONFIG = release
+
+CONFIG = $(DEFAULT_CONFIG)
+
+debug : CONFIG = debug
+release : CONFIG = release
+
+debug : all
+release : all
+
+cuesheet:
+ (cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
+
+clean:
+ -(cd cuesheet ; $(MAKE) -f Makefile.lite clean)
--- /dev/null
+!include <win32.mak>\r
+\r
+# It's less hassle to spell it all out that to figure out how to do it right with nmake:\r
+\r
+all:\r
+ cd cuesheet\r
+ nmake /f Makefile.vc\r
+ cd ..\r
+\r
+clean:\r
+ cd cuesheet\r
+ nmake /f Makefile.vc clean\r
+ cd ..\r
--- /dev/null
+# test_cuesheet - Simple tester for cuesheet routines in grabbag
+# Copyright (C) 2002 Josh Coalson
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+EXTRA_DIST = \
+ Makefile.lite \
+ Makefile.vc \
+ test_cuesheet.dsp
+
+CFLAGS = @CFLAGS@
+
+noinst_PROGRAMS = test_cuesheet
+test_cuesheet_SOURCES = \
+ main.c
+test_cuesheet_LDADD = \
+ $(top_builddir)/src/share/grabbag/libgrabbag.a \
+ $(top_builddir)/src/libFLAC/libFLAC.la \
+ -lm
+
+CLEANFILES = $(wildcard *.raw)
--- /dev/null
+# test_cuesheet - Simple tester for cuesheet routines in grabbag
+# Copyright (C) 2002 Josh Coalson
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+#
+# GNU makefile
+#
+
+topdir = ../../..
+
+PROGRAM_NAME = test_cuesheet
+INCLUDES = -I./include -I$(topdir)/include
+LIBS = -lgrabbag -lFLAC -lm
+SRCS_C = \
+ main.c
+
+include $(topdir)/build/exe.mk
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
--- /dev/null
+# test_cuesheet - Simple tester for cuesheet routines in grabbag\r
+# Copyright (C) 2002 Josh Coalson\r
+#\r
+# This program is free software; you can redistribute it and/or\r
+# modify it under the terms of the GNU General Public License\r
+# as published by the Free Software Foundation; either version 2\r
+# of the License, or (at your option) any later version.\r
+#\r
+# This program is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+# GNU General Public License for more details.\r
+#\r
+# You should have received a copy of the GNU General Public License\r
+# along with this program; if not, write to the Free Software\r
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+\r
+!include <win32.mak>\r
+\r
+!IFDEF DEBUG\r
+.c.obj:\r
+ $(cc) -DFLAC__NO_DLL $(cdebug) $(cflags) /I "..\..\..\include" /I ".\include" -DSTRICT -YX /Od /D "_DEBUG" $<\r
+!else\r
+.c.obj:\r
+ $(cc) -DFLAC__NO_DLL /O2 $(crelease) $(cflags) /I "..\..\..\include" /I ".\include" -DSTRICT -YX -DNODEBUG $<\r
+!endif\r
+\r
+C_FILES= \\r
+ main.c\r
+\r
+OBJS= $(C_FILES:.c=.obj)\r
+\r
+all: test_cuesheet.exe\r
+\r
+test_cuesheet.exe: $(OBJS)\r
+ link.exe /libpath:"..\..\..\obj\debug\lib" -out:../../../obj/debug/bin/$*.exe $(OBJS) grabbag_static.lib libFLAC_static.lib\r
+\r
+clean:\r
+ -del *.obj *.pch\r
+ -del ..\..\..\obj\debug\bin\test_cuesheet.exe\r
--- /dev/null
+/* test_cuesheet - Simple tester for cuesheet routines in grabbag
+ * Copyright (C) 2002 Josh Coalson
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "FLAC/assert.h"
+#include "FLAC/metadata.h"
+#include "share/grabbag.h"
+
+static int do_cuesheet(const char *infilename, FLAC__bool is_cdda, FLAC__uint64 lead_out_offset)
+{
+ FILE *fin, *fout;
+ const char *error_message;
+ char tmpfilename[4096];
+ unsigned last_line_read;
+ FLAC__StreamMetadata *cuesheet;
+
+ FLAC__ASSERT(strlen(infilename) + 2 < sizeof(tmpfilename));
+
+ /*
+ * pass 1
+ */
+ if(0 == strcmp(infilename, "-")) {
+ fin = stdin;
+ }
+ else if(0 == (fin = fopen(infilename, "r"))) {
+ fprintf(stderr, "can't open file %s for reading\n", infilename);
+ return 255;
+ }
+ if(0 != (cuesheet = grabbag__cuesheet_parse(fin, &error_message, &last_line_read, is_cdda, lead_out_offset))) {
+ if(fin != stdin)
+ fclose(fin);
+ }
+ else {
+ printf("pass1: parse error, line %u: \"%s\"\n", last_line_read, error_message);
+ if(fin != stdin)
+ fclose(fin);
+ return 1;
+ }
+ if(!FLAC__metadata_object_cuesheet_is_legal(cuesheet, is_cdda, &error_message)) {
+ printf("pass1: illegal cuesheet: \"%s\"\n", error_message);
+ return 1;
+ }
+ sprintf(tmpfilename, "%s.1", infilename);
+ if(0 == (fout = fopen(tmpfilename, "w"))) {
+ fprintf(stderr, "can't open file %s for writing\n", tmpfilename);
+ return 255;
+ }
+ grabbag__cuesheet_emit(fout, cuesheet, "\"dummy.wav\" WAVE", is_cdda);
+ fclose(fout);
+
+ /*
+ * pass 2
+ */
+ if(0 == (fin = fopen(tmpfilename, "r"))) {
+ fprintf(stderr, "can't open file %s for reading\n", tmpfilename);
+ return 255;
+ }
+ if(0 != (cuesheet = grabbag__cuesheet_parse(fin, &error_message, &last_line_read, is_cdda, lead_out_offset))) {
+ if(fin != stdin)
+ fclose(fin);
+ }
+ else {
+ printf("pass2: parse error, line %u: \"%s\"\n", last_line_read, error_message);
+ if(fin != stdin)
+ fclose(fin);
+ return 1;
+ }
+ if(!FLAC__metadata_object_cuesheet_is_legal(cuesheet, is_cdda, &error_message)) {
+ printf("pass2: illegal cuesheet: \"%s\"\n", error_message);
+ return 1;
+ }
+ sprintf(tmpfilename, "%s.2", infilename);
+ if(0 == (fout = fopen(tmpfilename, "w"))) {
+ fprintf(stderr, "can't open file %s for writing\n", tmpfilename);
+ return 255;
+ }
+ grabbag__cuesheet_emit(fout, cuesheet, "\"dummy.wav\" WAVE", is_cdda);
+ fclose(fout);
+
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ FLAC__uint64 lead_out_offset;
+ FLAC__bool is_cdda = false;
+ const char *usage = "usage: test_cuesheet cuesheet_file lead_out_offset [ cdda ]\n";
+
+ if(argc < 3 || argc > 4) {
+ fprintf(stderr, usage);
+ return 255;
+ }
+
+ lead_out_offset = (FLAC__uint64)strtoul(argv[2], 0, 10);
+ if(argc == 4) {
+ if(0 == strcmp(argv[3], "cdda"))
+ is_cdda = true;
+ else {
+ fprintf(stderr, usage);
+ return 255;
+ }
+ }
+
+ return do_cuesheet(argv[1], is_cdda, lead_out_offset);
+}
+FLAC__StreamMetadata *grabbag__cuesheet_parse(FILE *file, const char **error_message, unsigned *last_line_read, FLAC__bool is_cdda, FLAC__uint64 lead_out_offset);
--- /dev/null
+# Microsoft Developer Studio Project File - Name="test_cuesheet" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
+\r
+CFG=test_cuesheet - Win32 Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "test_cuesheet.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "test_cuesheet.mak" CFG="test_cuesheet - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "test_cuesheet - Win32 Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "test_cuesheet - Win32 Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+RSC=rc.exe\r
+\r
+!IF "$(CFG)" == "test_cuesheet - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release"\r
+# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "..\..\..\obj\release\bin"\r
+# PROP Intermediate_Dir "Release"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c\r
+# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "FLAC__NO_DLL" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FD /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\libFLAC_static.lib /nologo /subsystem:console /machine:I386\r
+\r
+!ELSEIF "$(CFG)" == "test_cuesheet - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug"\r
+# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "..\..\..\obj\debug\bin"\r
+# PROP Intermediate_Dir "Debug"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c\r
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "_DEBUG" /D "FLAC__NO_DLL" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\libFLAC_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "test_cuesheet - Win32 Release"\r
+# Name "test_cuesheet - Win32 Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter "c"\r
+# Begin Source File\r
+\r
+SOURCE=.\main.c\r
+# End Source File\r
+# End Group\r
+# End Target\r
+# End Project\r