author | llornkcor <llornkcor> | 2002-06-23 17:17:08 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-23 17:17:08 (UTC) |
commit | 7c22b9cbf92650c432a84537f4b9c3d810e7dc75 (patch) (side-by-side diff) | |
tree | 61525d12126e87cbce8135d2717c98340a7571e3 /core/applets/vmemo/vmemo.cpp | |
parent | 3165f1b279a7a3a863decf06013c6275466092e5 (diff) | |
download | opie-7c22b9cbf92650c432a84537f4b9c3d810e7dc75.zip opie-7c22b9cbf92650c432a84537f4b9c3d810e7dc75.tar.gz opie-7c22b9cbf92650c432a84537f4b9c3d810e7dc75.tar.bz2 |
quick fix for ongoing recording
Diffstat (limited to 'core/applets/vmemo/vmemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 16 |
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 @@ #include <stdlib.h> #include <errno.h> +#include <qtimer.h> typedef struct _waveheader { @@ -202,4 +203,7 @@ VMemo::VMemo( QWidget *parent, const char *_name ) recording = FALSE; + + t_timer = new QTimer( this ); + connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) ); struct utsname name; /* check for embedix kernel running on the zaurus*/ @@ -454,4 +458,6 @@ void VMemo::record(void) qDebug(msg); + t_timer->start( 30 * 1000+1000, TRUE); + if(systemZaurus) { @@ -459,5 +465,5 @@ void VMemo::record(void) qDebug(msg); signed short sound[512], monoBuffer[512]; - + if(format==AFMT_S16_LE) { @@ -469,5 +475,4 @@ void VMemo::record(void) int j=0; - // if(systemZaurus) { for (int i = 0; i < result; i++) { //since Z is mono do normally monoBuffer[i] = sound[i]; @@ -612,2 +617,9 @@ int VMemo::setToggleButton(int tog) { return -1; } + +void VMemo::timerBreak() { + //stop + recording=false; + + QMessageBox::message("Vmemo","Vmemo recording has \ntimed out"); +} |