summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opierec
Unidiff
Diffstat (limited to 'noncore/multimedia/opierec') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opierec/qtrec.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp
index 2187d5a..6eb6524 100644
--- a/noncore/multimedia/opierec/qtrec.cpp
+++ b/noncore/multimedia/opierec/qtrec.cpp
@@ -177,3 +177,3 @@ void quickRec()
177 177
178 waveform->newSamples( (const short *)abuf, bytesWritten ); 178 waveform->newSamples( sbuf, number );
179 179
@@ -183,3 +183,4 @@ void quickRec()
183 183
184 filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate * (float)2 / filePara.channels; 184 filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate * (float)2
185 / filePara.channels;
185 186
@@ -207,3 +208,2 @@ void quickRec()
207 number = soundDevice->devRead( filePara.sd, (short *)inbuffer, BUFSIZE); 208 number = soundDevice->devRead( filePara.sd, (short *)inbuffer, BUFSIZE);
208 waveform->newSamples( inbuffer, number );
209 209
@@ -217,2 +217,3 @@ void quickRec()
217 bytesWritten = ::write( filePara.fd , inbuffer, number); 217 bytesWritten = ::write( filePara.fd , inbuffer, number);
218 waveform->newSamples( inbuffer, number );
218 219
@@ -233,3 +234,4 @@ void quickRec()
233 234
234 filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate / (float)2/filePara.channels; 235 filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate
236 / (float)2/filePara.channels;
235 qApp->processEvents(); 237 qApp->processEvents();
@@ -257,2 +259,3 @@ void quickRec()
257 bytesWritten = ::write( filePara.fd , unsigned_inbuffer, number); 259 bytesWritten = ::write( filePara.fd , unsigned_inbuffer, number);
260 waveform->newSamples( (const short *) unsigned_inbuffer, number );
258 261
@@ -260,3 +263,3 @@ void quickRec()
260 stopped = true; 263 stopped = true;
261 QMessageBox::message("Note","There was a problem\nwriting to the file"); 264 QMessageBox::message("Note","<p>There was a problem writing to the file</p>");
262 perror("File writing error "); 265 perror("File writing error ");
@@ -315,3 +318,3 @@ void playIt()
315 bytesWritten = write ( filePara.sd, sbuf, number * 4); 318 bytesWritten = write ( filePara.sd, sbuf, number * 4);
316 waveform->newSamples( (const short *)sbuf, number ); 319 waveform->newSamples( (const short *)sbuf, number *4);
317 // if(filePara.channels==1) 320 // if(filePara.channels==1)
@@ -356,3 +359,3 @@ void playIt()
356 bytesWritten = ::write( filePara.sd, inbuffer, number); 359 bytesWritten = ::write( filePara.sd, inbuffer, number);
357 waveform->newSamples( inbuffer, bytesWritten ); 360 waveform->newSamples( inbuffer, number);
358 //-------------->>>> out to device 361 //-------------->>>> out to device
@@ -380,4 +383,4 @@ void playIt()
380 } 383 }
381 printf("\nplaying number %d, bytes %d, total %d\r",number, bytesWritten, total); 384// printf("\nplaying number %d, bytes %d, total %d\r",number, bytesWritten, total);
382 fflush(stdout); 385// fflush(stdout);
383 } //end loop 386 } //end loop
@@ -452,3 +455,3 @@ QtRec::QtRec( QWidget* parent, const char* name, WFlags fl )
452 455
453 if( soundDevice) delete soundDevice; 456 // if( soundDevice) delete soundDevice;
454 457
@@ -463,2 +466,3 @@ QtRec::QtRec( QWidget* parent, const char* name, WFlags fl )
463QtRec::~QtRec() { 466QtRec::~QtRec() {
467// if( soundDevice) delete soundDevice;
464 468
@@ -478,3 +482,3 @@ void QtRec::cleanUp() {
478 482
479 if( wavFile) delete wavFile; 483 // if( wavFile) delete wavFile;
480// if(soundDevice) delete soundDevice; 484// if(soundDevice) delete soundDevice;
@@ -1503,3 +1507,3 @@ void QtRec::endRecording() {
1503 1507
1504 if(soundDevice) delete soundDevice; 1508 // if(soundDevice) delete soundDevice;
1505 1509
@@ -1543,3 +1547,3 @@ void QtRec::endPlaying() {
1543 1547
1544 if(soundDevice) delete soundDevice; 1548 // if(soundDevice) delete soundDevice;
1545 1549
@@ -1792,3 +1796,3 @@ void QtRec::compressionSelected(bool b) {
1792 bitRateComboBox->setEnabled( false); 1796 bitRateComboBox->setEnabled( false);
1793 bitRateComboBox->setCurrentItem( 0); 1797 bitRateComboBox->setCurrentItem( 1);
1794 filePara.resolution = 16; 1798 filePara.resolution = 16;