summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index 577db75..4b398ad 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -366,7 +366,7 @@ bool VMemo::startRecording() {
fileName.replace(QRegExp(" "),"_");
fileName.replace(QRegExp(":"),".");
fileName.replace(QRegExp(","),"");
- fileName += ".wav";
+
qDebug("filename is "+fileName);
// open tmp file here
@@ -386,8 +386,12 @@ bool VMemo::startRecording() {
if( record() ) {
QString cmd;
+ if( fileName.find(".wav",0,TRUE) == -1)
+ fileName += ".wav";
+
cmd.sprintf("mv %s "+fileName, pointer);
// move tmp file to regular file here
+
system(cmd.latin1());
QArray<int> cats(1);
@@ -483,6 +487,8 @@ int VMemo::openWAV(const char *filename) {
}
wav=track.handle();
+ Config vmCfg("Vmemo");
+ vmCfg.setGroup("Defaults");
useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0);
WaveHeader wh;
@@ -533,6 +539,8 @@ bool VMemo::record() {
signed short sound[1024], monoBuffer[1024];
char abuf[bufsize/2];
short sbuf[bufsize];
+ Config vmCfg("Vmemo");
+ vmCfg.setGroup("Defaults");
useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0);
while(recording) {
@@ -595,7 +603,7 @@ bool VMemo::record() {
perror("ioctl(\"SNDCTL_DSP_RESET\")");
::close(dsp);
- fileName = fileName.left(fileName.length()-4);
+
// if(useAlerts)
// QMessageBox::message("Vmemo"," Done1 recording\n"+ fileName);
qDebug("done recording "+fileName);