Commit Graph

47 Commits

Author SHA1 Message Date
mrg a0e3e3912d rename struct write_info as struct track_info, and the variable name 'wi'
as 'ti', as this info is useful for reading as well.
2015-08-05 06:54:39 +00:00
mrg 3a70beec89 separate the 3 functions midirecord uses from libaudio.a into its own
file and link it directly, instead of having an (implicit) dependancy
on usr.bin/audio/common being built before usr.bin/midirecord is linked.
2015-06-21 06:06:01 +00:00
mrg 9dd3b8ae69 add a decode_uint() function. 2014-12-30 01:22:09 +00:00
christos 6e28978d84 fix unused variable warnings 2013-10-18 20:47:06 +00:00
mrg 0c2e06460b move most of the header writing code from record.c into wav.c and sun.c.
introduce a struct write_info for communication between front ends and
backends.

libaudio API is still pretty ugly, and needs to stay local here for now,
but it is a little more usable for other tools now.
2013-08-30 20:57:26 +00:00
jmcneill a123dfbe30 recognize AUDIO_ENCODING_AC3 2011-09-06 22:41:53 +00:00
joerg c36a7298be ANSIfy. Add static. Add __dead. 2011-08-28 01:17:47 +00:00
mrg 95c070cab9 - add extended WAVE header support
- attempt to play a bunch more WAV files
2009-06-18 02:37:27 +00:00
mrg c2b95373bf remove clause #3 from my license where there are no other
copyright holders involved.
2008-05-29 14:51:25 +00:00
lukem 66176dfdff Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)
2008-05-03 14:48:30 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos f3d3c4b618 missing initializers. 2006-10-22 16:11:34 +00:00
mrg bc3f0566af variable signed/unsigned cleanup. 2006-05-11 01:19:10 +00:00
perry f2bc845517 __inline__ -> inline 2005-12-24 21:44:28 +00:00
dsl 8383dcf78c Add (unsigned char) cast to ctype functions 2004-10-30 16:57:27 +00:00
mycroft 680669cd36 Fix fencepost errors in the conversion functions (making them a bit more like
the kernel versions).
2004-07-19 19:15:05 +00:00
drochner e87f74fd64 put the __packed__ attribute close to the struct definition
(to appease gcc-3.4), and use the compiler-independant __packed
form for consistency
2004-07-01 20:56:34 +00:00
lukem b817247988 Use MKPRIVATELIB=yes instead of providing an empty libinstall:: target and
setting NOLINT, NOPIC, NOPROFILE (etc)
2004-05-23 02:24:50 +00:00
mrg b1da97fd23 apply the patch from PR#24127: make audio_wav_parse_hdr() take u_int *
parameters for encoding, precision, sample rate and channels.
2004-01-21 11:55:07 +00:00
agc c0db2196e7 Add NetBSD RCS Ids. 2003-06-23 12:15:00 +00:00
wiz 68caa698b2 Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
2003-04-06 18:20:07 +00:00
mrg c0f9ed084d - decode_int(): always use base 10, so that a time of "1:09" works.
- decode_time(): 60 seconds in a minute, really.
both from tsarna@netbsd.org.

- be verbose about the time we are going to record for, if verbose.
2002-12-27 23:43:15 +00:00
mrg 18c97a1496 remove some #if 0 debug code 2002-12-08 10:49:03 +00:00
mrg eb0d04136f inline the contents of auconv.c into auconv.h. this makes audiorecord(1)
slightly smaller (about 200 bytes on x86) and i would guess slightly faster.
2002-10-13 00:59:45 +00:00
lukem 5d4973fe97 makefile delint. use NETBSDSRCDIR as appropriate 2002-09-18 14:00:33 +00:00
mrg 16189b5a23 - add a AUDIO_FORMAT_DEFAULT. use it. don't change functionity.
- fix the function selection in sunau conversions.

- be more verbose when given -V.  (hi lennart! :)
2002-02-10 15:30:53 +00:00
mrg 2d530607f5 add $NetBSD$ 2002-01-25 15:33:51 +00:00
mrg e7fdf18240 - WARNS=3 (from ross@netbsd.org)
- fix a bug in WAV conversions
2002-01-15 23:48:51 +00:00
mrg 7aab3ecc6e for sun output files, if we have unsigned or little endian data, convert
it to signed big endian data.  pull in a modified copy of the kernels'
auconv.[ch] to help with this (and remove some home grown code that did
some of the same things.)
2002-01-15 17:02:51 +00:00
mrg 9ab6411c17 sun linear encodings are *signed* 2002-01-15 17:01:33 +00:00
mrg 37188d08c6 - add rudimentary "wav" recording support: don't think it copes with
big-endian systems properly yet -- need to add RIFX support or swap
samples while writing.  more on this coming soon.

- new "-F <format>" option for audiorecord.  supported values of <format>
are "sun", "wav" and "none", plus a few aliases.

- split sun & wav support out into their own files.

- don't assume that WAV header elements are properly aligned for the
type of data they hold.

XXX: still need to clean up libaudio interfaces a lot.
2002-01-15 08:19:36 +00:00
mrg 4a2b3c13ef fix 2001/03/04 change: audio_parse_wav_hdr() returns a signed value. 2002-01-01 08:07:28 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
mrg 3da5c0d664 fix bug in audiorecord -t handling. 2001-06-07 12:48:27 +00:00
hubertf d0a42335a9 Don't play trailing garbage at end of RIFF WAVE (.wav) files
Patch sent by YAMAMOTO Takashi <takashi.yamamoto@bigfoot.com> in PR 12328
2001-03-04 15:27:35 +00:00
mrg 67312df72f de-__P()-ify 2000-12-22 11:38:42 +00:00
mrg 79a33dbcba libaudio:
- rename audio_get_sun_encoding() to audio_sun_to_encoding()
- add audio_encoding_to_sun()
play.c:
- adapt
record.c:
- convert NetBSD encoding to sun encoding if possible, otherwise don't
output a header at all.
fixes PR#10380 from Michael Eriksson <eramore@era-t.ericsson.se>.
2000-12-13 08:19:54 +00:00
mrg 94dde80b07 remove unused crap. 2000-06-18 07:20:15 +00:00
mrg cc78535b32 fix off-by-one error in error message array. add a comment. 1999-09-27 05:06:10 +00:00
tron feac6b2836 Use "NULL" instead of "0" for null pointer. 1999-09-13 17:35:33 +00:00
mrg dfe35fea6d remove duplicate include of <stdio.h> 1999-03-30 14:46:23 +00:00
mycroft b0a62f4d5b Only 8-bit data is unsigned in WAVE files. 1999-03-29 11:09:04 +00:00
mrg ae3f9933ee .wav files are little endian. 1999-03-29 04:49:49 +00:00
mrg eeeadf8446 make recording precision/encoding setting sane. 1999-03-27 17:46:00 +00:00
mrg 740f05c805 add support to play stdin. 1999-03-27 05:14:37 +00:00
mrg e0c321f25d add missing copyrights. 1999-03-26 15:46:22 +00:00
mrg 140c9e18e1 add audiorecord and audioplay tools. audioplay does .au and .wav files. audiorecord makes .au files only. uses parts of audioctl.. 1999-03-26 14:02:39 +00:00