-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 6867e82..7af3d8b 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -10,96 +10,90 @@ | |||
10 | ** | 10 | ** |
11 | ************************************************************************************/ | 11 | ************************************************************************************/ |
12 | // copyright 2002 Jeremy Cowgar <jc@cowgar.com> | 12 | // copyright 2002 Jeremy Cowgar <jc@cowgar.com> |
13 | /* | 13 | /* |
14 | * $Id$ | 14 | * $Id$ |
15 | */ | 15 | */ |
16 | // Sun 03-17-2002 L.J.Potter <ljp@llornkcor.com> | 16 | // Sun 03-17-2002 L.J.Potter <ljp@llornkcor.com> |
17 | extern "C" { | 17 | extern "C" { |
18 | #include "adpcm.h" | 18 | #include "adpcm.h" |
19 | } | 19 | } |
20 | 20 | ||
21 | #include <sys/utsname.h> | 21 | #include <sys/utsname.h> |
22 | #include <sys/time.h> | 22 | #include <sys/time.h> |
23 | #include <sys/types.h> | 23 | #include <sys/types.h> |
24 | #include <unistd.h> | 24 | #include <unistd.h> |
25 | #include <stdio.h> | 25 | #include <stdio.h> |
26 | #include <sys/stat.h> | 26 | #include <sys/stat.h> |
27 | #include <fcntl.h> | 27 | #include <fcntl.h> |
28 | #include <sys/ioctl.h> | 28 | #include <sys/ioctl.h> |
29 | #include <linux/soundcard.h> | 29 | #include <linux/soundcard.h> |
30 | 30 | ||
31 | #include <string.h> | 31 | #include <string.h> |
32 | #include <stdlib.h> | 32 | #include <stdlib.h> |
33 | #include <errno.h> | 33 | #include <errno.h> |
34 | #include <qtimer.h> | ||
35 | 34 | ||
36 | typedef struct _waveheader { | 35 | typedef struct _waveheader { |
37 | u_long main_chunk; /* 'RIFF' */ | 36 | u_long main_chunk; /* 'RIFF' */ |
38 | u_long length; /* filelen */ | 37 | u_long length; /* filelen */ |
39 | u_long chunk_type; /* 'WAVE' */ | 38 | u_long chunk_type; /* 'WAVE' */ |
40 | u_long sub_chunk; /* 'fmt ' */ | 39 | u_long sub_chunk; /* 'fmt ' */ |
41 | u_long sc_len; /* length of sub_chunk, =16 | 40 | u_long sc_len; /* length of sub_chunk, =16 |
42 | (chunckSize) format len */ | 41 | (chunckSize) format len */ |
43 | u_short format; /* should be 1 for PCM-code (formatTag) */ | 42 | u_short format; /* should be 1 for PCM-code (formatTag) */ |
44 | 43 | ||
45 | u_short modus; /* 1 Mono, 2 Stereo (channels) */ | 44 | u_short modus; /* 1 Mono, 2 Stereo (channels) */ |
46 | u_long sample_fq; /* samples per second (samplesPerSecond) */ | 45 | u_long sample_fq; /* samples per second (samplesPerSecond) */ |
47 | u_long byte_p_sec; /* avg bytes per second (avgBytePerSecond) */ | 46 | u_long byte_p_sec; /* avg bytes per second (avgBytePerSecond) */ |
48 | u_short byte_p_spl; /* samplesize; 1 or 2 bytes (blockAlign) */ | 47 | u_short byte_p_spl; /* samplesize; 1 or 2 bytes (blockAlign) */ |
49 | u_short bit_p_spl; /* 8, 12 or 16 bit (bitsPerSample) */ | 48 | u_short bit_p_spl; /* 8, 12 or 16 bit (bitsPerSample) */ |
50 | 49 | ||
51 | u_long data_chunk; /* 'data' */ | 50 | u_long data_chunk; /* 'data' */ |
52 | 51 | ||
53 | u_long data_length;/* samplecount */ | 52 | u_long data_length;/* samplecount */ |
54 | } WaveHeader; | 53 | } WaveHeader; |
55 | 54 | ||
56 | #define RIFF 0x46464952 | 55 | #define RIFF 0x46464952 |
57 | #define WAVE 0x45564157 | 56 | #define WAVE 0x45564157 |
58 | #define FMT 0x20746D66 | 57 | #define FMT 0x20746D66 |
59 | #define DATA 0x61746164 | 58 | #define DATA 0x61746164 |
60 | #define PCM_CODE 1 | 59 | #define PCM_CODE 1 |
61 | #define WAVE_MONO 1 | 60 | #define WAVE_MONO 1 |
62 | #define WAVE_STEREO 2 | 61 | #define WAVE_STEREO 2 |
63 | 62 | ||
64 | struct adpcm_state encoder_state; | 63 | struct adpcm_state encoder_state; |
65 | //struct adpcm_state decoder_state; | 64 | //struct adpcm_state decoder_state; |
66 | 65 | ||
67 | #define WAVE_FORMAT_DVI_ADPCM (0x0011) | 66 | #define WAVE_FORMAT_DVI_ADPCM (0x0011) |
68 | #define WAVE_FORMAT_PCM (0x0001) | 67 | #define WAVE_FORMAT_PCM (0x0001) |
69 | 68 | ||
70 | 69 | ||
71 | #include "vmemo.h" | 70 | #include "vmemo.h" |
72 | 71 | ||
73 | #include <qpe/qpeapplication.h> | 72 | #include <qpe/qpeapplication.h> |
74 | #include <qpe/resource.h> | ||
75 | #include <qpe/config.h> | 73 | #include <qpe/config.h> |
76 | 74 | ||
77 | #include <qpainter.h> | 75 | #include <qpainter.h> |
78 | #include <qdatetime.h> | ||
79 | #include <qregexp.h> | ||
80 | #include <qsound.h> | ||
81 | #include <qfile.h> | ||
82 | #include <qmessagebox.h> | 76 | #include <qmessagebox.h> |
83 | 77 | ||
84 | int seq = 0; | 78 | int seq = 0; |
85 | 79 | ||
86 | /* XPM */ | 80 | /* XPM */ |
87 | static char * vmemo_xpm[] = { | 81 | static char * vmemo_xpm[] = { |
88 | "16 16 102 2", | 82 | "16 16 102 2", |
89 | " c None", | 83 | " c None", |
90 | ". c #60636A", | 84 | ". c #60636A", |
91 | "+ c #6E6E72", | 85 | "+ c #6E6E72", |
92 | "@ c #68696E", | 86 | "@ c #68696E", |
93 | "# c #4D525C", | 87 | "# c #4D525C", |
94 | "$ c #6B6C70", | 88 | "$ c #6B6C70", |
95 | "% c #E3E3E8", | 89 | "% c #E3E3E8", |
96 | "& c #EEEEF2", | 90 | "& c #EEEEF2", |
97 | "* c #EAEAEF", | 91 | "* c #EAEAEF", |
98 | "= c #CACAD0", | 92 | "= c #CACAD0", |
99 | "- c #474A51", | 93 | "- c #474A51", |
100 | "; c #171819", | 94 | "; c #171819", |
101 | "> c #9B9B9F", | 95 | "> c #9B9B9F", |
102 | ", c #EBEBF0", | 96 | ", c #EBEBF0", |
103 | "' c #F4F4F7", | 97 | "' c #F4F4F7", |
104 | ") c #F1F1F5", | 98 | ") c #F1F1F5", |
105 | "! c #DEDEE4", | 99 | "! c #DEDEE4", |