* Allow effects plugins to work; from Thomas Pfaff

* Fix wrong visual when clicking the 'D' button to resize; from FreeBSD
This commit is contained in:
naddy 2010-12-05 15:52:19 +00:00
parent 1e1983ff9d
commit 2ec1e00a32
3 changed files with 37 additions and 12 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.73 2010/11/26 07:07:56 espie Exp $
# $OpenBSD: Makefile,v 1.74 2010/12/05 15:52:19 naddy Exp $
COMMENT-main= Multimedia player for the X Window System
COMMENT-vorbis= Ogg Vorbis input plugin for XMMS
@ -10,7 +10,7 @@ SHARED_ONLY= Yes
VERSION= 1.2.11
DISTNAME= xmms-${VERSION}
PKGNAME-main= xmms-${VERSION}
REVISION-main= 7
REVISION-main= 8
PKGNAME-vorbis= xmms-vorbis-${VERSION}
REVISION-vorbis= 1
PKGNAME-mikmod= xmms-mikmod-${VERSION}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008,2009 Thomas Pfaff <tpfaff@tp76.info>
* Copyright (c) 2008-2010 Thomas Pfaff <tpfaff@tp76.info>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -26,7 +26,7 @@
#include <xmms/i18n.h>
#include <xmms/plugin.h>
#define VERSION "1.0"
#define VERSION "1.1"
#define XMMS_MAXVOL 100
static void op_init (void);
@ -57,6 +57,7 @@ static long long wrpos;
static int paused;
static int volume = XMMS_MAXVOL;
static long bytes_per_sec;
static AFormat afmt;
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static GtkWidget *configure_win;
@ -153,6 +154,7 @@ op_open (AFormat fmt, int rate, int nch)
}
sio_initpar (&par);
afmt = fmt;
switch (fmt) {
case FMT_U8:
par.bits = 8;
@ -245,14 +247,25 @@ error:
static void
op_write (void *ptr, int len)
{
if (!paused) {
/* Do not lock sio_write as this will cause the GUI thread
to block waiting for a blocked sio_write to return. */
int bytes = sio_write (hdl, ptr, len);
pthread_mutex_lock (&mutex);
wrpos += bytes;
pthread_mutex_unlock (&mutex);
}
EffectPlugin *ep;
if (paused)
return;
/* This sucks but XMMS totally broke the effect plugin code when
they added support for multiple enabled effects. Complain to
the non-existent XMMS team if a plugin does not work, however
this does not seem to affect any plugins in our ports tree. */
ep = get_current_effect_plugin ();
ep->mod_samples (&ptr, len, afmt, par.rate, par.pchan);
/* Do not lock sio_write as this will cause the GUI thread
to block waiting for a blocked sio_write to return. */
len = sio_write (hdl, ptr, len);
pthread_mutex_lock (&mutex);
wrpos += len;
pthread_mutex_unlock (&mutex);
}
static void

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-xmms_util_c,v 1.1 2010/12/05 15:52:19 naddy Exp $
--- xmms/util.c.orig Sun Jul 16 15:40:04 2006
+++ xmms/util.c Sun Dec 5 16:25:05 2010
@@ -175,7 +175,7 @@ GdkImage *create_dblsize_image(GdkImage * img)
* This needs to be optimized
*/
- dblimg = gdk_image_new(GDK_IMAGE_NORMAL, gdk_visual_get_best(), img->width << 1, img->height << 1);
+ dblimg = gdk_image_new(GDK_IMAGE_NORMAL, gdk_visual_get_best_with_depth(img->depth), img->width << 1, img->height << 1);
if (dblimg->bpp == 1)
{
char *srcptr, *ptr, *ptr2;