diff options
-rw-r--r-- | audio/nosefart/distinfo | 5 | ||||
-rw-r--r-- | audio/nosefart/patches/patch-ab | 44 | ||||
-rw-r--r-- | audio/nosefart/patches/patch-ac | 19 |
3 files changed, 61 insertions, 7 deletions
diff --git a/audio/nosefart/distinfo b/audio/nosefart/distinfo index ed26fcf1116..89b71b48e33 100644 --- a/audio/nosefart/distinfo +++ b/audio/nosefart/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.3 2005/02/23 20:39:50 agc Exp $ +$NetBSD: distinfo,v 1.4 2007/09/29 11:31:09 rillig Exp $ SHA1 (nosefart-2.3-mls.tar.bz2) = ab5755674adefa3f6f63e0772245831e7c0be2f7 RMD160 (nosefart-2.3-mls.tar.bz2) = 54365aaf542d76f726a9b9ebb0d93a7a219c2e5e Size (nosefart-2.3-mls.tar.bz2) = 531605 bytes SHA1 (patch-aa) = 0ccefb7d1e9cfa7ca147624ac117c9570f012609 -SHA1 (patch-ab) = 325c4038a865ec686a33d440540be16a46445564 +SHA1 (patch-ab) = d70cf260fe4c92b5dbdf286e412f97093a631a1b +SHA1 (patch-ac) = fc606d92877bc5f83c149b42570249d5f5778219 diff --git a/audio/nosefart/patches/patch-ab b/audio/nosefart/patches/patch-ab index a1c4df2da95..c3e20a51263 100644 --- a/audio/nosefart/patches/patch-ab +++ b/audio/nosefart/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.2 2004/12/03 13:02:18 wiz Exp $ +$NetBSD: patch-ab,v 1.3 2007/09/29 11:31:09 rillig Exp $ ---- src/linux/main_linux.c.orig Sat May 1 16:53:54 2004 -+++ src/linux/main_linux.c Thu Dec 2 01:58:01 2004 +--- src/linux/main_linux.c.orig 2004-05-02 01:53:54.000000000 +0200 ++++ src/linux/main_linux.c 2007-09-29 13:23:40.000000000 +0200 @@ -3,6 +3,7 @@ UNIX systems */ @@ -10,7 +10,32 @@ $NetBSD: patch-ab,v 1.2 2004/12/03 13:02:18 wiz Exp $ #include <stdio.h> #include <stdlib.h> #include <string.h> -@@ -342,12 +343,59 @@ +@@ -218,12 +219,12 @@ static void open_hardware(const char *de + exit(1); + } + } +- /* if it's not a char device and it's not /dev/dsp */ +- /* The second check is because when run with esddsp, /dev/dsp ++ /* if it's not a char device and it's not /dev/sound */ ++ /* The second check is because when run with esddsp, /dev/sound + doesn't show up as a char device. The original author (Matthew Conte) seems + to have thought that esddsp should work without this hack. Is doing this + bad? --Matthew Strait */ +- if( !S_ISCHR(status.st_mode) && strcmp("/dev/dsp", device)) ++ if( !S_ISCHR(status.st_mode) && strcmp("/dev/sound", device)) + { + printf("%s is not a character device.\n", device); + exit(1); +@@ -305,7 +306,7 @@ static void show_help(void) + printf("\t-h \tHelp\n"); + printf("\t-v \tVersion information\n"); + printf("\n\t-t x\tStart playing track x (default: 1)\n"); +- printf("\n\t-d x\tUse device x (default: /dev/dsp)\n"); ++ printf("\n\t-d x\tUse device x (default: /dev/sound)\n"); + printf("\t-s x\tPlay at x times the normal speed.\n"); + printf("\t-f x\tUse x sampling rate (default: 44100)\n"); + printf("\t-l x\tLimit total playing time to x seconds (0 = unlimited)\n"); +@@ -342,12 +343,59 @@ static void show_info(void) static void printsonginfo(int current_frame, int total_frames, int limited) { /*Why not printf directly? Our termios hijinks for input kills the output*/ @@ -70,7 +95,7 @@ $NetBSD: patch-ab,v 1.2 2004/12/03 13:02:18 wiz Exp $ snprintf(hi, 254, total_frames != 0 ? "Playing track %d/%d, channels %c%c%c%c%c%c, %d/%d sec, %d/%d frames\r": -@@ -363,9 +411,16 @@ +@@ -363,9 +411,16 @@ static void printsonginfo(int current_fr current_frame, total_frames ); @@ -87,3 +112,12 @@ $NetBSD: patch-ab,v 1.2 2004/12/03 13:02:18 wiz Exp $ write(STDOUT_FILENO, (void *)hi, strlen(hi)); free(hi); +@@ -565,7 +620,7 @@ static void close_nsf_file(void) + /* HAS ROOT PERMISSIONS -- BE CAREFUL */ + int main(int argc, char **argv) + { +- char *device = "/dev/dsp"; ++ char *device = "/dev/sound"; + char *filename; + int track = 1; + int done = 0; diff --git a/audio/nosefart/patches/patch-ac b/audio/nosefart/patches/patch-ac new file mode 100644 index 00000000000..7c725144a01 --- /dev/null +++ b/audio/nosefart/patches/patch-ac @@ -0,0 +1,19 @@ +$NetBSD: patch-ac,v 1.1 2007/09/29 11:31:09 rillig Exp $ + +Doing weird things in C requires weird code. Since gcc 4, casts return +an rvalue instead of an lvalue. + +--- src/sndhrdw/nes_apu.c.orig 2003-05-04 20:39:04.000000000 +0200 ++++ src/sndhrdw/nes_apu.c 2007-09-29 13:27:16.000000000 +0200 +@@ -1035,9 +1035,9 @@ void apu_process(void *buffer, int num_s + + /* signed 16-bit output, unsigned 8-bit */ + if (16 == apu->sample_bits) +- *((int16 *) buffer)++ = (int16) accum; ++ *(*((int16 **) &buffer))++ = (int16) accum; + else +- *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80; ++ *(*((uint8 **) &buffer))++ = (accum >> 8) ^ 0x80; + } + + /* resync cycle counter */ |