-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index ec46340..118fcde 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -18,96 +18,97 @@ | |||
18 | #include <sys/types.h> | 18 | #include <sys/types.h> |
19 | #include <unistd.h> | 19 | #include <unistd.h> |
20 | #include <stdio.h> | 20 | #include <stdio.h> |
21 | #include <sys/stat.h> | 21 | #include <sys/stat.h> |
22 | #include <fcntl.h> | 22 | #include <fcntl.h> |
23 | #include <sys/ioctl.h> | 23 | #include <sys/ioctl.h> |
24 | #include <linux/soundcard.h> | 24 | #include <linux/soundcard.h> |
25 | 25 | ||
26 | #include <string.h> | 26 | #include <string.h> |
27 | #include <stdlib.h> | 27 | #include <stdlib.h> |
28 | #include <errno.h> | 28 | #include <errno.h> |
29 | 29 | ||
30 | typedef struct _waveheader { | 30 | typedef struct _waveheader { |
31 | u_long main_chunk; /* 'RIFF' */ | 31 | u_long main_chunk; /* 'RIFF' */ |
32 | u_long length; /* filelen */ | 32 | u_long length; /* filelen */ |
33 | u_long chunk_type; /* 'WAVE' */ | 33 | u_long chunk_type; /* 'WAVE' */ |
34 | u_long sub_chunk; /* 'fmt ' */ | 34 | u_long sub_chunk; /* 'fmt ' */ |
35 | u_long sc_len; /* length of sub_chunk, =16 | 35 | u_long sc_len; /* length of sub_chunk, =16 |
36 | (chunckSize) format len */ | 36 | (chunckSize) format len */ |
37 | u_short format; /* should be 1 for PCM-code (formatTag) */ | 37 | u_short format; /* should be 1 for PCM-code (formatTag) */ |
38 | 38 | ||
39 | u_short modus; /* 1 Mono, 2 Stereo (channels) */ | 39 | u_short modus; /* 1 Mono, 2 Stereo (channels) */ |
40 | u_long sample_fq; /* samples per second (samplesPerSecond) */ | 40 | u_long sample_fq; /* samples per second (samplesPerSecond) */ |
41 | u_long byte_p_sec; /* avg bytes per second (avgBytePerSecond) */ | 41 | u_long byte_p_sec; /* avg bytes per second (avgBytePerSecond) */ |
42 | u_short byte_p_spl; /* samplesize; 1 or 2 bytes (blockAlign) */ | 42 | u_short byte_p_spl; /* samplesize; 1 or 2 bytes (blockAlign) */ |
43 | u_short bit_p_spl; /* 8, 12 or 16 bit (bitsPerSample) */ | 43 | u_short bit_p_spl; /* 8, 12 or 16 bit (bitsPerSample) */ |
44 | 44 | ||
45 | u_long data_chunk; /* 'data' */ | 45 | u_long data_chunk; /* 'data' */ |
46 | 46 | ||
47 | u_long data_length;/* samplecount */ | 47 | u_long data_length;/* samplecount */ |
48 | } WaveHeader; | 48 | } WaveHeader; |
49 | 49 | ||
50 | #define RIFF 0x46464952 | 50 | #define RIFF 0x46464952 |
51 | #define WAVE 0x45564157 | 51 | #define WAVE 0x45564157 |
52 | #define FMT 0x20746D66 | 52 | #define FMT 0x20746D66 |
53 | #define DATA 0x61746164 | 53 | #define DATA 0x61746164 |
54 | #define PCM_CODE 1 | 54 | #define PCM_CODE 1 |
55 | #define WAVE_MONO 1 | 55 | #define WAVE_MONO 1 |
56 | #define WAVE_STEREO 2 | 56 | #define WAVE_STEREO 2 |
57 | 57 | ||
58 | #include "vmemo.h" | 58 | #include "vmemo.h" |
59 | 59 | ||
60 | #include <qpe/qpeapplication.h> | 60 | #include <qpe/qpeapplication.h> |
61 | #include <qpe/resource.h> | 61 | #include <qpe/resource.h> |
62 | #include <qpe/config.h> | 62 | #include <qpe/config.h> |
63 | 63 | ||
64 | #include <qpainter.h> | 64 | #include <qpainter.h> |
65 | #include <qdatetime.h> | 65 | #include <qdatetime.h> |
66 | #include <qregexp.h> | ||
66 | #include <qsound.h> | 67 | #include <qsound.h> |
67 | #include <qfile.h> | 68 | #include <qfile.h> |
68 | #include <qmessagebox.h> | 69 | #include <qmessagebox.h> |
69 | 70 | ||
70 | int seq = 0; | 71 | int seq = 0; |
71 | 72 | ||
72 | /* XPM */ | 73 | /* XPM */ |
73 | static char * vmemo_xpm[] = { | 74 | static char * vmemo_xpm[] = { |
74 | "16 16 102 2", | 75 | "16 16 102 2", |
75 | " c None", | 76 | " c None", |
76 | ". c #60636A", | 77 | ". c #60636A", |
77 | "+ c #6E6E72", | 78 | "+ c #6E6E72", |
78 | "@ c #68696E", | 79 | "@ c #68696E", |
79 | "# c #4D525C", | 80 | "# c #4D525C", |
80 | "$ c #6B6C70", | 81 | "$ c #6B6C70", |
81 | "% c #E3E3E8", | 82 | "% c #E3E3E8", |
82 | "& c #EEEEF2", | 83 | "& c #EEEEF2", |
83 | "* c #EAEAEF", | 84 | "* c #EAEAEF", |
84 | "= c #CACAD0", | 85 | "= c #CACAD0", |
85 | "- c #474A51", | 86 | "- c #474A51", |
86 | "; c #171819", | 87 | "; c #171819", |
87 | "> c #9B9B9F", | 88 | "> c #9B9B9F", |
88 | ", c #EBEBF0", | 89 | ", c #EBEBF0", |
89 | "' c #F4F4F7", | 90 | "' c #F4F4F7", |
90 | ") c #F1F1F5", | 91 | ") c #F1F1F5", |
91 | "! c #DEDEE4", | 92 | "! c #DEDEE4", |
92 | "~ c #57575C", | 93 | "~ c #57575C", |
93 | "{ c #010101", | 94 | "{ c #010101", |
94 | "] c #A2A2A6", | 95 | "] c #A2A2A6", |
95 | "^ c #747477", | 96 | "^ c #747477", |
96 | "/ c #B5B5B8", | 97 | "/ c #B5B5B8", |
97 | "( c #AEAEB2", | 98 | "( c #AEAEB2", |
98 | "_ c #69696D", | 99 | "_ c #69696D", |
99 | ": c #525256", | 100 | ": c #525256", |
100 | "< c #181C24", | 101 | "< c #181C24", |
101 | "[ c #97979B", | 102 | "[ c #97979B", |
102 | "} c #A7A7AC", | 103 | "} c #A7A7AC", |
103 | "| c #B0B0B4", | 104 | "| c #B0B0B4", |
104 | "1 c #C8C8D1", | 105 | "1 c #C8C8D1", |
105 | "2 c #75757B", | 106 | "2 c #75757B", |
106 | "3 c #46464A", | 107 | "3 c #46464A", |
107 | "4 c #494A4F", | 108 | "4 c #494A4F", |
108 | "5 c #323234", | 109 | "5 c #323234", |
109 | "6 c #909095", | 110 | "6 c #909095", |
110 | "7 c #39393B", | 111 | "7 c #39393B", |
111 | "8 c #757578", | 112 | "8 c #757578", |
112 | "9 c #87878E", | 113 | "9 c #87878E", |
113 | "0 c #222224", | 114 | "0 c #222224", |