Disentangle overlapping patches, rename and regenerate. No code changes.

This commit is contained in:
Christian Weisgerber 2014-12-23 20:58:43 +00:00
parent 8d1aa1949b
commit c67fa8855f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=375355
11 changed files with 217 additions and 240 deletions

View file

@ -1,5 +1,5 @@
--- General/ir/ir.c.orig Mon Mar 5 14:17:44 2001 --- General/ir/ir.c.orig 2005-05-21 18:04:04 UTC
+++ General/ir/ir.c Sat Dec 16 15:41:23 2006 +++ General/ir/ir.c
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
#include "ir.h" #include "ir.h"

View file

@ -0,0 +1,31 @@
--- Output/OSS/OSS.h.orig 2003-06-11 18:44:17 UTC
+++ Output/OSS/OSS.h
@@ -37,7 +37,19 @@
#include <stdio.h>
#include <string.h>
+#ifdef __FreeBSD__
+#include <sys/soundcard.h>
+#else
#include "soundcard.h"
+#endif
+
+#ifndef SNDCTL_DSP_GETPLAYVOL
+#define SNDCTL_DSP_GETPLAYVOL SOUND_MIXER_READ_PCM
+#endif
+
+#ifndef SNDCTL_DSP_SETPLAYVOL
+#define SNDCTL_DSP_SETPLAYVOL SOUND_MIXER_WRITE_PCM
+#endif
#include "xmms/plugin.h"
#include "libxmms/configfile.h"
@@ -82,6 +94,8 @@ int oss_get_output_time(void);
int oss_get_written_time(void);
void oss_set_audio_params(void);
+int oss_get_fd(void);
+
void oss_free_convert_buffer(void);
int (*oss_get_convert_func(int output, int input))(void **, int);
int (*oss_get_stereo_convert_func(int output, int input))(void **, int, int);

View file

