X68k built-in voice synthesizer supports 4bit ADPCM.

This commit is contained in:
minoura 2001-05-02 12:49:41 +00:00
parent 47d22455b3
commit 399af9e4a8
5 changed files with 20 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: audio.c,v 1.135 2001/01/25 15:25:34 toshii Exp $ */
/* $NetBSD: audio.c,v 1.136 2001/05/02 12:49:41 minoura Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@ -2220,10 +2220,13 @@ audio_check_params(p)
switch (p->encoding) {
case AUDIO_ENCODING_ULAW:
case AUDIO_ENCODING_ALAW:
case AUDIO_ENCODING_ADPCM:
if (p->precision != 8)
return (EINVAL);
break;
case AUDIO_ENCODING_ADPCM:
if (p->precision != 4 && p->precision != 8)
return (EINVAL);
break;
case AUDIO_ENCODING_SLINEAR_LE:
case AUDIO_ENCODING_SLINEAR_BE:
case AUDIO_ENCODING_ULINEAR_LE:

View File

@ -1,4 +1,4 @@
.\" $NetBSD: audioplay.1,v 1.8 2000/07/05 15:45:35 msaitoh Exp $
.\" $NetBSD: audioplay.1,v 1.9 2001/05/02 12:49:41 minoura Exp $
.\"
.\" Copyright (c) 1998-1999 Matthew R. Green
.\" All rights reserved.
@ -132,7 +132,7 @@ and
when combined with the
.Fl f
option, sets the precision to its argument. This value must be either
8, 16, 24 or 32.
4, 8, 16, 24 or 32.
.It Fl s
when combined with the
.Fl f

View File

@ -1,4 +1,4 @@
/* $NetBSD: play.c,v 1.25 2001/03/28 03:18:39 simonb Exp $ */
/* $NetBSD: play.c,v 1.26 2001/05/02 12:49:42 minoura Exp $ */
/*
* Copyright (c) 1999 Matthew R. Green
@ -112,9 +112,10 @@ main(argc, argv)
break;
case 'P':
decode_int(optarg, &precision);
if (precision != 8 && precision != 16 &&
precision != 24 && precision != 32)
errx(1, "precision must be between 8, 16, 24 or 32");
if (precision != 4 && precision != 8 &&
precision != 16 && precision != 24 &&
precision != 32)
errx(1, "precision must be between 4, 8, 16, 24 or 32");
break;
case 'p':
len = strlen(optarg);

View File

@ -1,4 +1,4 @@
.\" $NetBSD: audiorecord.1,v 1.11 2001/03/31 17:33:33 mrg Exp $
.\" $NetBSD: audiorecord.1,v 1.12 2001/05/02 12:49:42 minoura Exp $
.\"
.\" Copyright (c) 1998-1999 Matthew R. Green
.\" All rights reserved.
@ -99,6 +99,7 @@ normally either
or
.Dq 16 ,
though the values
.Dq 4 ,
.Dq 24
and
.Dq 32

View File

@ -1,4 +1,4 @@
/* $NetBSD: record.c,v 1.14 2001/02/19 23:03:44 cgd Exp $ */
/* $NetBSD: record.c,v 1.15 2001/05/02 12:49:42 minoura Exp $ */
/*
* Copyright (c) 1999 Matthew R. Green
@ -123,9 +123,10 @@ main(argc, argv)
break;
case 'P':
decode_int(optarg, &precision);
if (precision != 8 && precision != 16 &&
precision != 24 && precision != 32)
errx(1, "precision must be between 8, 16, 24 or 32");
if (precision != 4 && precision != 8 &&
precision != 16 && precision != 24 &&
precision != 32)
errx(1, "precision must be between 4, 8, 16, 24 or 32");
break;
case 'p':
len = strlen(optarg);
@ -382,7 +383,7 @@ usage()
"-e encoding\n\t"
"-i header information\n\t"
"-m monitor volume\n\t"
"-P precision bits (8, 16, 24 or 32)\n\t"
"-P precision bits (4, 8, 16, 24 or 32)\n\t"
"-p input port\n\t"
"-s sample rate\n\t"
"-t recording time\n\t"