summaryrefslogtreecommitdiff
path: root/core/applets/vmemo/vmemo.cpp
Unidiff
Diffstat (limited to 'core/applets/vmemo/vmemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index cfa07b4..63ee0b8 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -28,4 +28,5 @@
28#include <stdlib.h> 28#include <stdlib.h>
29#include <errno.h> 29#include <errno.h>
30#include <qtimer.h>
30 31
31typedef struct _waveheader { 32typedef struct _waveheader {
@@ -202,4 +203,7 @@ VMemo::VMemo( QWidget *parent, const char *_name )
202 203
203 recording = FALSE; 204 recording = FALSE;
205
206 t_timer = new QTimer( this );
207 connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) );
204 208
205 struct utsname name; /* check for embedix kernel running on the zaurus*/ 209 struct utsname name; /* check for embedix kernel running on the zaurus*/
@@ -454,4 +458,6 @@ void VMemo::record(void)
454 qDebug(msg); 458 qDebug(msg);
455 459
460 t_timer->start( 30 * 1000+1000, TRUE);
461
456 if(systemZaurus) { 462 if(systemZaurus) {
457 463
@@ -459,5 +465,5 @@ void VMemo::record(void)
459 qDebug(msg); 465 qDebug(msg);
460 signed short sound[512], monoBuffer[512]; 466 signed short sound[512], monoBuffer[512];
461 467
462 if(format==AFMT_S16_LE) { 468 if(format==AFMT_S16_LE) {
463 469
@@ -469,5 +475,4 @@ void VMemo::record(void)
469 int j=0; 475 int j=0;
470 476
471 // if(systemZaurus) {
472 for (int i = 0; i < result; i++) { //since Z is mono do normally 477 for (int i = 0; i < result; i++) { //since Z is mono do normally
473 monoBuffer[i] = sound[i]; 478 monoBuffer[i] = sound[i];
@@ -612,2 +617,9 @@ int VMemo::setToggleButton(int tog) {
612 return -1; 617 return -1;
613} 618}
619
620void VMemo::timerBreak() {
621 //stop
622 recording=false;
623
624 QMessageBox::message("Vmemo","Vmemo recording has \ntimed out");
625}