@ -0,0 +1,80 @@
--- Output/OSS/audio.c.orig 2005-05-15 00:01:20 UTC
+++ Output/OSS/audio.c
@@ -23,7 +23,7 @@
#define NFRAGS 32
-static gint fd = 0;
+static gint fd = -1;
static char *buffer;
static gboolean going, prebuffer, paused, unpause, do_pause, remove_prebuffer;
static gint device_buffer_used, buffer_size, prebuffer_size, blk_size;
@@ -273,8 +273,10 @@ static void oss_write_audio(gpointer dat
{
output_time_offset += (output_bytes * 1000) / output.bps;
output_bytes = 0;
+#ifndef __FreeBSD__
close(fd);
fd = open(device_name,O_WRONLY);
+#endif
oss_setup_format(new_format, new_frequency, new_channels);
}
if (effects_enabled() && ep && ep->mod_samples)
@@ -480,6 +482,7 @@ void oss_close(void)
{
ioctl(fd, SNDCTL_DSP_RESET, 0);
close(fd);
+ fd = -1;
}
g_free(device_name);
oss_free_convert_buffer();
@@ -498,8 +501,10 @@ void oss_flush(gint time)
else
{
ioctl(fd, SNDCTL_DSP_RESET, 0);
+#ifndef __FreeBSD__
close(fd);
fd = open(device_name, O_WRONLY);
+#endif
oss_set_audio_params();
output_time_offset = time;
written = ((guint64)time * input.bps) / 1000;
@@ -568,8 +573,10 @@ void *oss_loop(void *arg)
else if (unpause && paused)
{
unpause = FALSE;
+#ifndef __FreeBSD__
close(fd);
fd = open(device_name, O_WRONLY);
+#endif
oss_set_audio_params();
paused = FALSE;
}
@@ -583,8 +590,10 @@ void *oss_loop(void *arg)
*/
ioctl(fd, SNDCTL_DSP_RESET, 0);
+#ifndef __FreeBSD__
close(fd);
fd = open(device_name, O_WRONLY);
+#endif
oss_set_audio_params();
output_time_offset = flush;
written = ((guint64)flush * input.bps) / 1000;
@@ -597,6 +606,7 @@ void *oss_loop(void *arg)
ioctl(fd, SNDCTL_DSP_RESET, 0);
close(fd);
+ fd = -1;
g_free(buffer);
pthread_exit(NULL);
}
@@ -707,3 +717,8 @@ gint oss_open(AFormat fmt, gint rate, gi
pthread_create(&buffer_thread, NULL, oss_loop, NULL);
return 1;
}
+
+int oss_get_fd(void)
+{
+ return fd;
+}

View file

@ -0,0 +1,91 @@
--- Output/OSS/mixer.c.orig 2001-06-16 13:30:35 UTC
+++ Output/OSS/mixer.c
@@ -34,12 +34,20 @@ static char* get_mixer_device(void)
void oss_get_volume(int *l, int *r)
{
- int fd, v, cmd, devs;
+ int fd, v, devs, dspfd;
+ long cmd;
gchar *devname;
- devname = get_mixer_device();
- fd = open(devname, O_RDONLY);
- g_free(devname);
+ dspfd = oss_get_fd();
+ if (oss_cfg.use_master == 0 && dspfd != -1) {
+ fd = dspfd;
+ dspfd = 1;
+ } else {
+ devname = get_mixer_device();
+ fd = open(devname, O_RDONLY);
+ g_free(devname);
+ dspfd = 0;
+ }
/*
* We dont show any errors if this fails, as this is called
@@ -49,28 +57,40 @@ void oss_get_volume(int *l, int *r)
{
ioctl(fd, SOUND_MIXER_READ_DEVMASK, &devs);
if ((devs & SOUND_MASK_PCM) && (oss_cfg.use_master==0))
- cmd = SOUND_MIXER_READ_PCM;
+ cmd = (dspfd != 0) ? SNDCTL_DSP_GETPLAYVOL :
+ SOUND_MIXER_READ_PCM;
else if ((devs & SOUND_MASK_VOLUME) && (oss_cfg.use_master==1))
cmd = SOUND_MIXER_READ_VOLUME;
else
{
- close(fd);
+ if (dspfd == 0)
+ close(fd);
return;
}
ioctl(fd, cmd, &v);
*r = (v & 0xFF00) >> 8;
*l = (v & 0x00FF);
- close(fd);
+ if (dspfd == 0)
+ close(fd);
}
}
void oss_set_volume(int l, int r)
{
- int fd, v, cmd, devs;
+ int fd, v, devs, dspfd;
+ long cmd;
gchar *devname;
- devname = get_mixer_device();
- fd = open(devname, O_RDONLY);
+ dspfd = oss_get_fd();
+ if (oss_cfg.use_master == 0 && dspfd != -1) {
+ fd = dspfd;
+ dspfd = 1;
+ devname = g_strdup("<OSS FD>");
+ } else {
+ devname = get_mixer_device();
+ fd = open(devname, O_RDONLY);
+ dspfd = 0;
+ }
if (fd != -1)
{
@@ -81,12 +101,14 @@ void oss_set_volume(int l, int r)
cmd = SOUND_MIXER_WRITE_VOLUME;
else
{
- close(fd);
+ if (dspfd == 0)
+ close(fd);
return;
}
v = (r << 8) | l;
ioctl(fd, cmd, &v);
- close(fd);
+ if (dspfd == 0)
+ close(fd);
}
else
g_warning("oss_set_volume(): Failed to open mixer device (%s): %s",

View file

@ -1,22 +0,0 @@
--- Output/OSS/mixer.c.orig Thu Sep 29 09:46:32 2005
+++ Output/OSS/mixer.c Thu Sep 29 09:47:14 2005
@@ -34,7 +34,8 @@
void oss_get_volume(int *l, int *r)
{
- int fd, v, cmd, devs;
+ int fd, v, devs;
+ long cmd;
gchar *devname;
devname = get_mixer_device();
@@ -66,7 +67,8 @@
void oss_set_volume(int l, int r)
{
- int fd, v, cmd, devs;
+ int fd, v, devs;
+ long cmd;
gchar *devname;
devname = get_mixer_device();

View file

@ -1,6 +1,6 @@
--- Output/esd/esdout.h.orig 2007-11-29 20:12:28.743052713 +0100 --- Output/esd/esdout.h.orig 2004-07-18 20:03:46 UTC
+++ Output/esd/esdout.h 2007-11-29 20:12:42.453407104 +0100 +++ Output/esd/esdout.h
@@ -68,6 +68,7 @@ @@ -68,6 +68,7 @@ void esdout_fetch_volume(int *l, int *r)
void esdout_set_volume(int l, int r); void esdout_set_volume(int l, int r);
void esdout_mixer_init(void); void esdout_mixer_init(void);
void esdout_mixer_init_vol(int l, int r); void esdout_mixer_init_vol(int l, int r);

View file

@ -1,6 +1,6 @@
--- Output/esd/mixer.c.orig Thu Sep 29 09:48:56 2005 --- Output/esd/mixer.c.orig 2006-07-16 13:40:04 UTC
+++ Output/esd/mixer.c Thu Sep 29 09:49:25 2005 +++ Output/esd/mixer.c
@@ -146,7 +146,8 @@ @@ -164,7 +164,8 @@ void esdout_set_volume(int l, int r)
static void esdout_get_oss_volume(int *l, int *r) static void esdout_get_oss_volume(int *l, int *r)
{ {
@ -10,7 +10,7 @@
if (esd_cfg.use_remote) if (esd_cfg.use_remote)
return; return;
@@ -173,7 +174,8 @@ @@ -191,7 +192,8 @@ static void esdout_get_oss_volume(int *l
static void esdout_set_oss_volume(int l, int r) static void esdout_set_oss_volume(int l, int r)
{ {

View file

@ -1,203 +0,0 @@
--- Output/OSS/OSS.h.orig Tue Jun 19 04:16:56 2007
+++ Output/OSS/OSS.h Tue Jun 19 04:17:00 2007
@@ -37,7 +37,19 @@
#include <stdio.h>
#include <string.h>
+#ifdef __FreeBSD__
+#include <sys/soundcard.h>
+#else
#include "soundcard.h"
+#endif
+
+#ifndef SNDCTL_DSP_GETPLAYVOL
+#define SNDCTL_DSP_GETPLAYVOL SOUND_MIXER_READ_PCM
+#endif
+
+#ifndef SNDCTL_DSP_SETPLAYVOL
+#define SNDCTL_DSP_SETPLAYVOL SOUND_MIXER_WRITE_PCM
+#endif
#include "xmms/plugin.h"
#include "libxmms/configfile.h"
@@ -81,6 +93,8 @@
int oss_get_output_time(void);
int oss_get_written_time(void);
void oss_set_audio_params(void);
+
+int oss_get_fd(void);
void oss_free_convert_buffer(void);
int (*oss_get_convert_func(int output, int input))(void **, int);
--- Output/OSS/audio.c.orig Tue Jun 19 04:17:17 2007
+++ Output/OSS/audio.c Tue Jun 19 04:17:20 2007
@@ -23,7 +23,7 @@
#define NFRAGS 32
-static gint fd = 0;
+static gint fd = -1;
static char *buffer;
static gboolean going, prebuffer, paused, unpause, do_pause, remove_prebuffer;
static gint device_buffer_used, buffer_size, prebuffer_size, blk_size;
@@ -273,8 +273,10 @@
{
output_time_offset += (output_bytes * 1000) / output.bps;
output_bytes = 0;
+#ifndef __FreeBSD__
close(fd);
fd = open(device_name,O_WRONLY);
+#endif
oss_setup_format(new_format, new_frequency, new_channels);
}
if (effects_enabled() && ep && ep->mod_samples)
@@ -480,6 +482,7 @@
{
ioctl(fd, SNDCTL_DSP_RESET, 0);
close(fd);
+ fd = -1;
}
g_free(device_name);
oss_free_convert_buffer();
@@ -498,8 +501,10 @@
else
{
ioctl(fd, SNDCTL_DSP_RESET, 0);
+#ifndef __FreeBSD__
close(fd);
fd = open(device_name, O_WRONLY);
+#endif
oss_set_audio_params();
output_time_offset = time;
written = ((guint64)time * input.bps) / 1000;
@@ -568,8 +573,10 @@
else if (unpause && paused)
{
unpause = FALSE;
+#ifndef __FreeBSD__
close(fd);
fd = open(device_name, O_WRONLY);
+#endif
oss_set_audio_params();
paused = FALSE;
}
@@ -583,8 +590,10 @@
*/
ioctl(fd, SNDCTL_DSP_RESET, 0);
+#ifndef __FreeBSD__
close(fd);
fd = open(device_name, O_WRONLY);
+#endif
oss_set_audio_params();
output_time_offset = flush;
written = ((guint64)flush * input.bps) / 1000;
@@ -597,6 +606,7 @@
ioctl(fd, SNDCTL_DSP_RESET, 0);
close(fd);
+ fd = -1;
g_free(buffer);
pthread_exit(NULL);
}
@@ -706,4 +716,9 @@
if (!realtime)
pthread_create(&buffer_thread, NULL, oss_loop, NULL);
return 1;
+}
+
+int oss_get_fd(void)
+{
+ return fd;
}
--- Output/OSS/mixer.c.orig Tue Jun 19 04:21:32 2007
+++ Output/OSS/mixer.c Tue Jun 19 04:21:38 2007
@@ -34,13 +34,20 @@
void oss_get_volume(int *l, int *r)
{
- int fd, v, devs;
+ int fd, v, devs, dspfd;
long cmd;
gchar *devname;
- devname = get_mixer_device();
- fd = open(devname, O_RDONLY);
- g_free(devname);
+ dspfd = oss_get_fd();
+ if (oss_cfg.use_master == 0 && dspfd != -1) {
+ fd = dspfd;
+ dspfd = 1;
+ } else {
+ devname = get_mixer_device();
+ fd = open(devname, O_RDONLY);
+ g_free(devname);
+ dspfd = 0;
+ }
/*
* We dont show any errors if this fails, as this is called
@@ -50,29 +57,40 @@
{
ioctl(fd, SOUND_MIXER_READ_DEVMASK, &devs);
if ((devs & SOUND_MASK_PCM) && (oss_cfg.use_master==0))
- cmd = SOUND_MIXER_READ_PCM;
+ cmd = (dspfd != 0) ? SNDCTL_DSP_GETPLAYVOL :
+ SOUND_MIXER_READ_PCM;
else if ((devs & SOUND_MASK_VOLUME) && (oss_cfg.use_master==1))
cmd = SOUND_MIXER_READ_VOLUME;
else
{
- close(fd);
+ if (dspfd == 0)
+ close(fd);
return;
}
ioctl(fd, cmd, &v);
*r = (v & 0xFF00) >> 8;
*l = (v & 0x00FF);
- close(fd);
+ if (dspfd == 0)
+ close(fd);
}
}
void oss_set_volume(int l, int r)
{
- int fd, v, devs;
+ int fd, v, devs, dspfd;
long cmd;
gchar *devname;
- devname = get_mixer_device();
- fd = open(devname, O_RDONLY);
+ dspfd = oss_get_fd();
+ if (oss_cfg.use_master == 0 && dspfd != -1) {
+ fd = dspfd;
+ dspfd = 1;
+ devname = g_strdup("<OSS FD>");
+ } else {
+ devname = get_mixer_device();
+ fd = open(devname, O_RDONLY);
+ dspfd = 0;
+ }
if (fd != -1)
{
@@ -83,12 +101,14 @@
cmd = SOUND_MIXER_WRITE_VOLUME;
else
{
- close(fd);
+ if (dspfd == 0)
+ close(fd);
return;
}
v = (r << 8) | l;
ioctl(fd, cmd, &v);
- close(fd);
+ if (dspfd == 0)
+ close(fd);
}
else
g_warning("oss_set_volume(): Failed to open mixer device (%s): %s",

View file

@ -1,5 +1,5 @@
--- xmms/bmp.c.orig 2006-07-16 15:40:04.000000000 +0200 --- xmms/bmp.c.orig 2006-07-16 13:40:04 UTC
+++ xmms/bmp.c 2014-04-08 17:04:26.000000000 +0200 +++ xmms/bmp.c
@@ -19,6 +19,12 @@ @@ -19,6 +19,12 @@
*/ */
#include "xmms.h" #include "xmms.h"

View file

@ -1,4 +1,4 @@
--- xmms/i18n.h.in.orig --- xmms/i18n.h.in.orig 2007-11-16 21:56:53 UTC
+++ xmms/i18n.h.in +++ xmms/i18n.h.in
@@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
#undef ENABLE_NLS #undef ENABLE_NLS

View file

@ -1,5 +1,5 @@
--- xmms/util.c.orig 2006-11-05 12:29:59.000000000 +0800 --- xmms/util.c.orig 2006-07-16 13:40:04 UTC
+++ xmms/util.c 2006-11-05 12:30:01.000000000 +0800 +++ xmms/util.c
@@ -175,7 +175,7 @@ GdkImage *create_dblsize_image(GdkImage @@ -175,7 +175,7 @@ GdkImage *create_dblsize_image(GdkImage
* This needs to be optimized * This needs to be optimized
*/ */
@ -8,4 +8,4 @@
+ dblimg = gdk_image_new(GDK_IMAGE_NORMAL, gdk_visual_get_best_with_depth(img->depth), 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) if (dblimg->bpp == 1)
{ {
register guint8 *srcptr, *ptr, *ptr2, pix; char *srcptr, *ptr, *ptr2;