summaryrefslogtreecommitdiff
path: root/noncore
authorllornkcor <llornkcor>2004-04-25 20:38:04 (UTC)
committer llornkcor <llornkcor>2004-04-25 20:38:04 (UTC)
commit0e3e74030b2a38cfc754d253ab098a1126f382ef (patch) (side-by-side diff)
tree9eb7544e6c29431cddbcfbc5bfe907d08227dbb2 /noncore
parentae76c412a340a0808ed6ece5e4a8fbc04baa4ff3 (diff)
downloadopie-0e3e74030b2a38cfc754d253ab098a1126f382ef.zip
opie-0e3e74030b2a38cfc754d253ab098a1126f382ef.tar.gz
opie-0e3e74030b2a38cfc754d253ab098a1126f382ef.tar.bz2
hook things up
Diffstat (limited to 'noncore') (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()
- waveform->newSamples( (const short *)abuf, bytesWritten );
+ waveform->newSamples( sbuf, number );
@@ -183,3 +183,4 @@ void quickRec()
- filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate * (float)2 / filePara.channels;
+ filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate * (float)2
+ / filePara.channels;
@@ -207,3 +208,2 @@ void quickRec()
number = soundDevice->devRead( filePara.sd, (short *)inbuffer, BUFSIZE);
- waveform->newSamples( inbuffer, number );
@@ -217,2 +217,3 @@ void quickRec()
bytesWritten = ::write( filePara.fd , inbuffer, number);
+ waveform->newSamples( inbuffer, number );
@@ -233,3 +234,4 @@ void quickRec()
- filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate / (float)2/filePara.channels;
+ filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate
+ / (float)2/filePara.channels;
qApp->processEvents();
@@ -257,2 +259,3 @@ void quickRec()
bytesWritten = ::write( filePara.fd , unsigned_inbuffer, number);
+ waveform->newSamples( (const short *) unsigned_inbuffer, number );
@@ -260,3 +263,3 @@ void quickRec()
stopped = true;
- QMessageBox::message("Note","There was a problem\nwriting to the file");
+ QMessageBox::message("Note","<p>There was a problem writing to the file</p>");
perror("File writing error ");
@@ -315,3 +318,3 @@ void playIt()
bytesWritten = write ( filePara.sd, sbuf, number * 4);
- waveform->newSamples( (const short *)sbuf, number );
+ waveform->newSamples( (const short *)sbuf, number *4);
// if(filePara.channels==1)
@@ -356,3 +359,3 @@ void playIt()
bytesWritten = ::write( filePara.sd, inbuffer, number);
- waveform->newSamples( inbuffer, bytesWritten );
+ waveform->newSamples( inbuffer, number);
//-------------->>>> out to device
@@ -380,4 +383,4 @@ void playIt()
}
- printf("\nplaying number %d, bytes %d, total %d\r",number, bytesWritten, total);
- fflush(stdout);
+// printf("\nplaying number %d, bytes %d, total %d\r",number, bytesWritten, total);
+// fflush(stdout);
} //end loop
@@ -452,3 +455,3 @@ QtRec::QtRec( QWidget* parent, const char* name, WFlags fl )
- if( soundDevice) delete soundDevice;
+// if( soundDevice) delete soundDevice;
@@ -463,2 +466,3 @@ QtRec::QtRec( QWidget* parent, const char* name, WFlags fl )
QtRec::~QtRec() {
+// if( soundDevice) delete soundDevice;
@@ -478,3 +482,3 @@ void QtRec::cleanUp() {
- if( wavFile) delete wavFile;
+// if( wavFile) delete wavFile;
// if(soundDevice) delete soundDevice;
@@ -1503,3 +1507,3 @@ void QtRec::endRecording() {
- if(soundDevice) delete soundDevice;
+// if(soundDevice) delete soundDevice;
@@ -1543,3 +1547,3 @@ void QtRec::endPlaying() {
- if(soundDevice) delete soundDevice;
+// if(soundDevice) delete soundDevice;
@@ -1792,3 +1796,3 @@ void QtRec::compressionSelected(bool b) {
bitRateComboBox->setEnabled( false);
- bitRateComboBox->setCurrentItem( 0);
+ bitRateComboBox->setCurrentItem( 1);
filePara.resolution = 16;