author | llornkcor <llornkcor> | 2002-03-18 01:56:12 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-18 01:56:12 (UTC) |
commit | 2ed59c2eb1694b3dda2ab709f54a4ad25a24c6cc (patch) (unidiff) | |
tree | f14f5f50b091add26e880e6268bde46e836864af /core/applets | |
parent | c09cb25eb6bbf31bed0d4a415802469cfd1efedf (diff) | |
download | opie-2ed59c2eb1694b3dda2ab709f54a4ad25a24c6cc.zip opie-2ed59c2eb1694b3dda2ab709f54a4ad25a24c6cc.tar.gz opie-2ed59c2eb1694b3dda2ab709f54a4ad25a24c6cc.tar.bz2 |
added Portuguese translations from 'covarde_anonimo' on #opie
-rw-r--r-- | core/applets/batteryapplet/batteryapplet.pro | 1 | ||||
-rw-r--r-- | core/applets/clipboardapplet/clipboardapplet.pro | 2 | ||||
-rw-r--r-- | core/applets/clockapplet/clockapplet.pro | 1 | ||||
-rw-r--r-- | core/applets/screenshotapplet/screenshotapplet.pro | 1 | ||||
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 150 | ||||
-rw-r--r-- | core/applets/vmemo/vmemo.pro | 1 | ||||
-rw-r--r-- | core/applets/volumeapplet/volumeapplet.pro | 1 |
7 files changed, 108 insertions, 49 deletions
diff --git a/core/applets/batteryapplet/batteryapplet.pro b/core/applets/batteryapplet/batteryapplet.pro index dcb606d..d139e58 100644 --- a/core/applets/batteryapplet/batteryapplet.pro +++ b/core/applets/batteryapplet/batteryapplet.pro | |||
@@ -11,2 +11,3 @@ VERSION = 1.0.0 | |||
11 | 11 | ||
12 | TRANSLATIONS += ../../i18n/de/libbatteryapplet.ts | 12 | TRANSLATIONS += ../../i18n/de/libbatteryapplet.ts |
13 | TRANSLATIONS = ../../i18n/pt_BR/libbatteryapplet.ts | ||
diff --git a/core/applets/clipboardapplet/clipboardapplet.pro b/core/applets/clipboardapplet/clipboardapplet.pro index 9832984..f71c787 100644 --- a/core/applets/clipboardapplet/clipboardapplet.pro +++ b/core/applets/clipboardapplet/clipboardapplet.pro | |||
@@ -9,2 +9,4 @@ DEPENDPATH += ../$(OPIEDIR)/include | |||
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | |||
12 | TRANSLATIONS = ../../i18n/pt_BR/libclipboardapplet.ts | ||
diff --git a/core/applets/clockapplet/clockapplet.pro b/core/applets/clockapplet/clockapplet.pro index 1392680..0397340 100644 --- a/core/applets/clockapplet/clockapplet.pro +++ b/core/applets/clockapplet/clockapplet.pro | |||
@@ -11,2 +11,3 @@ VERSION = 1.0.0 | |||
11 | 11 | ||
12 | TRANSLATIONS += ../../i18n/de/libclockapplet.ts | 12 | TRANSLATIONS += ../../i18n/de/libclockapplet.ts |
13 | TRANSLATIONS = ../../i18n/pt_BR/libclockapplet.ts | ||
diff --git a/core/applets/screenshotapplet/screenshotapplet.pro b/core/applets/screenshotapplet/screenshotapplet.pro index 095cce2..d03bacc 100644 --- a/core/applets/screenshotapplet/screenshotapplet.pro +++ b/core/applets/screenshotapplet/screenshotapplet.pro | |||
@@ -12,2 +12,3 @@ MOC_DIR=opieobj | |||
12 | OBJECTS_DIR=opieobj | 12 | OBJECTS_DIR=opieobj |
13 | 13 | ||
14 | TRANSLATIONS = ../../i18n/pt_BR/libscreenshotapplet.ts | ||
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 48dd193..9d69130 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -14,5 +14,5 @@ | |||
14 | * $Id$ | 14 | * $Id$ |
15 | */ | 15 | */ |
16 | 16 | // Sun 03-17-2002 L.J.Potter <ljp@llornkcor.com> | |
17 | #include <sys/utsname.h> | 17 | #include <sys/utsname.h> |
18 | #include <sys/time.h> | 18 | #include <sys/time.h> |
@@ -142,25 +142,20 @@ VMemo::VMemo( QWidget *parent, const char *name ) | |||
142 | recording = FALSE; | 142 | recording = FALSE; |
143 | 143 | ||
144 | myChannel = new QCopChannel( "QPE/VMemo", this ); | 144 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
145 | connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), | 145 | if (uname(&name) != -1) { |
146 | this, SLOT(receive(const QCString&, const QByteArray&)) ); | ||
147 | |||
148 | struct utsname name; /* check for embedix kernel running on the zaurus, if | ||
149 | lineo change string, this break | ||
150 | */ | ||
151 | if (uname(&name) != -1) | ||
152 | { | ||
153 | QString release=name.release; | 146 | QString release=name.release; |
154 | if(release.find("embedix",0,TRUE) !=-1) | 147 | if(release.find("embedix",0,TRUE) !=-1) |
155 | systemZaurus=TRUE; | 148 | systemZaurus=TRUE; |
156 | else | 149 | else { |
157 | { | ||
158 | systemZaurus=FALSE; | 150 | systemZaurus=FALSE; |
159 | 151 | // myChannel = new QCopChannel( "QPE/VMemo", this ); | |
160 | // Register the REC key press. | 152 | // connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), |
161 | QCopEnvelope e("QPE/Desktop", "keyRegister(int key, QString channel, QString message)"); | 153 | // this, SLOT(receive(const QCString&, const QByteArray&)) ); |
162 | e << 4096; | 154 | |
163 | e << QString("QPE/VMemo"); | 155 | // // Register the REC key press, for ipaq only |
164 | e << QString("toggleRecord()"); | 156 | // QCopEnvelope e("QPE/Desktop", "keyRegister(int key, QString channel, QString message)"); |
157 | // e << 4096; | ||
158 | // e << QString("QPE/VMemo"); | ||
159 | // e << QString("toggleRecord()"); | ||
165 | } | 160 | } |
166 | } | 161 | } |
@@ -202,9 +197,9 @@ void VMemo::mousePressEvent( QMouseEvent *me ) | |||
202 | mousePressEvent and mouseReleaseEvent with a NULL parameter. | 197 | mousePressEvent and mouseReleaseEvent with a NULL parameter. |
203 | */ | 198 | */ |
204 | if (!systemZaurus && me != NULL) | 199 | // if (!systemZaurus && me != NULL) |
205 | return; | 200 | // return; |
206 | 201 | ||
207 | QSound::play(Resource::findSound("vmemob")); | 202 | QSound::play(Resource::findSound("vmemob")); |
208 | 203 | qDebug("Start recording"); | |
209 | recording = TRUE; | 204 | recording = TRUE; |
210 | if (openDSP() == -1) | 205 | if (openDSP() == -1) |
@@ -273,46 +268,38 @@ int VMemo::openDSP() | |||
273 | speed = cfg.readNumEntry("SampleRate", 22050); | 268 | speed = cfg.readNumEntry("SampleRate", 22050); |
274 | channels = cfg.readNumEntry("Stereo", 1) ? 2 : 1; // 1 = stereo(2), 0 = mono(1) | 269 | channels = cfg.readNumEntry("Stereo", 1) ? 2 : 1; // 1 = stereo(2), 0 = mono(1) |
275 | if (cfg.readNumEntry("SixteenBit", 1)==1) | 270 | if (cfg.readNumEntry("SixteenBit", 1)==1) { |
276 | { | ||
277 | format = AFMT_S16_LE; | 271 | format = AFMT_S16_LE; |
278 | resolution = 16; | 272 | resolution = 16; |
279 | } | 273 | } |
280 | else | 274 | // else { |
281 | { | 275 | // format = AFMT_U8; |
282 | format = AFMT_U8; | 276 | // resolution = 8; |
283 | resolution = 8; | 277 | // } |
284 | } | ||
285 | 278 | ||
286 | if(systemZaurus) | 279 | if(systemZaurus) { |
287 | { | ||
288 | dsp = open("/dev/dsp1", O_RDWR); //Zaurus needs /dev/dsp1 | 280 | dsp = open("/dev/dsp1", O_RDWR); //Zaurus needs /dev/dsp1 |
289 | channels=1; //zaurus has one input channel | 281 | channels=1; //zaurus has one input channel |
290 | } | 282 | } else { |
291 | else | ||
292 | dsp = open("/dev/dsp", O_RDWR); | 283 | dsp = open("/dev/dsp", O_RDWR); |
284 | } | ||
293 | 285 | ||
294 | if(dsp == -1) | 286 | if(dsp == -1) { |
295 | { | ||
296 | perror("open(\"/dev/dsp\")"); | 287 | perror("open(\"/dev/dsp\")"); |
297 | return -1; | 288 | return -1; |
298 | } | 289 | } |
299 | 290 | ||
300 | if(ioctl(dsp, SNDCTL_DSP_SETFMT , &format)==-1) | 291 | if(ioctl(dsp, SNDCTL_DSP_SETFMT , &format)==-1) { |
301 | { | ||
302 | perror("ioctl(\"SNDCTL_DSP_SETFMT\")"); | 292 | perror("ioctl(\"SNDCTL_DSP_SETFMT\")"); |
303 | return -1; | 293 | return -1; |
304 | } | 294 | } |
305 | if(ioctl(dsp, SNDCTL_DSP_CHANNELS , &channels)==-1) | 295 | if(ioctl(dsp, SNDCTL_DSP_CHANNELS , &channels)==-1) { |
306 | { | ||
307 | perror("ioctl(\"SNDCTL_DSP_CHANNELS\")"); | 296 | perror("ioctl(\"SNDCTL_DSP_CHANNELS\")"); |
308 | return -1; | 297 | return -1; |
309 | } | 298 | } |
310 | if(ioctl(dsp, SNDCTL_DSP_SPEED , &speed)==-1) | 299 | if(ioctl(dsp, SNDCTL_DSP_SPEED , &speed)==-1) { |
311 | { | ||
312 | perror("ioctl(\"SNDCTL_DSP_SPEED\")"); | 300 | perror("ioctl(\"SNDCTL_DSP_SPEED\")"); |
313 | return -1; | 301 | return -1; |
314 | } | 302 | } |
315 | if(ioctl(dsp, SOUND_PCM_READ_RATE , &rate)==-1) | 303 | if(ioctl(dsp, SOUND_PCM_READ_RATE , &rate)==-1) { |
316 | { | ||
317 | perror("ioctl(\"SOUND_PCM_READ_RATE\")"); | 304 | perror("ioctl(\"SOUND_PCM_READ_RATE\")"); |
318 | return -1; | 305 | return -1; |
@@ -355,16 +342,79 @@ void VMemo::record(void) | |||
355 | { | 342 | { |
356 | int length=0, result, value; | 343 | int length=0, result, value; |
357 | char sound[512]; | 344 | qDebug("Recording"); |
358 | 345 | ||
359 | while(recording) | 346 | if(format==AFMT_S16_LE) { |
360 | { | 347 | signed short sound[512], monoBuffer[512]; |
348 | while(recording) { | ||
361 | result = read(dsp, sound, 512); // 8192 | 349 | result = read(dsp, sound, 512); // 8192 |
362 | qApp->processEvents(); | 350 | qApp->processEvents(); |
363 | 351 | int j=0; | |
364 | write(wav, sound, result); | 352 | if(systemZaurus) { |
365 | length += result; | 353 | for (int i = 0; i < result; i++) { //since Z is mono do normally |
366 | 354 | monoBuffer[i] = sound[i]; | |
355 | } | ||
356 | qApp->processEvents(); | ||
357 | length+=write(wav, monoBuffer, result); | ||
358 | } else { //ipaq /stereo inputs | ||
359 | for (int i = 0; i < result; i+=2) { | ||
360 | monoBuffer[j] = (sound[i]+sound[i+1])/2; | ||
361 | j++; | ||
362 | } | ||
367 | qApp->processEvents(); | 363 | qApp->processEvents(); |
364 | length+=write(wav, monoBuffer, result/2); | ||
365 | } | ||
366 | printf("%d\r",length); | ||
367 | fflush(stdout); | ||
368 | } | 368 | } |
369 | } | ||
370 | // else { //AFMT_U8 // don't try this yet.. as player doesn't understand | ||
371 | // 8bit unsigned | ||
372 | // unsigned short sound[512], monoBuffer[512]; | ||
373 | // while(recording) | ||
374 | // { | ||
375 | // result = read(dsp, sound, 512); // 8192 | ||
376 | // qApp->processEvents(); | ||
377 | // int j=0; | ||
378 | // if(systemZaurus) | ||
379 | // { | ||
380 | // for (int i = 0; i < result; i++) { //since Z is mono do normally | ||
381 | // monoBuffer[i] = sound[i]; | ||
382 | // } | ||
383 | // qApp->processEvents(); | ||
384 | // length+=write(wav, monoBuffer, result); | ||
385 | // } else { //ipaq /stereo inputs | ||
386 | // for (int i = 0; i < result; i+=2) { | ||
387 | // monoBuffer[j] = (sound[i]+sound[i+1])/2; | ||
388 | // j++; | ||
389 | // } | ||
390 | // qApp->processEvents(); | ||
391 | // length+=write(wav, monoBuffer, result/2); | ||
392 | // } | ||
393 | // // length += result; | ||
394 | // printf("%d\r",length); | ||
395 | // fflush(stdout); | ||
396 | |||
397 | // qApp->processEvents(); | ||
398 | // } | ||
399 | // } | ||
400 | |||
401 | |||
402 | |||
403 | // char sound[512]; //char is 8 bit | ||
404 | |||
405 | // while(recording) | ||
406 | // { | ||
407 | // result = read(dsp, sound, 512); // 8192 | ||
408 | // qApp->processEvents(); | ||
409 | |||
410 | // write(wav, sound, result); | ||
411 | // length += result; | ||
412 | |||
413 | // qApp->processEvents(); | ||
414 | // } | ||
415 | // qDebug("file has length of %d lasting %d seconds", | ||
416 | // length, (( length / speed) / channels) / 2 ); | ||
417 | // medialplayer states wrong length in secs | ||
418 | |||
369 | 419 | ||
370 | value = length+36; | 420 | value = length+36; |
@@ -378,4 +428,6 @@ void VMemo::record(void) | |||
378 | perror("ioctl(\"SNDCTL_DSP_RESET\")"); | 428 | perror("ioctl(\"SNDCTL_DSP_RESET\")"); |
379 | ::close(dsp); | 429 | ::close(dsp); |
430 | // if(systemZaurus) | ||
431 | QMessageBox::message("Vmemo"," Done recording"); | ||
380 | 432 | ||
381 | QSound::play(Resource::findSound("vmemoe")); | 433 | QSound::play(Resource::findSound("vmemoe")); |
diff --git a/core/applets/vmemo/vmemo.pro b/core/applets/vmemo/vmemo.pro index bf9af4b..29f99fb 100644 --- a/core/applets/vmemo/vmemo.pro +++ b/core/applets/vmemo/vmemo.pro | |||
@@ -10,2 +10,3 @@ LIBS += -lqpe | |||
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../i18n/pt_BR/libvmemoapplet.ts | ||
diff --git a/core/applets/volumeapplet/volumeapplet.pro b/core/applets/volumeapplet/volumeapplet.pro index fedaed7..c5b764b 100644 --- a/core/applets/volumeapplet/volumeapplet.pro +++ b/core/applets/volumeapplet/volumeapplet.pro | |||
@@ -11,2 +11,3 @@ VERSION = 1.0.0 | |||
11 | 11 | ||
12 | TRANSLATIONS += ../../i18n/de/libvolumeapplet.ts | 12 | TRANSLATIONS += ../../i18n/de/libvolumeapplet.ts |
13 | TRANSLATIONS = ../../i18n/pt_BR/libvolumeapplet.ts | ||