toast_lin.c 660 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
  3. * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
  4. * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
  5. */
  6. /* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/toast_lin.c,v 1.1 1992/10/28 00:15:50 jutta Exp $ */
  7. #include "toast.h"
  8. /* toast_linear.c -- read and write 16 bit linear sound in host byte order.
  9. */
  10. extern FILE *in, *out;
  11. int linear_input (buf) gsm_signal * buf;
  12. {
  13. return fread( (char *)buf, sizeof(*buf), 160, in );
  14. }
  15. int linear_output P1((buf), gsm_signal * buf)
  16. {
  17. return -( fwrite( (char *)buf, sizeof(*buf), 160, out ) != 160 );
  18. }