[Lunar-commits] <moonbase> wildmidi: These were moved to the mirrors but were not removed from

Dennis `stumbles` Veatch stumbles at lunar-linux.org
Wed Sep 16 11:22:19 CEST 2009


commit 9dcd18a630b2e2d141b3dd5f5f94c3606b5035a0
Author: Dennis `stumbles` Veatch <stumbles at lunar-linux.org>
Date:   Wed Sep 16 05:22:19 2009 -0400

    wildmidi: These were moved to the mirrors but were not removed from
    
    moonbase.
---
 zbeta/wildmidi/wildmidi-0.2.2-bigendian.patch    |   11 --
 zbeta/wildmidi/wildmidi-0.2.2-cfg-abs-path.patch |   30 -----
 zbeta/wildmidi/wildmidi-0.2.2-opt.patch          |   24 ----
 zbeta/wildmidi/wildmidi-0.2.2-pulseaudio.patch   |  147 ----------------------
 4 files changed, 0 insertions(+), 212 deletions(-)

diff --git a/zbeta/wildmidi/wildmidi-0.2.2-bigendian.patch b/zbeta/wildmidi/wildmidi-0.2.2-bigendian.patch
deleted file mode 100644
index d10b4bd..0000000
--- a/zbeta/wildmidi/wildmidi-0.2.2-bigendian.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- wildmidi-0.2.2/src/wildmidi.c.orig	2004-01-28 18:13:46.000000000 +0000
-+++ wildmidi-0.2.2/src/wildmidi.c	2008-07-06 14:31:38.000000000 +0100
-@@ -442,7 +442,7 @@
- 		return -1;
- 	}
- 	
--	if (snd_pcm_hw_params_set_format (pcm, hw, SND_PCM_FORMAT_S16) < 0) {
-+	if (snd_pcm_hw_params_set_format (pcm, hw, SND_PCM_FORMAT_S16_LE) < 0) {
- 		printf("ALSA does not support 16bit signed audio for your soundcard\n");
- 		close_alsa_output();
- 		return -1;
diff --git a/zbeta/wildmidi/wildmidi-0.2.2-cfg-abs-path.patch b/zbeta/wildmidi/wildmidi-0.2.2-cfg-abs-path.patch
deleted file mode 100644
index 46c3373..0000000
--- a/zbeta/wildmidi/wildmidi-0.2.2-cfg-abs-path.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -up wildmidi-0.2.2/src/wildmidi_lib.c.abs wildmidi-0.2.2/src/wildmidi_lib.c
---- wildmidi-0.2.2/src/wildmidi_lib.c.abs	2004-01-28 19:13:46.000000000 +0100
-+++ wildmidi-0.2.2/src/wildmidi_lib.c	2007-07-14 16:54:28.000000000 +0200
-@@ -845,7 +845,7 @@ WM_LoadConfig (const char *config_file) 
- 			}
- 			continue;
- 		} else if (strncasecmp(line_buffer, "source ", 7) == 0) {
--			if (config_dir != NULL) {
-+			if (config_dir != NULL && line_buffer[7] != '/') {
- 				new_config = malloc(strlen(config_dir) + strlen(&line_buffer[7]) + 1);
- 				if (new_config == NULL) {
- 					WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse config", errno);
-@@ -1013,7 +1013,7 @@ WM_LoadConfig (const char *config_file) 
- 				*chr_ptr = '\0';
- 			}
- 			if (strncasecmp(&line_buffer[(line_ptr + strlen(&line_buffer[line_ptr]) - 5)], ".pat", 4) != 0) {
--				if (config_dir != NULL) {
-+				if (config_dir != NULL && line_buffer[line_ptr] != '/') {
- 					tmp_patch->filename = malloc(strlen(config_dir) + strlen(&line_buffer[line_ptr]) + 5);
- 					if (tmp_patch->filename == NULL) {
- 						WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, 0);
-@@ -1041,7 +1041,7 @@ WM_LoadConfig (const char *config_file) 
- 				}
- 				strcat(tmp_patch->filename, ".pat");
- 			} else {
--				if (config_dir != NULL) {
-+				if (config_dir != NULL && line_buffer[line_ptr] != '/') {
- 					tmp_patch->filename = malloc(strlen(config_dir) + strlen(&line_buffer[line_ptr]) + 1);
- 					if (tmp_patch->filename == NULL) {
- 						WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, 0);
diff --git a/zbeta/wildmidi/wildmidi-0.2.2-opt.patch b/zbeta/wildmidi/wildmidi-0.2.2-opt.patch
deleted file mode 100644
index 2169319..0000000
--- a/zbeta/wildmidi/wildmidi-0.2.2-opt.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -up wildmidi-0.2.2/configure.ac.opt wildmidi-0.2.2/configure.ac
---- wildmidi-0.2.2/configure.ac.opt	2007-07-14 15:21:57.000000000 +0200
-+++ wildmidi-0.2.2/configure.ac	2007-07-14 15:22:03.000000000 +0200
-@@ -226,6 +226,8 @@ AC_ARG_WITH(arch,
- )
- 
- case "$arch" in
-+	no)
-+		;;
- 	auto)
- 		case "${host_cpu}" in
- 			i?86)
-diff -up wildmidi-0.2.2/configure.opt wildmidi-0.2.2/configure
---- wildmidi-0.2.2/configure.opt	2007-07-14 15:21:54.000000000 +0200
-+++ wildmidi-0.2.2/configure	2007-07-14 15:22:52.000000000 +0200
-@@ -19966,6 +19966,8 @@ else
- fi;
- 
- case "$arch" in
-+	no)
-+		;;
- 	auto)
- 		case "${host_cpu}" in
- 			i?86)
diff --git a/zbeta/wildmidi/wildmidi-0.2.2-pulseaudio.patch b/zbeta/wildmidi/wildmidi-0.2.2-pulseaudio.patch
deleted file mode 100644
index 2a7ffdf..0000000
--- a/zbeta/wildmidi/wildmidi-0.2.2-pulseaudio.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-diff -up wildmidi-0.2.2/src/wildmidi.c.pa wildmidi-0.2.2/src/wildmidi.c
---- wildmidi-0.2.2/src/wildmidi.c.pa	2004-01-28 19:13:46.000000000 +0100
-+++ wildmidi-0.2.2/src/wildmidi.c	2008-02-09 14:54:58.000000000 +0100
-@@ -402,12 +402,8 @@ close_mm_output ( void ) {
- #else
- #ifdef HAVE_ALSA
- 
--void *buffer;
--int bps;
- int alsa_first_time = 1;
- static snd_pcm_t  *pcm;
--static snd_pcm_uframes_t alsa_period_size;
--static snd_pcm_channel_area_t *areas;
- 
- int write_alsa_output (char * output_data, int output_size);
- void close_alsa_output ( void );
-@@ -417,9 +413,8 @@ open_alsa_output(void) {
- 	snd_pcm_hw_params_t     *hw;
- 	snd_pcm_sw_params_t     *sw;
- 	int err;
--	int alsa_buffer_time, bits_per_sample;
-+	int alsa_buffer_time;
- 	unsigned int alsa_period_time;
--	snd_pcm_uframes_t alsa_buffer_size;
- 	
- 	if (!pcmname)
- 		pcmname = "default";
-@@ -437,7 +432,7 @@ open_alsa_output(void) {
- 		return -1;
- 	}
- 
--	if ((err = snd_pcm_hw_params_set_access(pcm, hw, SND_PCM_ACCESS_MMAP_INTERLEAVED)) < 0) {
-+	if ((err = snd_pcm_hw_params_set_access(pcm, hw, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) {
- 		printf("Cannot set mmap'ed mode: %s.\n", snd_strerror(-err));
- 		return -1;
- 	}
-@@ -491,28 +486,6 @@ open_alsa_output(void) {
- 		return -1;
- 	}
- 
--#ifdef ALSA_NEW
--	if ((err = snd_pcm_hw_params_get_buffer_size(hw, &alsa_buffer_size)) < 0)
--#else
--	if ((err = snd_pcm_hw_params_get_buffer_size(hw)) < 0)
--#endif
--	{
--		printf ("snd_pcm_hw_params_get_buffer_size() failed: %s\n", snd_strerror(-err));
--		return -1;
--	}
--#ifdef ALSA_NEW
--	if ((err = snd_pcm_hw_params_get_period_size(hw, &alsa_period_size, 0)) < 0)	
--#else
--	alsa_buffer_size = err;
--	if ((err = snd_pcm_hw_params_get_period_size(hw, 0)) < 0)
--#endif
--	{
--		printf ("snd_pcm_hw_params_get_period_size() failed: %s\n", snd_strerror(-err));
--		return -1;
--	}
--#ifndef ALSA_NEW
--	alsa_period_size = err;
--#endif	
- 	snd_pcm_sw_params_alloca(&sw);
- 	snd_pcm_sw_params_current(pcm, sw);
- 	if (snd_pcm_sw_params(pcm, sw) < 0)
-@@ -521,19 +494,6 @@ open_alsa_output(void) {
- 		return -1;
- 	}
- 	
--	bits_per_sample = snd_pcm_format_physical_width(SND_PCM_FORMAT_S16);
--	bps = (rate * bits_per_sample * 2) / 8000;
--
--	buffer = malloc(alsa_period_size * bits_per_sample / 8 * 2);
--	areas = malloc(2 * sizeof(snd_pcm_channel_area_t));
--
--	areas[0].addr = buffer;
--	areas[0].first = 0;
--	areas[0].step = 2 * bits_per_sample;
--	areas[1].addr = buffer;
--        areas[1].first = bits_per_sample;
--        areas[1].step = 2 * bits_per_sample;
--	
- 	send_output = write_alsa_output;
- 	close_output = close_alsa_output;
- 	return 0;			
-@@ -541,45 +501,23 @@ open_alsa_output(void) {
- 
- int 
- write_alsa_output (char * output_data, int output_size) {
--	int cnt = 0, err;
--	snd_pcm_uframes_t offset, frames;
--	snd_pcm_sframes_t avail;
--	const snd_pcm_channel_area_t *chan_areas = areas;
-+	int err;
-+	snd_pcm_uframes_t frames;
- 	
- 	while (output_size > 0) {
--		avail = snd_pcm_avail_update(pcm);
--		if (avail == -EPIPE) {
--			if (snd_pcm_state(pcm) == SND_PCM_STATE_XRUN) {
--				if ((err = snd_pcm_prepare(pcm)) < 0)
--					printf("snd_pcm_prepare() failed.\n");
--				alsa_first_time = 1;
--			}
--		} else if (avail < 0) {
--			printf("snd_pcm_avail_update() failed: %s\n", snd_strerror(-avail));
--			avail = 0;
--		}
--		if (avail < alsa_period_size) {
--			usleep(500);
--			continue;
--		}
- 		frames = snd_pcm_bytes_to_frames(pcm, output_size);
--		if ((err = snd_pcm_mmap_begin(pcm, &chan_areas, &offset, &frames)) < 0) {
--			printf("snd_pcm_mmap_begin() failed: %s\n", snd_strerror(-err));
--		}
--		cnt = snd_pcm_frames_to_bytes(pcm, frames);
--		memcpy((char*) chan_areas[0].addr + snd_pcm_frames_to_bytes(pcm, offset), output_data, cnt);
--		if ((err = snd_pcm_mmap_commit(pcm, offset, frames)) < 0) {
-+		if ((err = snd_pcm_writei(pcm, output_data, frames)) < 0) {
- 			if (snd_pcm_state(pcm) == SND_PCM_STATE_XRUN) {
- 				if ((err = snd_pcm_prepare(pcm)) < 0)
- 					printf("snd_pcm_prepare() failed.\n");
- 				alsa_first_time = 1;
-+				continue;
- 			}
-+			return err;
- 		}
--		if (err != frames)
--			printf("snd_pcm_mmap_commit returned %d, expected %d\n", err, (int)frames);
- 		
--		output_size -= cnt;
--		output_data += cnt;
-+		output_size -= snd_pcm_frames_to_bytes(pcm, err);
-+		output_data += snd_pcm_frames_to_bytes(pcm, err);
- 		if (alsa_first_time) {
- 			alsa_first_time = 0;
- 			snd_pcm_start(pcm);
-@@ -591,8 +529,6 @@ write_alsa_output (char * output_data, i
- void 
- close_alsa_output ( void ) {
- 	snd_pcm_close (pcm);
--	free(areas);
--	free(buffer);
- }
- 
- #else


More information about the Lunar-commits mailing list