summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-06-23 18:53:51 (UTC)
committer llornkcor <llornkcor>2002-06-23 18:53:51 (UTC)
commit616f8cef3111756cac0240be10aea38d4f38ad8e (patch) (side-by-side diff)
tree4d4e5adc2faf9d901b6a3204f3eefa9799eb6c97
parenta27191487361a43e3240a144176688c75e54b868 (diff)
downloadopie-616f8cef3111756cac0240be10aea38d4f38ad8e.zip
opie-616f8cef3111756cac0240be10aea38d4f38ad8e.tar.gz
opie-616f8cef3111756cac0240be10aea38d4f38ad8e.tar.bz2
hide again, one more fix to go..
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index 63ee0b8..84d53e0 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -230,14 +230,14 @@ VMemo::VMemo( QWidget *parent, const char *_name )
// e << 4096; // Key_Escape
// e << Key_F5; //4148
e << toggleKey;
e << QString("QPE/VMemo");
e << QString("toggleRecord()");
}
- // if( vmCfg.readNumEntry("hideIcon",0) == 1 || toggleKey > 0)
- // hide();
+ if( vmCfg.readNumEntry("hideIcon",0) == 1 || toggleKey > 0)
+ hide();
}
}
VMemo::~VMemo()
{
}
@@ -360,12 +360,13 @@ bool VMemo::startRecording() {
}
void VMemo::stopRecording() {
recording = FALSE;
if(useAlerts)
if( msgLabel) delete msgLabel;
+ t_timer->stop();
}
int VMemo::openDSP()
{
Config cfg("Vmemo");
cfg.setGroup("Record");
@@ -453,14 +454,17 @@ int VMemo::openWAV(const char *filename)
void VMemo::record(void)
{
int length=0, result, value;
QString msg;
msg.sprintf("Recording format %d", format);
qDebug(msg);
+ Config config("Vmemo");
+ config.setGroup("Record");
+ int sRate=config.readNumEntry("SizeLimit", 30);
- t_timer->start( 30 * 1000+1000, TRUE);
+ t_timer->start( sRate * 1000+1000, TRUE);
if(systemZaurus) {
msg.sprintf("Recording format zaurus");
qDebug(msg);
signed short sound[512], monoBuffer[512];
@@ -469,13 +473,13 @@ void VMemo::record(void)
while(recording) {
result = read(dsp, sound, 512); // 8192
- int j=0;
+ // int j=0;
for (int i = 0; i < result; i++) { //since Z is mono do normally
monoBuffer[i] = sound[i];
}
length+=write(wav, monoBuffer, result);
@@ -495,13 +499,13 @@ void VMemo::record(void)
} else { //AFMT_U8
// 8bit unsigned
unsigned short sound[512], monoBuffer[512];
while(recording) {
result = read(dsp, sound, 512); // 8192
- int j=0;
+ // int j=0;
// if(systemZaurus) {
for (int i = 0; i < result; i++) { //since Z is mono do normally
monoBuffer[i] = sound[i];
}
@@ -524,13 +528,13 @@ void VMemo::record(void)
} else { // 16 bit only capabilities
msg.sprintf("Recording format other");
qDebug(msg);
- signed short sound[512], monoBuffer[512];
+ signed short sound[512];//, monoBuffer[512];
while(recording) {
result = read(dsp, sound, 512); // 8192
write(wav, sound, result);