pkgsrc/audio/nspmod/patches/patch-ac
1998-08-07 10:35:47 +00:00

59 lines
1.8 KiB
Text

$NetBSD: patch-ac,v 1.3 1998/08/07 10:36:05 agc Exp $
*** nspmod.c.orig Sat Sep 16 04:10:37 1995
--- nspmod.c Sat Mar 7 04:43:55 1998
***************
*** 1,4 ****
--- 1,5 ----
#include <stdio.h> /*(perror)*/
+ #include <sys/types.h>
#include <sys/mman.h> /*PROT_READ,MAP_xxx*/
#include <fcntl.h> /*O_RDONLY*/
#include <sys/stat.h> /*stat*/
***************
*** 35,40 ****
--- 36,42 ----
printf("NSPmod version " LIT(VERSION_MAJOR) "." LIT(VERSION_MINOR) "\n");
printf("Usage: %s [options] modfile\n", argv0);
printf("Options:\n");
+ printf(" -b # number of bits to output (8 or 16)\n");
printf(" -c # play only the channel\n");
printf(" -e show events\n");
printf(" -f # output sample rate\n");
***************
*** 59,69 ****
static OptInfo oi;
int optChar;
oi.outRate = DEF_OUTRATE;
oi.ovsFreq = -1;
/*oi.repLimit = 1;*/
! while ((optChar = getopt(argc, argv, "c:ef:il:mo:rs:v:")) > 0) {
switch (optChar) {
case 'c': oi.onlyCh = (i15x)strtol(optarg, NULL, 0) | 0x100; break;
case 'e': oi.showEvents++; break;
case 'f': oi.outRate = (u16x)strtol(optarg, NULL, 0); break;
--- 61,73 ----
static OptInfo oi;
int optChar;
+ oi.bits = 8;
oi.outRate = DEF_OUTRATE;
oi.ovsFreq = -1;
/*oi.repLimit = 1;*/
! while ((optChar = getopt(argc, argv, "b:c:ef:il:mo:rs:v:")) > 0) {
switch (optChar) {
+ case 'b': oi.bits = (i15x)strtol(optarg, NULL, 0); break;
case 'c': oi.onlyCh = (i15x)strtol(optarg, NULL, 0) | 0x100; break;
case 'e': oi.showEvents++; break;
case 'f': oi.outRate = (u16x)strtol(optarg, NULL, 0); break;
***************
*** 116,121 ****
--- 120,126 ----
lookOverFile(p, statbuf.st_size);
dacioInit();
+ dci.bits = oi.bits;
dci.speed = oi.outRate;
dci.stereo = !oi.mono;
dacioConf(&dci);