changeset 122:31072456f6d7

Added initial NanoSID-support sources, etc.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 14 Jan 2004 03:44:03 +0000
parents 87882cd94b9c
children 9ab0c2fff794
files src/Makefile.am src/xs_nanosid.c src/xs_nanosid.h
diffstat 3 files changed, 157 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/Makefile.am	Wed Jan 14 02:34:01 2004 +0000
+++ b/src/Makefile.am	Wed Jan 14 03:44:03 2004 +0000
@@ -2,12 +2,11 @@
 lib_LTLIBRARIES = libxmmssid.la
 
 # Generals
-AM_CFLAGS   = -W -Wall -D_REENTRANT @GTK_CFLAGS@ @SIDPLAY1_INCLUDES@ @SIDPLAY2_INCLUDES@ @BUILDERS_INCLUDES@
+AM_CFLAGS   = -W -Wall -D_REENTRANT @GTK_CFLAGS@ @SIDPLAY1_INCLUDES@ @SIDPLAY2_INCLUDES@ @BUILDERS_INCLUDES@ @NANOSID_INCLUDES@
 AM_CXXFLAGS = $(AM_CFLAGS)
 
 libxmmssid_la_LDFLAGS = -module -avoid-version @BUILDERS_LDFLAGS@
-libxmmssid_la_LIBADD  = @GTK_LIBS@ @SIDPLAY1_LDADD@ @SIDPLAY2_LDADD@ @RESID_LDADD@ @HARDSID_LDADD@
-# -lstdc++
+libxmmssid_la_LIBADD  = @GTK_LIBS@ @SIDPLAY1_LDADD@ @SIDPLAY2_LDADD@ @RESID_LDADD@ @HARDSID_LDADD@ @NANOSID_LDADD@ 
 
 # Plugin sources
 libxmmssid_la_SOURCES =	\
@@ -24,6 +23,7 @@
 	xs_sidplay.h	\
 	xs_sidplay1.cc	xs_sidplay1.h	\
 	xs_sidplay2.cc	xs_sidplay2.h	\
+	xs_nanosid.c	xs_nanosid.h	\
 	xmms-sid.c	xmms-sid.h
 
 EXTRA_DIST = xmms-sid-logo.xpm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xs_nanosid.c	Wed Jan 14 03:44:03 2004 +0000
@@ -0,0 +1,139 @@
+/*
+   XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS)
+
+   NanoSID support
+
+   Written by Matti "ccr" Hamalainen <ccr@tnsp.org>
+
+   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 "xmms-sid.h"
+
+#ifdef HAVE_NANOSID
+
+#include "xs_nanosid.h"
+#include <stdio.h>
+#include <xmms/titlestring.h>
+#include "xs_config.h"
+#include "xs_support.h"
+#include "xs_length.h"
+
+
+typedef struct {
+} t_xs_nanosid;
+
+
+/*
+ * Check if we can play the given file
+ */
+gboolean xs_nanosid_isourfile(gchar *pcFilename)
+{
+ if (strstr(pcFilename, ".zsid"))
+	return TRUE;
+	else
+	return FALSE;
+}
+
+
+/*
+ * Initialize NanoSID
+ */
+gboolean xs_nanosid_init(t_xs_status *myStatus)
+{
+ t_xs_nanosid *myPlayer;
+ assert(myStatus);
+
+ /* Allocate internal structures */
+ myPlayer = (t_xs_nanosid *) g_malloc0(sizeof(t_xs_nanosid));
+ if (!myPlayer) return FALSE;
+
+ /* Initialize engine */
+
+
+
+ myStatus->player = myPlayer;
+ return TRUE;
+}
+
+
+/*
+ * Close SIDPlay1
+ */
+void xs_nanosid_close(t_xs_status *myStatus)
+{
+ t_xs_nanosid *myPlayer;
+ assert(myStatus);
+
+ /* Free internals */
+ myPlayer = (t_xs_nanosid *) myStatus->player;
+
+
+
+
+ g_free(myPlayer);
+ myStatus->player = NULL;
+}
+
+
+gboolean xs_nanosid_initsong(t_xs_status *myStatus)
+{
+ t_xs_nanosid *myPlayer = (t_xs_nanosid *) myStatus->player;
+
+ if (!myPlayer) return FALSE;
+
+}
+
+
+guint xs_nanosid_fillbuffer(t_xs_status *myStatus, gchar *audioBuffer, guint audioBufSize)
+{
+ t_xs_nanosid *myPlayer = (t_xs_nanosid *) myStatus->player;
+
+ if (!myPlayer) return -1;
+
+ return audioBufSize;
+}
+
+
+gboolean xs_nanosid_loadsid(t_xs_status *myStatus, gchar *pcFilename)
+{
+ t_xs_nanosid *myPlayer = (t_xs_nanosid *) myStatus->player;
+ assert(myStatus);
+
+ /* Try to get the tune */
+ if (!pcFilename) return FALSE;
+
+ return FALSE;
+}
+
+
+/*
+ * Delete INTERNAL information
+ */
+void xs_nanosid_deletesid(t_xs_status *myStatus)
+{
+ t_xs_nanosid *myPlayer;
+ assert(myStatus);
+
+ myPlayer = (t_xs_nanosid *) myStatus->player;
+ if (!myPlayer) return;
+}
+
+
+/*
+ * Return song information
+ */
+
+
+#endif	/* HAVE_NANOSID */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xs_nanosid.h	Wed Jan 14 03:44:03 2004 +0000
@@ -0,0 +1,15 @@
+#ifndef _XS_NANOSID_H
+#define _XS_NANOSID_H
+
+#include "xmms-sid.h"
+
+gboolean	xs_nanosid_isourfile(gchar *);
+void		xs_nanosid_close(t_xs_status *);
+gboolean	xs_nanosid_init(t_xs_status *);
+gboolean	xs_nanosid_initsong(t_xs_status *);
+guint		xs_nanosid_fillbuffer(t_xs_status *, gchar *, guint);
+gboolean	xs_nanosid_loadsid(t_xs_status *, gchar *);
+void		xs_nanosid_deletesid(t_xs_status *);
+t_xs_tune*	xs_nanosid_getsidinfo(gchar *);
+
+#endif /* _XS_NANOSID_H */