1SOUNDTOH(1) General Commands Manual SOUNDTOH(1)
2
3
4
6 soundtoh - convert a sound file to a C language header file
7
9 soundtoh filename
10
12 The soundtoh program will convert a sound file in a format supported by
13 the Network Audio System library into a header file suitable for use
14 with the #include C pre-processor directive. The resulting output is
15 directed to the standard output. The output will look something like:
16
17 /* bark */
18
19 #define barkDataFormat AuFormatULAW8
20 #define barkSampleRate 8000
21 #define barkNumTracks 1
22 #define barkNumSamples \
23 (sizeof(barkSamples) / sizeof(barkSamples[0]) / barkNumTracks)
24
25 static char *barkComment = "terrier bark";
26
27 static unsigned char barkSamples[] =
28 {
29 0x57, 0x52, 0x51, 0x55, 0x5d, 0x72, 0xe5, 0xdc,
30 0xdc, 0xe2, 0xed, 0x76, 0x61, 0x5b, 0x59, 0x5e,
31 .
32 .
33 .
34 0x66, 0xf0, 0xde, 0xe0, 0xf1, 0x6d, 0x67, 0x6a,
35 0x77, 0xee, 0xe5, 0xe6, 0xf1, 0x71, 0x6b,
36 };
37
38 16-bit samples will be converted appropriately depending upon the endi‐
39 aness of the host machine.
40
42 nas(1)
43
45 Copyright 1993, 1994 Network Computing Devices, Inc.
46
48 Greg Renda, Network Computing Devices, Inc.
49
50
51
52 1.9.1 SOUNDTOH(1)