summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opierec/qtrec.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opierec/qtrec.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opierec/qtrec.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp
index e827083..9b761aa 100644
--- a/noncore/multimedia/opierec/qtrec.cpp
+++ b/noncore/multimedia/opierec/qtrec.cpp
@@ -157,5 +157,5 @@ void quickRec()
adpcm_coder( sbuf, abuf, number/2, &encoder_state);
- bytesWritten = ::write( filePara.fd , (short *)abuf, number/4);
+ bytesWritten = ::write( filePara.fd , abuf, number/4);
waveform->newSamples( sbuf, number );
@@ -168,5 +168,5 @@ void quickRec()
fflush(stdout);
- filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate * (float)2 / filePara.channels;
+ filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate * (float)2;// / filePara.channels;
qApp->processEvents();
@@ -302,6 +302,8 @@ void playIt()
// sbuf2[i+1]=sbuf2[i]=sbuf[i];
// }
- bytesWritten = write ( filePara.sd, sbuf, number * 4);
- waveform->newSamples( (const short *)sbuf, number *4);
+ bytesWritten = write ( soundDevice->sd , sbuf, number * 4);
+
+ waveform->newSamples( sbuf, number );
+
// if(filePara.channels==1)
// total += bytesWritten/2; //mono
@@ -343,5 +345,5 @@ void playIt()
// outbuffer[i+1]= outbuffer[i]=inbuffer[i];
// }
- bytesWritten = ::write( filePara.sd, inbuffer, number);
+ bytesWritten = ::write( soundDevice->sd, inbuffer, number);
waveform->newSamples( inbuffer, number);
//-------------->>>> out to device
@@ -789,6 +791,6 @@ void QtRec::initConfig() {
compressionCheckBox->setChecked( cfg.readBoolEntry("wavCompression",1));
if( compressionCheckBox->isChecked()) {
+ bitRateComboBox->setCurrentItem(1);
bitRateComboBox->setEnabled(false);
- bitRateComboBox->setCurrentItem(0);
filePara.resolution=16;
}
@@ -1049,5 +1051,5 @@ bool QtRec::setupAudio( bool b) {
// if(soundDevice) delete soundDevice;
- odebug << "<<<<<<<<<<<<<<<<<<<open dsp " << filePara.sampleRate << " " << filePara.channels << " " << sampleformat << "" << oendl;
+ owarn << "<<<<<<<<<<<<<<<<<<<open dsp " << filePara.sampleRate << " " << filePara.channels << " " << sampleformat << "" << oendl;
// owarn << "change waveform settings" << oendl;
waveform->changeSettings( filePara.sampleRate, filePara.channels );
@@ -1484,5 +1486,5 @@ void QtRec::endPlaying() {
bool QtRec::openPlayFile() {
-
+ qWarning("opening file");
qApp->processEvents();
if( currentFile.isEmpty()) {
@@ -1727,6 +1729,7 @@ void QtRec::compressionSelected(bool b) {
if(b) {
- bitRateComboBox->setEnabled( false);
+ qWarning("set adpcm");
bitRateComboBox->setCurrentItem( 1);
+ bitRateComboBox->setEnabled( false);
filePara.resolution = 16;
} else{