1 /* @(#)raw.c 1.13 10/01/12 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */
2 #include "config.h"
3 #ifndef lint
4 static UConst char sccsid[] =
5 "@(#)raw.c 1.13 10/01/12 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling";
6
7 #endif
8 /*
9 * RAW sound handling
10 */
11 /*
12 * The contents of this file are subject to the terms of the
13 * Common Development and Distribution License, Version 1.0 only
14 * (the "License"). You may not use this file except in compliance
15 * with the License.
16 *
17 * See the file CDDL.Schily.txt in this distribution for details.
18 * A copy of the CDDL is also available via the Internet at
19 * http://www.opensource.org/licenses/cddl1.txt
20 *
21 * When distributing Covered Code, include this CDDL HEADER in each
22 * file and include the License file CDDL.Schily.txt from this distribution.
23 */
24
25 #include "config.h"
26 #include <schily/stdio.h>
27 #include <schily/standard.h>
28 #include <schily/unistd.h>
29 #include "mytype.h"
30 #include "sndfile.h"
31 #include "global.h"
32
33 LOCAL int InitSound __PR((int audio, long channels,
34 Ulong rate,
35 long nBitsPerSample,
36 Ulong expected_bytes));
37 LOCAL int ExitSound __PR((int audio, Ulong nBytesDone));
38 LOCAL unsigned long GetHdrSize __PR((void));
39 LOCAL unsigned long InSizeToOutSize __PR((Ulong BytesToDo));
40
41 /* ARGSUSED */
42 LOCAL int
InitSound(audio,channels,rate,nBitsPerSample,expected_bytes)43 InitSound(audio, channels, rate, nBitsPerSample, expected_bytes)
44 int audio;
45 long channels;
46 Ulong rate;
47 long nBitsPerSample;
48 Ulong expected_bytes;
49 {
50 global.md5offset = 0;
51 return (0);
52 }
53
54 LOCAL int
ExitSound(audio,nBytesDone)55 ExitSound(audio, nBytesDone)
56 int audio;
57 Ulong nBytesDone;
58 {
59 return (0);
60 }
61
62 LOCAL unsigned long
GetHdrSize()63 GetHdrSize()
64 {
65 return (0L);
66 }
67
68 LOCAL unsigned long
InSizeToOutSize(BytesToDo)69 InSizeToOutSize(BytesToDo)
70 Ulong BytesToDo;
71 {
72 return (BytesToDo);
73 }
74
75 struct soundfile rawsound = {
76 InitSound,
77 ExitSound,
78 GetHdrSize,
79 (int (*) __PR((int audio,
80 Uchar *buf,
81 size_t BytesToDo))) write, /* get sound samples out */
82
83 InSizeToOutSize, /* compressed? output file size */
84 1, /* needs big endian samples */
85 "MOTOROLA"
86 };
87