summaryrefslogtreecommitdiff
authorwaspe <waspe>2003-11-03 17:55:02 (UTC)
committer waspe <waspe>2003-11-03 17:55:02 (UTC)
commit6d7e3e8b04b63d92c61d1109c35163690f2c9948 (patch) (unidiff)
tree0b21b31e2ce6df2639469bc2b75d625203a2c298
parentea385e81e3de3ee100a5789a8a8d1b807d89efe0 (diff)
downloadopie-6d7e3e8b04b63d92c61d1109c35163690f2c9948.zip
opie-6d7e3e8b04b63d92c61d1109c35163690f2c9948.tar.gz
opie-6d7e3e8b04b63d92c61d1109c35163690f2c9948.tar.bz2
reolved merge conflict
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index 6ec4583..83c148f 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -1,158 +1,157 @@
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// copyright 2002 Jeremy Cowgar <jc@cowgar.com> 12// copyright 2002 Jeremy Cowgar <jc@cowgar.com>
13/* 13/*
14 * $Id$ 14 * $Id$
15 */ 15*/
16// copyright 2002 and 2003 L.J.Potter <ljp@llornkcor.com> 16// copyright 2002 and 2003 L.J.Potter <ljp@llornkcor.com>
17 17
18extern "C" { 18extern "C" {
19#include "adpcm.h" 19#include "adpcm.h"
20} 20}
21 21
22#include <unistd.h> 22#include <unistd.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <fcntl.h> 24#include <fcntl.h>
25#include <sys/ioctl.h> 25#include <sys/ioctl.h>
26#include <linux/soundcard.h> 26#include <linux/soundcard.h>
27 27
28#include <errno.h> 28#include <errno.h>
29 29
30
31typedef struct _waveheader { 30typedef 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
59struct adpcm_state encoder_state; 58struct adpcm_state encoder_state;
60//struct adpcm_state decoder_state; 59//struct adpcm_state decoder_state;
61 60
62#define WAVE_FORMAT_DVI_ADPCM (0x0011) 61#define WAVE_FORMAT_DVI_ADPCM (0x0011)
63#define WAVE_FORMAT_PCM (0x0001) 62#define WAVE_FORMAT_PCM (0x0001)
64 63
65 64
66#include "vmemo.h" 65#include "vmemo.h"
67 66
68#include <qpe/qpeapplication.h> 67#include <qpe/qpeapplication.h>
69#include <qpe/config.h> 68#include <qpe/config.h>
70 69
71#include <qpainter.h> 70#include <qpainter.h>
72#include <qmessagebox.h> 71#include <qmessagebox.h>
73 72
74int seq = 0; 73int seq = 0;
75 74
76/* XPM */ 75/* XPM */
77static char * vmemo_xpm[] = { 76static char * vmemo_xpm[] = {
78 "16 16 102 2", 77 "16 16 102 2",
79 " c None", 78 " c None",
80 ". c #60636A", 79 ". c #60636A",
81 "+ c #6E6E72", 80 "+ c #6E6E72",
82 "@ c #68696E", 81 "@ c #68696E",
83 "# c #4D525C", 82 "# c #4D525C",
84 "$ c #6B6C70", 83 "$ c #6B6C70",
85 "% c #E3E3E8", 84 "% c #E3E3E8",
86 "& c #EEEEF2", 85 "& c #EEEEF2",
87 "* c #EAEAEF", 86 "* c #EAEAEF",
88 "= c #CACAD0", 87 "= c #CACAD0",
89 "- c #474A51", 88 "- c #474A51",
90 "; c #171819", 89 "; c #171819",
91 "> c #9B9B9F", 90 "> c #9B9B9F",
92 ", c #EBEBF0", 91 ", c #EBEBF0",
93 "' c #F4F4F7", 92 "' c #F4F4F7",
94 ") c #F1F1F5", 93 ") c #F1F1F5",
95 "! c #DEDEE4", 94 "! c #DEDEE4",
96 "~ c #57575C", 95 "~ c #57575C",
97 "{ c #010101", 96 "{ c #010101",
98 "] c #A2A2A6", 97 "] c #A2A2A6",
99 "^ c #747477", 98 "^ c #747477",
100 "/ c #B5B5B8", 99 "/ c #B5B5B8",
101 "( c #AEAEB2", 100 "( c #AEAEB2",
102 "_ c #69696D", 101 "_ c #69696D",
103 ": c #525256", 102 ": c #525256",
104 "< c #181C24", 103 "< c #181C24",
105 "[ c #97979B", 104 "[ c #97979B",
106 "} c #A7A7AC", 105 "} c #A7A7AC",
107 "| c #B0B0B4", 106 "| c #B0B0B4",
108 "1 c #C8C8D1", 107 "1 c #C8C8D1",
109 "2 c #75757B", 108 "2 c #75757B",
110 "3 c #46464A", 109 "3 c #46464A",
111 "4 c #494A4F", 110 "4 c #494A4F",
112 "5 c #323234", 111 "5 c #323234",
113 "6 c #909095", 112 "6 c #909095",
114 "7 c #39393B", 113 "7 c #39393B",
115 "8 c #757578", 114 "8 c #757578",
116 "9 c #87878E", 115 "9 c #87878E",
117 "0 c #222224", 116 "0 c #222224",
118 "a c #414144", 117 "a c #414144",
119 "b c #6A6A6E", 118 "b c #6A6A6E",
120 "c c #020C16", 119 "c c #020C16",
121 "d c #6B6B6F", 120 "d c #6B6B6F",
122 "e c #68686D", 121 "e c #68686D",
123 "f c #5B5B60", 122 "f c #5B5B60",
124 "g c #8A8A8F", 123 "g c #8A8A8F",
125 "h c #6B6B6E", 124 "h c #6B6B6E",
126 "i c #ADADB2", 125 "i c #ADADB2",
127 "j c #828289", 126 "j c #828289",
128 "k c #3E3E41", 127 "k c #3E3E41",
129 "l c #CFCFD7", 128 "l c #CFCFD7",
130 "m c #4C4C50", 129 "m c #4C4C50",
131 "n c #000000", 130 "n c #000000",
132 "o c #66666A", 131 "o c #66666A",
133 "p c #505054", 132 "p c #505054",
134 "q c #838388", 133 "q c #838388",
135 "r c #A1A1A7", 134 "r c #A1A1A7",
136 "s c #A9A9AE", 135 "s c #A9A9AE",
137 "t c #A8A8B0", 136 "t c #A8A8B0",
138 "u c #5E5E63", 137 "u c #5E5E63",
139 "v c #3A3A3E", 138 "v c #3A3A3E",
140 "w c #BDBDC6", 139 "w c #BDBDC6",
141 "x c #59595E", 140 "x c #59595E",
142 "y c #76767C", 141 "y c #76767C",
143 "z c #373738", 142 "z c #373738",
144 "A c #717174", 143 "A c #717174",
145 "B c #727278", 144 "B c #727278",
146 "C c #1C1C1E", 145 "C c #1C1C1E",
147 "D c #3C3C3F", 146 "D c #3C3C3F",
148 "E c #ADADB6", 147 "E c #ADADB6",
149 "F c #54555A", 148 "F c #54555A",
150 "G c #8B8C94", 149 "G c #8B8C94",
151 "H c #5A5A5F", 150 "H c #5A5A5F",
152 "I c #BBBBC3", 151 "I c #BBBBC3",
153 "J c #C4C4CB", 152 "J c #C4C4CB",
154 "K c #909098", 153 "K c #909098",
155 "L c #737379", 154 "L c #737379",
156 "M c #343437", 155 "M c #343437",
157 "N c #8F8F98", 156 "N c #8F8F98",
158 "O c #000407", 157 "O c #000407",