Add modplugplay, a command line player of many music module formats,

and it's library.

PR:		ports/62313
Submitted by:	Emanuel Haupt <ehaupt@critical.ch>
This commit is contained in:
Pav Lucistnik 2004-05-28 18:52:29 +00:00
parent 5d830c416d
commit e7fe385c2d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=110234
9 changed files with 188 additions and 0 deletions

View File

@ -164,6 +164,7 @@
SUBDIR += libid3tag
SUBDIR += libmad
SUBDIR += libmikmod
SUBDIR += libmodplug
SUBDIR += libmusicbrainz
SUBDIR += libogg
SUBDIR += libsamplerate
@ -195,6 +196,7 @@
SUBDIR += midimountain
SUBDIR += mikmod
SUBDIR += mixer.app
SUBDIR += modplugplay
SUBDIR += mp32ogg
SUBDIR += mp3_check
SUBDIR += mp3asm

27
audio/libmodplug/Makefile Normal file
View File

@ -0,0 +1,27 @@
# New ports collection makefile for: libmodplug
# Date created: 3 February 2004
# Whom: Emanuel Haupt <ehaupt@critical.ch>
#
# $FreeBSD$
#
PORTNAME= libmodplug
PORTVERSION= 0.7
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= modplug-xmms
MAINTAINER= ehaupt@critical.ch
COMMENT= ModPlug mod-like music shared libraries
INSTALLS_SHLIB= yes
USE_GMAKE= yes
USE_GNOME= pkgconfig
USE_LIBTOOL_VER= 15
USE_REINPLACE= yes
post-patch:
@${REINPLACE_CMD} -e 's|{libdir}/pkgconfig|{prefix}/libdata/pkgconfig|' \
${WRKSRC}/Makefile.in
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
MD5 (libmodplug-0.7.tar.gz) = b6e7412f90cdd4a27a2dd3de94909905
SIZE (libmodplug-0.7.tar.gz) = 329398

View File

@ -0,0 +1,9 @@
This is a library based on the mod rendering code from ModPlug, a
popular windows mod player written by Olivier Lapicque, found at
http://www.modplug.com. It is required for ModPlug-XMMS (in the
xmms-modplug package).
WWW: http://www.modplug.com/
- ehaupt
ehaupt@critical.ch

View File

@ -0,0 +1,9 @@
lib/libmodplug.so.0
lib/libmodplug.so
lib/libmodplug.la
libdata/pkgconfig/libmodplug.pc
include/libmodplug/stdafx.h
include/libmodplug/sndfile.h
include/libmodplug/it_defs.h
include/libmodplug/modplug.h
@dirrm include/libmodplug

View File

@ -0,0 +1,28 @@
# New ports collection makefile for: modplugplay
# Date created: 3 February 2004
# Whom: Emanuel Haupt <ehaupt@critical.ch>
#
# $FreeBSD$
#
PORTNAME= modplugplay
PORTVERSION= 1.0
CATEGORIES= audio
MASTER_SITES= http://www.linuks.mine.nu/modplugplay/
MAINTAINER= ehaupt@critical.ch
COMMENT= A commandline music mod player using libmodplug
LIB_DEPENDS= modplug.0:${PORTSDIR}/audio/libmodplug
MAN1= modplugplay.1
PLIST_FILES= bin/modplugplay
do-build:
${CXX} ${WRKSRC}/modplugplay.c ${CFLAGS} -o ${WRKSRC}/${PORTNAME} -lmodplug -L${LOCALBASE}/lib -I${LOCALBASE}/include/libmodplug
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${PREFIX}/man/man1
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
MD5 (modplugplay-1.0.tar.gz) = ac8e98865d90dca25c85748b3916bf07
SIZE (modplugplay-1.0.tar.gz) = 67703

View File

@ -0,0 +1,101 @@
--- modplugplay.c.orig Mon Oct 6 09:33:56 2003
+++ modplugplay.c Thu Feb 5 20:40:53 2004
@@ -1,8 +1,7 @@
-
/*
commandline interface to modplugxmms library
gurkan@linuks.mine.nu www.linuks.mine.nu
-Copyright (C) 2003 Gürkan Sengün
+Copyright (C) 2003 Gurkan Sengun
TODO
unlock /dev/dsp when in 'p'ause mode
@@ -151,7 +150,7 @@
void help(char *s)
{
- printf("Copyright (C) 2003 Gürkan Sengün\n");
+ printf("Copyright (C) 2003 Gurkan Sengun\n");
printf("Version %s compiled on %s at %s.\n",VERSION,__DATE__,__TIME__);
printf("\n");
printf("%s: too few arguments\n",s);
@@ -183,10 +182,10 @@
char t[sz];
int i, lit, big;
- for (i=0; i<sz; i++) s[i] = i;
+ for (i=0; i<(int)sz; i++) s[i] = i;
ival = *(int *)s;
big = lit = 0;
- for (i=0; i<sz; i++) {
+ for (i=0; i<(int)sz; i++) {
char c = ival&0xff;
ival >>= 8;
if (s[i] == c) lit++;
@@ -250,6 +249,7 @@
}
ioctl(mixer_fd,MIXER_WRITE(SOUND_MIXER_PCM),&newvol);
close(mixer_fd);
+ return 0;
}
int main(int argc, char* argv[])
@@ -257,7 +257,7 @@
FILE *f;
long size;
char *d;
- int ch,x,y;
+ int x,y;
ModPlugFile *f2;
int len,mlen;
struct timeval tvstart;
@@ -269,8 +269,11 @@
char songname[41];
char notpaus[4];
+ /*
int vol=getpcmvol();
- /*printf("V%02x\n",vol);*/
+ printf("V%02x\n",vol);
+ */
+
/*
struct count_info ci;
ioctl(audio_fd,SNDCTL_DSP_GETOPTR,&ci);
@@ -289,7 +292,6 @@
int channels = 2;
int speed = 44100;
- int c;
char buffer[128];
int result, nread;
struct pollfd pollfds;
@@ -299,19 +301,10 @@
int mono=0;
int bits=0;
int song;
- int millisecond;
- char *randplayed; /* randomly played songs
- songs that are n/N'd are done or not? */
/* what about N if the previous song is not playable? */
/* maybe mark it played in randplayed */
// [rev--dly--] [sur--dly--] [bas--rng--]
- int rev=0; // a
- int revdly=0; // s
- int sur=0; // d
- int surdly=0; // y
- int bas=0; // x
- int basrng=0; // c
if (get_byteorder()==0) {
format=AFMT_S16_LE;
@@ -335,7 +328,7 @@
/*
if (strstr(argv[1],"-v")) {
- printf("Copyright (C) 2003 Gürkan Sengün\n");
+ printf("Copyright (C) 2003 Gurkan Sengun\n");
printf("Version %s compiled on %s at %s.\n",VERSION,__DATE__,__TIME__);
exit(0);
}

View File

@ -0,0 +1,8 @@
modplugplay is a command line player for many music modules (669, amf,
ams, dbm, dmf, dsm, far, it, j2b, mdl, med mod, mt2, mtm, okt, psm,
ptm, s3m, stm, ult, umx and xm) using the libmodplug library.
WWW: http://www.linuks.mine.nu/modplugplay/
- ehaupt
ehaupt@critical.ch