author | llornkcor <llornkcor> | 2002-04-24 23:48:57 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-24 23:48:57 (UTC) |
commit | 5d3d95245768f7949208d367db1b5dc1d7f5e314 (patch) (unidiff) | |
tree | 2d40f71c070208ea58f67373acb29f596f206b66 | |
parent | b6958ff0363b194e129584a0a0a597bd643718a3 (diff) | |
download | opie-5d3d95245768f7949208d367db1b5dc1d7f5e314.zip opie-5d3d95245768f7949208d367db1b5dc1d7f5e314.tar.gz opie-5d3d95245768f7949208d367db1b5dc1d7f5e314.tar.bz2 |
bug fix
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 22cb276..4b668de 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -1,60 +1,59 @@ | |||
1 | /************************************************************************************ | 1 | /************************************************************************************ |
2 | ** | 2 | ** |
3 | ** This file may be distributed and/or modified under the terms of the | 3 | ** This file may be distributed and/or modified under the terms of the |
4 | ** GNU General Public License version 2 as published by the Free Software | 4 | ** GNU General Public License version 2 as published by the Free Software |
5 | ** Foundation and appearing in the file LICENSE.GPL included in the | 5 | ** Foundation and appearing in the file LICENSE.GPL included in the |
6 | ** packaging of this file. | 6 | ** packaging of this file. |
7 | ** | 7 | ** |
8 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 8 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
9 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 9 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
10 | ** | 10 | ** |
11 | ************************************************************************************/ | 11 | ************************************************************************************/ |
12 | |||
13 | /* | 12 | /* |
14 | * $Id$ | 13 | * $Id$ |
15 | */ | 14 | */ |
16 | // Sun 03-17-2002 L.J.Potter <ljp@llornkcor.com> | 15 | // Sun 03-17-2002 L.J.Potter <ljp@llornkcor.com> |
17 | #include <sys/utsname.h> | 16 | #include <sys/utsname.h> |
18 | #include <sys/time.h> | 17 | #include <sys/time.h> |
19 | #include <sys/types.h> | 18 | #include <sys/types.h> |
20 | #include <unistd.h> | 19 | #include <unistd.h> |
21 | #include <stdio.h> | 20 | #include <stdio.h> |
22 | #include <sys/stat.h> | 21 | #include <sys/stat.h> |
23 | #include <fcntl.h> | 22 | #include <fcntl.h> |
24 | #include <sys/ioctl.h> | 23 | #include <sys/ioctl.h> |
25 | #include <linux/soundcard.h> | 24 | #include <linux/soundcard.h> |
26 | #include <string.h> | 25 | #include <string.h> |
27 | #include <stdlib.h> | 26 | #include <stdlib.h> |
28 | #include <errno.h> | 27 | #include <errno.h> |
29 | #include <string.h> | 28 | #include <string.h> |
30 | 29 | ||
31 | typedef struct _waveheader { | 30 | typedef struct _waveheader { |
32 | u_long main_chunk; /* 'RIFF' */ | 31 | u_long main_chunk; /* 'RIFF' */ |
33 | u_long length; /* filelen */ | 32 | u_long length; /* filelen */ |
34 | u_long chunk_type; /* 'WAVE' */ | 33 | u_long chunk_type; /* 'WAVE' */ |
35 | u_long sub_chunk; /* 'fmt ' */ | 34 | u_long sub_chunk; /* 'fmt ' */ |
36 | u_long sc_len; /* length of sub_chunk, =16 | 35 | u_long sc_len; /* length of sub_chunk, =16 |
37 | (chunckSize) format len */ | 36 | (chunckSize) format len */ |
38 | u_short format; /* should be 1 for PCM-code (formatTag) */ | 37 | u_short format; /* should be 1 for PCM-code (formatTag) */ |
39 | 38 | ||
40 | u_short modus; /* 1 Mono, 2 Stereo (channels) */ | 39 | u_short modus; /* 1 Mono, 2 Stereo (channels) */ |
41 | u_long sample_fq; /* samples per second (samplesPerSecond) */ | 40 | u_long sample_fq; /* samples per second (samplesPerSecond) */ |
42 | u_long byte_p_sec; /* avg bytes per second (avgBytePerSecond) */ | 41 | u_long byte_p_sec; /* avg bytes per second (avgBytePerSecond) */ |
43 | u_short byte_p_spl; /* samplesize; 1 or 2 bytes (blockAlign) */ | 42 | u_short byte_p_spl; /* samplesize; 1 or 2 bytes (blockAlign) */ |
44 | u_short bit_p_spl; /* 8, 12 or 16 bit (bitsPerSample) */ | 43 | u_short bit_p_spl; /* 8, 12 or 16 bit (bitsPerSample) */ |
45 | 44 | ||
46 | u_long data_chunk; /* 'data' */ | 45 | u_long data_chunk; /* 'data' */ |
47 | 46 | ||
48 | u_long data_length;/* samplecount */ | 47 | u_long data_length;/* samplecount */ |
49 | } WaveHeader; | 48 | } WaveHeader; |
50 | 49 | ||
51 | #define RIFF 0x46464952 | 50 | #define RIFF 0x46464952 |
52 | #define WAVE 0x45564157 | 51 | #define WAVE 0x45564157 |
53 | #define FMT 0x20746D66 | 52 | #define FMT 0x20746D66 |
54 | #define DATA 0x61746164 | 53 | #define DATA 0x61746164 |
55 | #define PCM_CODE 1 | 54 | #define PCM_CODE 1 |
56 | #define WAVE_MONO 1 | 55 | #define WAVE_MONO 1 |
57 | #define WAVE_STEREO 2 | 56 | #define WAVE_STEREO 2 |
58 | 57 | ||
59 | #include "vmemo.h" | 58 | #include "vmemo.h" |
60 | 59 | ||