diff options
author | itohy <itohy@pkgsrc.org> | 2001-11-18 15:03:39 +0000 |
---|---|---|
committer | itohy <itohy@pkgsrc.org> | 2001-11-18 15:03:39 +0000 |
commit | df9513074d104e94072bd74b275de06e032d0614 (patch) | |
tree | 9a7142f957c52f113cf82629be64295d30058b15 /audio/xwave | |
parent | d82cdeddfc12d9b444eb6aa1230671d0d49cd35d (diff) | |
download | pkgsrc-df9513074d104e94072bd74b275de06e032d0614.tar.gz |
- Fix file I/O on alpha. Only RIFF(PCM) is tested.
- Fix offset on copy & paste when current format has header (not raw format).
Diffstat (limited to 'audio/xwave')
-rw-r--r-- | audio/xwave/distinfo | 13 | ||||
-rw-r--r-- | audio/xwave/patches/patch-ab | 74 | ||||
-rw-r--r-- | audio/xwave/patches/patch-ac | 30 | ||||
-rw-r--r-- | audio/xwave/patches/patch-ag | 19 | ||||
-rw-r--r-- | audio/xwave/patches/patch-aj | 83 | ||||
-rw-r--r-- | audio/xwave/patches/patch-ap | 33 | ||||
-rw-r--r-- | audio/xwave/patches/patch-aq | 36 | ||||
-rw-r--r-- | audio/xwave/patches/patch-ar | 12 |
8 files changed, 282 insertions, 18 deletions
diff --git a/audio/xwave/distinfo b/audio/xwave/distinfo index fbabfbbda4a..c2e19fbf026 100644 --- a/audio/xwave/distinfo +++ b/audio/xwave/distinfo @@ -1,19 +1,22 @@ -$NetBSD: distinfo,v 1.4 2001/11/18 05:37:43 itohy Exp $ +$NetBSD: distinfo,v 1.5 2001/11/18 15:03:39 itohy Exp $ SHA1 (xwave2.tar.gz) = 7ace9911c9425eab4907a34694cd208d21a6dac2 Size (xwave2.tar.gz) = 269942 bytes SHA1 (patch-aa) = 934f1818bc09fb8b6ccea1ec921fac95a460098f -SHA1 (patch-ab) = c24ab6c35fca905576cfec349af10e35dc0f3d96 -SHA1 (patch-ac) = 4473de56ceb8df17a1bcdd67a1134bf642244fbe +SHA1 (patch-ab) = 28801c1e4722275b599e9035e65136b9cc25215d +SHA1 (patch-ac) = ae802fc9d4f882089496f41cc7b06412ae9ddf62 SHA1 (patch-ad) = 373a8b9aff67f768e4968c349298f74d0d3deb5f SHA1 (patch-ae) = 9b4fed9bb232334f2fcaaf59db152d1b078f3702 SHA1 (patch-af) = 01d5fdad2c7056252ab64c49d9ebb06c7b5fbf6c -SHA1 (patch-ag) = 8105ecafd316493fb2f13053e824e53d5192e389 +SHA1 (patch-ag) = f06b4eecf0eafc985077fa2c356cd4c0e88cfe15 SHA1 (patch-ah) = 61449264babde8d304f93084dbfa194d9a8b07c8 SHA1 (patch-ai) = 34cd50fc75d5dd604349d5f694a993f23d87a24a -SHA1 (patch-aj) = 6705d6249ccb8c5e43bfbd5db3ddacd1ed5dd194 +SHA1 (patch-aj) = 6fbd9f8643d9557b3b4ae1df5db45235a531584b SHA1 (patch-ak) = cab81a7ad665ecabf09cae3908b13cef17f3ca17 SHA1 (patch-al) = e3a5d69144484ceede51016c6c5242f21da437b0 SHA1 (patch-am) = 401677317560d7e0bbacee977d02c23871dd550f SHA1 (patch-an) = 10ffb81b79da56bb2087924b645eefb56a1d1fc3 SHA1 (patch-ao) = 3cf9f51939be5f02ad423d79103e7faeab13a3fd +SHA1 (patch-ap) = 7a06de821da92a2d388939fdcaf7618a0a7f96ba +SHA1 (patch-aq) = 62164a6a788190b5cce231bfadf5d7e0a22ee0d1 +SHA1 (patch-ar) = 22874069ef6de212d3f13302e649be06d03760a9 diff --git a/audio/xwave/patches/patch-ab b/audio/xwave/patches/patch-ab index efda22015a2..6c2d54e8117 100644 --- a/audio/xwave/patches/patch-ab +++ b/audio/xwave/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.2 1998/08/07 10:36:22 agc Exp $ +$NetBSD: patch-ab,v 1.3 2001/11/18 15:03:39 itohy Exp $ ---- orig/xwave/src/aifc.c Mon Nov 25 13:30:37 1996 -+++ src/aifc.c Sat Sep 13 04:18:47 1997 +--- src/aifc.c.orig Thu Aug 13 08:27:09 1998 ++++ src/aifc.c Sun Nov 18 22:28:26 2001 @@ -9,7 +9,7 @@ #ifdef linux @@ -11,3 +11,71 @@ $NetBSD: patch-ab,v 1.2 1998/08/07 10:36:22 agc Exp $ #include <machine/endian.h> #elif defined (sgi) #include <sys/endian.h> +@@ -21,8 +21,8 @@ + #include "types.h" + #include "audio_file.h" + #include "ieee/ieee.h" +-#include "aifc.h" + #include "endian.h" ++#include "aifc.h" + + static int aifc_new(Audio_File *af); + +@@ -49,8 +49,8 @@ + int i,count; + Aif_Form form; + Aif_Chunk chunk; +- ulong frames,stamp,block_size,offset; +- short channels,bps; ++ u_int32_t frames,stamp,block_size,offset; ++ int16_t channels,bps; + ID comp_typ; + unsigned char freq[10],plength,*pstring; + bool com_found=False; +@@ -177,7 +177,7 @@ + Com_Chunk com; + int headoffs=0; + char freq[10]; +- ulong stamp,offset,block_size; ++ u_int32_t stamp,offset,block_size; + int i; + + com.channels=af->channels; +@@ -291,7 +291,7 @@ + M_32_SWAP(form.type); + #endif + +- if (aifc_seek(*af,0,SEEK_SET)==AF_ERROR) { ++ if (lseek(af->fd,0,SEEK_SET)==-1) { + if (com.pstring!=NULL) free(com.pstring); + return(AF_ERROR); + } +@@ -301,7 +301,7 @@ + return(AF_ERROR); + } + +- if (aifc_seek(*af,headoffs,SEEK_SET)==AF_ERROR) { ++ if (lseek(af->fd,headoffs,SEEK_SET)==-1) { + if (com.pstring!=NULL) free(com.pstring); + return(AF_ERROR); + } +@@ -348,14 +348,16 @@ + { + switch (af.comp) { + case AF_PCM: +- return(lseek(af.fd,pos,mode)); ++ break; ++ default: ++ return(AF_ERROR); + } +- return(AF_ERROR); ++ return(lseek(af.fd, mode == SEEK_SET ? pos + af.headoffs : pos, mode)); + } + + int aifc_close(Audio_File af) + { +- if (aifc_seek(af,0,SEEK_SET)==AF_ERROR) return(AF_ERROR); ++ if (lseek(af.fd,0,SEEK_SET)==-1) return(AF_ERROR); + if (aifc_new (&af)==AF_ERROR) return(AF_ERROR); + return(close(af.fd)); + } diff --git a/audio/xwave/patches/patch-ac b/audio/xwave/patches/patch-ac index edb83ebb050..e18822a1b58 100644 --- a/audio/xwave/patches/patch-ac +++ b/audio/xwave/patches/patch-ac @@ -1,7 +1,7 @@ -$NetBSD: patch-ac,v 1.2 1998/08/07 10:36:23 agc Exp $ +$NetBSD: patch-ac,v 1.3 2001/11/18 15:03:39 itohy Exp $ ---- orig/xwave/src/au.c Mon Nov 25 13:32:18 1996 -+++ src/au.c Sat Sep 13 04:18:56 1997 +--- src/au.c.orig Thu Aug 13 08:27:09 1998 ++++ src/au.c Sun Nov 18 22:22:37 2001 @@ -32,7 +32,7 @@ #ifdef linux @@ -11,3 +11,27 @@ $NetBSD: patch-ac,v 1.2 1998/08/07 10:36:23 agc Exp $ #include <machine/endian.h> #elif defined (sgi) #include <sys/endian.h> +@@ -212,16 +212,19 @@ + { + switch (af.comp) { + case AF_PCM: +- return(lseek(af.fd,pos,mode)); ++ break; + case AF_MULAW: +- return(lseek(af.fd,pos/2,mode)); ++ pos /= 2; ++ break; ++ default: ++ return(AF_ERROR); + } +- return(AF_ERROR); ++ return(lseek(af.fd, mode == SEEK_SET ? pos + af.headoffs : pos, mode)); + } + + int au_close(Audio_File af) + { +- if (au_seek(af,0,SEEK_SET)==AF_ERROR) return(AF_ERROR); ++ if (lseek(af.fd,0,SEEK_SET)==-1) return(AF_ERROR); + if (au_new (&af)==AF_ERROR) return(AF_ERROR); + return(close(af.fd)); + } diff --git a/audio/xwave/patches/patch-ag b/audio/xwave/patches/patch-ag index c7d52a1cb21..2fe0dd65d37 100644 --- a/audio/xwave/patches/patch-ag +++ b/audio/xwave/patches/patch-ag @@ -1,8 +1,19 @@ -$NetBSD: patch-ag,v 1.2 1998/08/07 10:36:23 agc Exp $ +$NetBSD: patch-ag,v 1.3 2001/11/18 15:03:39 itohy Exp $ ---- orig/xwave/src/endian.h Mon Nov 25 13:25:15 1996 -+++ src/endian.h Sat Sep 13 04:22:54 1997 -@@ -16,7 +16,7 @@ +--- src/endian.h.orig Thu Aug 13 08:27:09 1998 ++++ src/endian.h Sun Nov 18 21:10:10 2001 +@@ -8,7 +8,9 @@ + + #ifdef sun + +-typedef unsigned long u_int32_t; ++typedef int int32_t; ++typedef unsigned int u_int32_t; ++typedef short int16_t; + typedef unsigned short u_int16_t; + #if defined (_LITTLE_ENDIAN) + #define little_endian 1 +@@ -16,7 +18,7 @@ #define big_endian 1 #endif diff --git a/audio/xwave/patches/patch-aj b/audio/xwave/patches/patch-aj index ce5aafa8c13..9a80c96e0c9 100644 --- a/audio/xwave/patches/patch-aj +++ b/audio/xwave/patches/patch-aj @@ -1,7 +1,7 @@ -$NetBSD: patch-aj,v 1.2 1998/08/07 10:36:24 agc Exp $ +$NetBSD: patch-aj,v 1.3 2001/11/18 15:03:39 itohy Exp $ ---- orig/xwave/src/riff.c Mon Nov 25 13:35:17 1996 -+++ src/riff.c Sat Sep 13 04:29:02 1997 +--- src/riff.c.orig Thu Aug 13 08:27:10 1998 ++++ src/riff.c Sun Nov 18 22:19:23 2001 @@ -33,7 +33,7 @@ #ifdef linux @@ -11,3 +11,80 @@ $NetBSD: patch-aj,v 1.2 1998/08/07 10:36:24 agc Exp $ #include <machine/endian.h> #elif defined (sgi) #include <sys/endian.h> +@@ -45,12 +45,12 @@ + + #include "types.h" + #include "audio_file.h" ++#include "endian.h" + #include "riff.h" + #include "xwave.h" + #include "ccitt/g711.h" + #include "ccitt/g72x.h" + #include "adpcm2pcm/adpcm.h" +-#include "endian.h" + + + extern Main_Data *MD; +@@ -79,9 +79,10 @@ + { + RiffHeader rh; + FmtHeader fh; +- long chunk; ++ int32_t chunk; + int headoffs,i; +- ulong length,slength; ++ u_int32_t length; ++ off_t slength; + + if (mode==AF_NEW) return(riff_new(af)); + +@@ -112,7 +113,7 @@ + if ((i=read (af->fd,&chunk,sizeof(chunk)))!=sizeof(chunk)) + return(AF_ERROR); + headoffs+=i; +- if ((i=read (af->fd,&length,sizeof(ulong)))!=sizeof(ulong)) ++ if ((i=read (af->fd,&length,sizeof(length)))!=sizeof(length)) + return(AF_ERROR); + headoffs+=i; + +@@ -172,8 +173,9 @@ + { + RiffHeader rh; + FmtHeader fh; +- long chunk; +- ulong length,count; ++ int32_t chunk; ++ u_int32_t length; ++ int count; + + length=af->length; + +@@ -344,19 +346,26 @@ + { + switch (af.comp) { + case AF_PCM: ++ break; + return(lseek(af.fd,pos,mode)); + case AF_ALAW: + case AF_MULAW: ++ pos /= 2; ++ break; + return(lseek(af.fd,pos/2,mode)); + case AF_ADPCM: ++ pos /= 4; ++ break; + return(lseek(af.fd,pos/4,mode)); ++ default: ++ return(AF_ERROR); + } +- return(AF_ERROR); ++ return(lseek(af.fd, mode == SEEK_SET ? pos + af.headoffs : pos, mode)); + } + + int riff_close(Audio_File af) + { +- if (riff_seek(af,0,SEEK_SET)==AF_ERROR) return(AF_ERROR); ++ if (lseek(af.fd,0,SEEK_SET)) return(AF_ERROR); + + if (riff_new (&af)==AF_ERROR) return(AF_ERROR); + return(close(af.fd)); diff --git a/audio/xwave/patches/patch-ap b/audio/xwave/patches/patch-ap new file mode 100644 index 00000000000..15aea8dcf66 --- /dev/null +++ b/audio/xwave/patches/patch-ap @@ -0,0 +1,33 @@ +$NetBSD: patch-ap,v 1.1 2001/11/18 15:03:39 itohy Exp $ + +--- src/aifc.h.orig Thu Aug 13 08:27:09 1998 ++++ src/aifc.h Sun Nov 18 21:05:29 2001 +@@ -1,5 +1,5 @@ + +-#define ID int ++#define ID int32_t + #define FORM 0x464F524D + #define AIFF 0x41494646 + #define AIFC 0x41494643 +@@ -13,18 +13,18 @@ + + typedef struct { + ID form; +- long length; ++ int32_t length; + ID type; + } Aif_Form; + + typedef struct { + ID type; +- long length; ++ int32_t length; + } Aif_Chunk; + + typedef struct { + short channels; +- unsigned long s_frames; ++ u_int32_t s_frames; + short bps; + double freq; + ID comp_typ; diff --git a/audio/xwave/patches/patch-aq b/audio/xwave/patches/patch-aq new file mode 100644 index 00000000000..a2ab74e5c81 --- /dev/null +++ b/audio/xwave/patches/patch-aq @@ -0,0 +1,36 @@ +$NetBSD: patch-aq,v 1.1 2001/11/18 15:03:39 itohy Exp $ + +--- src/riff.h.orig Thu Aug 13 08:27:10 1998 ++++ src/riff.h Sun Nov 18 21:10:34 2001 +@@ -17,20 +17,20 @@ + #define RIFF_IDVI_ADPCM 1024 + + typedef struct { +- long riff; +- ulong length; +- long wave; ++ int32_t riff; ++ u_int32_t length; ++ int32_t wave; + } RiffHeader; + + typedef struct { +- long fmt; +- ulong chunk_length; +- short format; +- short modus; +- ulong freq; +- ulong bpsec; +- short bpspl; +- short res; ++ int32_t fmt; ++ u_int32_t chunk_length; ++ int16_t format; ++ int16_t modus; ++ u_int32_t freq; ++ u_int32_t bpsec; ++ int16_t bpspl; ++ int16_t res; + } FmtHeader; + + bool is_riff(int fd); diff --git a/audio/xwave/patches/patch-ar b/audio/xwave/patches/patch-ar new file mode 100644 index 00000000000..f204a61a497 --- /dev/null +++ b/audio/xwave/patches/patch-ar @@ -0,0 +1,12 @@ +$NetBSD: patch-ar,v 1.1 2001/11/18 15:03:40 itohy Exp $ + +--- src/audio_file.c.orig Thu Aug 13 08:27:09 1998 ++++ src/audio_file.c Sun Nov 18 21:21:01 2001 +@@ -16,6 +16,7 @@ + #include "xwave.h" + #include "xwave_widget.h" + #include "audio_file.h" ++#include "endian.h" + #include "riff.h" + #include "aifc.h" + #include "au.h" |