summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-plugins/xmms-musepack/ChangeLog9
-rw-r--r--media-plugins/xmms-musepack/Manifest5
-rw-r--r--media-plugins/xmms-musepack/files/digest-xmms-musepack-0.98-r21
-rw-r--r--media-plugins/xmms-musepack/files/xmms-musepack-0.98-titles.patch241
-rw-r--r--media-plugins/xmms-musepack/xmms-musepack-0.98-r2.ebuild55
5 files changed, 309 insertions, 2 deletions
diff --git a/media-plugins/xmms-musepack/ChangeLog b/media-plugins/xmms-musepack/ChangeLog
index 053619dd0a08..9fd384ed0eb8 100644
--- a/media-plugins/xmms-musepack/ChangeLog
+++ b/media-plugins/xmms-musepack/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-plugins/xmms-musepack
# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/xmms-musepack/ChangeLog,v 1.9 2004/02/19 09:56:15 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/xmms-musepack/ChangeLog,v 1.10 2004/02/20 03:47:16 eradicator Exp $
+
+*xmms-musepack-0.98-r2 (19 Feb 2004)
+
+ 19 Feb 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ xmms-musepack-0.98-r2.ebuild, files/xmms-musepack-0.98-titles.patch:
+ Revision bumping to add patch to correct NULL title strings. Patch submitted
+ by Stefan Koegl <gensk@t-online.de> to close bug #41238.
*xmms-musepack-0.94-r2 (19 Feb 2004)
diff --git a/media-plugins/xmms-musepack/Manifest b/media-plugins/xmms-musepack/Manifest
index 12111d639ba4..54f3f60a9914 100644
--- a/media-plugins/xmms-musepack/Manifest
+++ b/media-plugins/xmms-musepack/Manifest
@@ -1,6 +1,7 @@
MD5 593863779ed74851a5ffdc32966432c9 xmms-musepack-0.94.ebuild 739
+MD5 73fc130b66dbae832154f15a2ed03fd5 xmms-musepack-0.98-r2.ebuild 1682
MD5 bafe4bde51538da36bf3cd105eed2edc xmms-musepack-0.94-r2.ebuild 1145
-MD5 a63c2b096d2b5a72086b90a97b2418ee ChangeLog 2171
+MD5 2e45ee46eeb914c3aef7524b8471bfa3 ChangeLog 2479
MD5 6d88011b963756aa43b6df79676821e0 xmms-musepack-0.98-r1.ebuild 1644
MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158
MD5 ddd8466c451f9570757c8bf706e9239b xmms-musepack-0.94-r1.ebuild 1116
@@ -9,5 +10,7 @@ MD5 e4ac40cdcd84c7fa35957450457407ce files/xmms-musepack-0.98-bad-makefile.patch
MD5 a9df10edf2898414b6f2958643b63477 files/digest-xmms-musepack-0.94-r1 70
MD5 a9df10edf2898414b6f2958643b63477 files/digest-xmms-musepack-0.94-r2 70
MD5 eb1357b5fbaa2b86c3267d732568201d files/digest-xmms-musepack-0.98-r1 58
+MD5 eb1357b5fbaa2b86c3267d732568201d files/digest-xmms-musepack-0.98-r2 58
+MD5 db7221c06a0b86abf3ea066cc66a3b52 files/xmms-musepack-0.98-titles.patch 8955
MD5 ed030d04fa02f984be113732ad39b061 files/xmms-musepack-0.94-bad-makefile.patch 956
MD5 fb770d6a178a0327376d76d9b996b20a files/xmms-musepack-0.94-titles.patch 3111
diff --git a/media-plugins/xmms-musepack/files/digest-xmms-musepack-0.98-r2 b/media-plugins/xmms-musepack/files/digest-xmms-musepack-0.98-r2
new file mode 100644
index 000000000000..ab685c46cd34
--- /dev/null
+++ b/media-plugins/xmms-musepack/files/digest-xmms-musepack-0.98-r2
@@ -0,0 +1 @@
+MD5 b56f9aef8c5cec19addd5b7f9ffddc2e xmms-0.98.zip 124396
diff --git a/media-plugins/xmms-musepack/files/xmms-musepack-0.98-titles.patch b/media-plugins/xmms-musepack/files/xmms-musepack-0.98-titles.patch
new file mode 100644
index 000000000000..c5825b048b88
--- /dev/null
+++ b/media-plugins/xmms-musepack/files/xmms-musepack-0.98-titles.patch
@@ -0,0 +1,241 @@
+--- in_mpc.c 2003-01-16 23:17:01.000000000 +0100
++++ in_mpc.c 2004-02-19 16:35:48.667521040 +0100
+@@ -33,6 +33,8 @@
+ #include "mpc_dec.h"
+ #include "mpplus_blue.xpm"
+
++#include <xmms/titlestring.h>
++
+ #ifndef M_LN10
+ # define M_LN10 2.3025850929940456840179914546843642
+ #endif
+@@ -50,6 +52,7 @@
+ unsigned int ByteLength;
+ unsigned int Profile;
+ unsigned int EncVersion;
++ unsigned int SampleRate;
+ } StreamInfo;
+
+ int TrueGapless = 0;
+@@ -110,6 +113,7 @@
+ static void play ( char* );
+ static void setvolume ( const int, const int );
+ static void infoDlg ( char* );
++static gchar *get_title(gchar *filename);
+ static void getfileinfo ( char*, char**, int* );
+ static void config ( void );
+ static void about ( void );
+@@ -124,7 +128,7 @@
+ static void Equalizer_Setup ( int on, float preamp_ctrl, float* eq_ctrl );
+
+
+-char displayed_info [512];
++/*char displayed_info [512];*/
+ static GtkWidget* mp_info = NULL;
+ static GtkWidget* mp_conf = NULL;
+ static GtkWidget* g_bitrate;
+@@ -355,6 +359,8 @@
+ Info -> Frames = HeaderData [1];
+ Info -> MS = (HeaderData [2] << 1) >> 31;
+ Info -> Profile = (HeaderData [2] >> 20) & 15;
++ static const unsigned short sftable [4] = { 44100, 48000, 37800, 32000 };
++ Info->SampleRate = sftable [ HeaderData[2] >> 22 & 2 ];
+ Info -> EncVersion = HeaderData [6] >> 24;
+ }
+ else {
+@@ -366,6 +372,7 @@
+ Info -> Frames >>= 16;
+ if ( Info -> StreamVersion < 6 ) // Bugfix: last frame was invalid for up to SV5
+ Info -> Frames--;
++ Info->SampleRate = 44100;
+ }
+
+ return 0;
+@@ -412,8 +419,6 @@
+ if ( GTK_TOGGLE_BUTTON (g_displaytaginfo) -> active ) {
+ i_displaytaginfo = 1;
+ strcpy ( TitleFormat, gtk_entry_get_text(GTK_ENTRY(titleformat_entry)) );
+- if ( *lastfilename != '\0' )
+- get_tags ( lastfilename );
+ }
+ else {
+ i_displaytaginfo = 0;
+@@ -437,8 +442,6 @@
+
+ if ( i_displaytaginfo ) {
+ strcpy ( TitleFormat, gtk_entry_get_text ( GTK_ENTRY (titleformat_entry) ) );
+- if ( *lastfilename != '\0' )
+- get_tags ( lastfilename );
+ }
+
+ write_cfg_file ();
+@@ -534,8 +537,8 @@
+ gtk_entry_set_text ( GTK_ENTRY (titleformat_entry), TitleFormat );
+ gtk_widget_set_sensitive ( titleformat_entry, i_displaytaginfo );
+ gtk_box_pack_start ( GTK_BOX (title_box), titleformat_entry, TRUE, TRUE, 0 );
+- gtk_widget_show ( titleformat_entry );
+- gtk_widget_show ( title_box );
++// gtk_widget_show ( titleformat_entry );
++// gtk_widget_show ( title_box );
+
+ format_box = gtk_hbox_new ( FALSE, 5 );
+ gtk_box_pack_start ( GTK_BOX (vbox), format_box, FALSE, FALSE, 0 );
+@@ -548,8 +551,8 @@
+ gtk_misc_set_alignment ( GTK_MISC (tag_description_label2), 0, 0 );
+ gtk_label_set_justify ( GTK_LABEL (tag_description_label2), GTK_JUSTIFY_LEFT );
+ gtk_box_pack_start ( GTK_BOX (format_box), tag_description_label2, TRUE, TRUE, 0 );
+- gtk_widget_show ( tag_description_label2 );
+- gtk_widget_show ( format_box );
++// gtk_widget_show ( tag_description_label2 );
++// gtk_widget_show ( format_box );
+
+ // The OK & Cancel buttons are separated from the config stuff
+ separator = gtk_hseparator_new ();
+@@ -846,17 +849,17 @@
+ Init_Tags ();
+ CopyTags ( filename );
+
+- printf ("Filename=%s\n", filename);
+- gettag ("Artist" , artist , sizeof artist ); printf ("Artist =%s\n", artist );
+- gettag ("Album" , album , sizeof album ); printf ("Album =%s\n", album );
+- gettag ("Title" , title , sizeof title ); printf ("Title =%s\n", title );
+- gettag ("Comment", comment, sizeof comment); printf ("Comment =%s\n", comment );
+- gettag ("Genre" , genre , sizeof genre ); printf ("Genre =%s\n", genre );
+- gettag ("Year" , year , sizeof year ); printf ("Year =%s\n", year );
+- gettag ("Track" , track , sizeof track ); printf ("Track =%s\n", track );
++ // printf ("Filename=%s\n", filename);
++ gettag ("Artist" , artist , sizeof artist );// printf ("Artist =%s\n", artist );
++ gettag ("Album" , album , sizeof album );// printf ("Album =%s\n", album );
++ gettag ("Title" , title , sizeof title );// printf ("Title =%s\n", title );
++ gettag ("Comment", comment, sizeof comment);// printf ("Comment =%s\n", comment );
++ gettag ("Genre" , genre , sizeof genre );// printf ("Genre =%s\n", genre );
++ gettag ("Year" , year , sizeof year );// printf ("Year =%s\n", year );
++ gettag ("Track" , track , sizeof track );// printf ("Track =%s\n", track );
+
+ tag_found = *artist && *album && (*title || !*track);
+- strcpy ( displayed_info, eval_tag_format ( filename, artist, album, title, year, comment, genre, track ) );
++/* strcpy ( displayed_info, eval_tag_format ( filename, artist, album, title, year, comment, genre, track ) );*/
+ }
+
+
+@@ -1354,8 +1357,6 @@
+ decode_pos_ms = 0;
+ seek_needed =-1;
+
+- get_tags ( lastfilename );
+-
+ // opening sound-device
+ maxlatency = mod.output -> open_audio ( FMT_S16_LE, SAMPLERATE, NCH );
+ if ( maxlatency < 0 ) { // cannot open sound device
+@@ -1379,7 +1380,9 @@
+ VBR_Bitrate = 0;
+ }
+
+- mod.set_info ( i_displaytaginfo && tag_found ? displayed_info : NULL,
++ char *title = get_title(filename);
++
++ mod.set_info ( title,
+ getlength (),
+ VBR_Bitrate,
+ SAMPLERATE / 1000,
+@@ -1587,12 +1590,57 @@
+ return;
+ }
+
++static gchar *get_title(gchar *filename)
++{
++ TitleInput *input;
++ gchar *temp, *ext, *_title, *path, *temp2;
++
++ XMMS_NEW_TITLEINPUT(input);
++
++ path = g_strdup(filename);
++ temp = g_strdup(filename);
++ ext = strrchr(temp, '.');
++ if (ext)
++ *ext = '\0';
++ temp2 = strrchr(path, '/');
++ if (temp2)
++ *temp2 = '\0';
++
++ input->file_name = g_basename(filename);
++ input->file_ext = ext ? ext+1 : NULL;
++ input->file_path = g_strdup_printf("%s/", path);
++
++ if(i_displaytaginfo)
++ {
++ get_tags(filename);
++ if(tag_found)
++ {
++ input->track_name = title;
++ input->performer = artist;
++ input->album_name = album;
++ input->track_number = atoi(track);
++ input->date = year;
++ input->genre = genre;
++ input->comment = comment;
++ }
++ }
++
++ _title = xmms_get_titlestring(xmms_get_gentitle_format(), input);
++ if ( _title == NULL )
++ _title = g_strdup(input->file_name);
++
++ g_free(temp);
++ g_free(path);
++ g_free(input);
++
++ return _title;
++}
+
+ static void
+ getfileinfo ( char* filename, char** _title, int* length_in_ms )
+ {
+ StreamInfo Info;
+- unsigned int tmpFrames;
++ *_title = get_title(filename);
+
+ if ( filename == NULL || filename[0] == '\0' ) { // currently playing file
+ if ( length_in_ms != NULL )
+@@ -1603,8 +1651,7 @@
+ if ( length_in_ms != NULL ) {
+ if ( ReadFileHeader ( filename, &Info) )
+ return;
+- tmpFrames = Info.Frames;
+- *length_in_ms = (int) ( tmpFrames * 1152.e3 / SAMPLERATE + 0.5f );
++ *length_in_ms = (int) ( Info.Frames * 1152.e3 / Info.SampleRate + 0.5f );
+ }
+ }
+ }
+@@ -1751,14 +1798,14 @@
+ xmms_usleep ( 25000 );
+
+ // does not jump back to file in playlist, sets "green" on idle or out of snyc
+- if ( i_bitrate ) {
++/* if ( i_bitrate ) {
+ mod.set_info ( i_displaytaginfo && tag_found ? displayed_info : NULL,
+ getlength (),
+ avg_bitrate,
+ SAMPLERATE / 1000,
+ NCH );
+ }
+-
++*/
+ killDecodeThread = 1;
+ pthread_exit (NULL);
+ return 0;
+@@ -1803,12 +1850,12 @@
+ Frames++;
+ if ( i_bitrate && Frames % i_bitrate == 0 ) {
+ avg_bitrate = 1000 * (int) ( (BitsRead()-BitCounter) * SAMPLERATE / 1152.e3 / i_bitrate );
+- mod.set_info ( i_displaytaginfo && tag_found ? displayed_info : NULL,
++/* mod.set_info ( i_displaytaginfo && tag_found ? displayed_info : NULL,
+ getlength (),
+ avg_bitrate,
+ SAMPLERATE / 1000,
+ NCH );
+-
++*/
+ BitCounter = BitsRead ();
+ }
+
diff --git a/media-plugins/xmms-musepack/xmms-musepack-0.98-r2.ebuild b/media-plugins/xmms-musepack/xmms-musepack-0.98-r2.ebuild
new file mode 100644
index 000000000000..791606ee0ed2
--- /dev/null
+++ b/media-plugins/xmms-musepack/xmms-musepack-0.98-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/xmms-musepack/xmms-musepack-0.98-r2.ebuild,v 1.1 2004/02/20 03:47:16 eradicator Exp $
+
+inherit flag-o-matic eutils
+
+# Enabling -mfpath=sse can cause high-pitched whine, at least on Pentiums.
+# This drops the entire flag for safety. Reports of success with any variations
+# would be welcomed, but mind those eardrums!
+# This seems to be fixed for the 0.98 release (see bug #32327)
+# filter-mfpmath "sse"
+
+DESCRIPTION="XMMS plugin to play audio files encoded with Andree Buschmann's encoder Musepack (mpc, mp+, mpp)"
+HOMEPAGE="http://sourceforge.net/projects/mpegplus/ http://www.personal.uni-jena.de/~pfk/MPP/index2.html"
+SRC_URI="http://www.personal.uni-jena.de/~pfk/MPP/src/xmms-${PV}.zip"
+#SRC_URI="mirror://sourceforge/mpegplus/${P}.tar.bz2"
+
+RESTRICT="nomirror"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="esd"
+
+RDEPEND="media-sound/xmms
+ esd? ( media-sound/esound )"
+
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+DOCS="ChangeLog README_mpc-plugin_english.txt README_mpc-plugin_finnish.txt README_mpc-plugin_german.txt README_mpc-plugin_korean.txt README_mpc-plugin_spanish.txt"
+
+src_unpack() {
+ mkdir ${S}
+ cd ${S}
+
+ unpack ${A}
+ # Fix up the atrocious Makefile.
+ epatch ${FILESDIR}/${P}-bad-makefile.patch
+ epatch ${FILESDIR}/${P}-titles.patch
+
+ if ! use esd; then
+ sed -i 's:#define USE_ESD_AUDIO:#undef USE_ESD_AUDIO:' mpp.h
+ fi
+}
+
+src_compile() {
+ # Makefile will use ARCH when calling gcc
+ emake ARCH="${CFLAGS}" || die
+}
+
+src_install() {
+ exeinto `xmms-config --input-plugin-dir`
+ doexe ${P}.so
+ dodoc ${DOCS}
+}