author | llornkcor <llornkcor> | 2005-03-12 02:23:02 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-03-12 02:23:02 (UTC) |
commit | aa7039012cc79c02304e36db16e6f5ff82e19867 (patch) (unidiff) | |
tree | 7e987a42504cfa7fc030bdef813147d61604849d | |
parent | 9815fc1551763226f974f8ea8eab6d0b031e0be3 (diff) | |
download | opie-aa7039012cc79c02304e36db16e6f5ff82e19867.zip opie-aa7039012cc79c02304e36db16e6f5ff82e19867.tar.gz opie-aa7039012cc79c02304e36db16e6f5ff82e19867.tar.bz2 |
remove ouput
-rw-r--r-- | noncore/multimedia/opierec/qtrec.cpp | 35 | ||||
-rw-r--r-- | noncore/multimedia/opierec/qtrec.h | 13 | ||||
-rw-r--r-- | noncore/multimedia/opierec/wavFile.cpp | 36 |
3 files changed, 40 insertions, 44 deletions
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp index 9b761aa..9d3d5cf 100644 --- a/noncore/multimedia/opierec/qtrec.cpp +++ b/noncore/multimedia/opierec/qtrec.cpp | |||
@@ -722,4 +722,9 @@ void QtRec::initConnections() { | |||
722 | connect(toEndButton,SIGNAL(released()),this,SLOT(FastforwardReleased())); | 722 | connect(toEndButton,SIGNAL(released()),this,SLOT(FastforwardReleased())); |
723 | |||
723 | connect(deleteSoundButton,SIGNAL(released()),this,SLOT(deleteSound())); | 724 | connect(deleteSoundButton,SIGNAL(released()),this,SLOT(deleteSound())); |
725 | |||
724 | connect(Stop_PushButton,SIGNAL(released()),this,SLOT(doPlayBtn())); | 726 | connect(Stop_PushButton,SIGNAL(released()),this,SLOT(doPlayBtn())); |
727 | // connect(Stop_PushButton,SIGNAL(released()),this,SLOT(doPlayBtn())); | ||
728 | |||
729 | // connect(Rec_PushButton,SIGNAL(released()),this,SIGNAL(startRecording())); | ||
725 | connect(Rec_PushButton,SIGNAL(released()),this,SLOT(newSound())); | 730 | connect(Rec_PushButton,SIGNAL(released()),this,SLOT(newSound())); |
@@ -813,6 +818,9 @@ void QtRec::stop() { | |||
813 | 818 | ||
814 | if( !recording) | 819 | if( !recording) { |
820 | emit stopPlaying(); | ||
815 | endPlaying(); | 821 | endPlaying(); |
816 | else | 822 | } else { |
823 | emit stopRecording(); | ||
817 | endRecording(); | 824 | endRecording(); |
825 | } | ||
818 | timeSlider->setValue(0); | 826 | timeSlider->setValue(0); |
@@ -866,11 +874,3 @@ bool QtRec::rec() { //record | |||
866 | cfg.setGroup("Settings"); | 874 | cfg.setGroup("Settings"); |
867 | // odebug << "<<<<<<<Device bits " << soundDevice->getDeviceBits() | ||
868 | // << ", device rate " << soundDevice->getDeviceRate() | ||
869 | // << ", device channels " << soundDevice->getDeviceChannels() << oendl; | ||
870 | |||
871 | //filePara.sampleRate = cfg.readNumEntry("samplerate", 22050); | ||
872 | // odebug << "sample rate is " << filePara.sampleRate << "" << oendl; | ||
873 | filePara.SecondsToRecord = getCurrentSizeLimit(); | 875 | filePara.SecondsToRecord = getCurrentSizeLimit(); |
874 | |||
875 | // odebug << "size limit " << filePara.SecondsToRecord << " sec" << oendl; | ||
876 | int diskSize = checkDiskSpace( (const QString &) wavFile->trackName()); | 876 | int diskSize = checkDiskSpace( (const QString &) wavFile->trackName()); |
@@ -1050,4 +1050,3 @@ bool QtRec::setupAudio( bool b) { | |||
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | // if(soundDevice) delete soundDevice; | ||
1053 | owarn << "<<<<<<<<<<<<<<<<<<<open dsp " << filePara.sampleRate << " " << filePara.channels << " " << sampleformat << "" << oendl; | 1052 | owarn << "<<<<<<<<<<<<<<<<<<<open dsp " << filePara.sampleRate << " " << filePara.channels << " " << sampleformat << "" << oendl; |
@@ -1091,4 +1090,2 @@ bool QtRec::setupAudio( bool b) { | |||
1091 | bool QtRec::setUpFile() { //setup file for recording | 1090 | bool QtRec::setUpFile() { //setup file for recording |
1092 | // odebug << "Setting up wavfile" << oendl; | ||
1093 | // if(wavFile) delete wavFile; | ||
1094 | wavFile = new WavFile( this, (const QString &)"", | 1091 | wavFile = new WavFile( this, (const QString &)"", |
@@ -1104,3 +1101,2 @@ bool QtRec::setUpFile() { //setup file for recording | |||
1104 | } else { | 1101 | } else { |
1105 | // filePara.channels=1; | ||
1106 | } | 1102 | } |
@@ -1227,9 +1223,2 @@ void QtRec::deleteSound() { | |||
1227 | return; | 1223 | return; |
1228 | // #ifndef DEV_VERSION | ||
1229 | // switch ( QMessageBox::warning(this,tr("Delete"), | ||
1230 | // tr("Do you really want to <font size=+2><B>DELETE</B></font>\nthe selected file?"), | ||
1231 | // tr("Yes"),tr("No"),0,1,1) ) { | ||
1232 | // case 0: | ||
1233 | // #endif | ||
1234 | // { | ||
1235 | QString file = ListView1->currentItem()->text(0); | 1224 | QString file = ListView1->currentItem()->text(0); |
@@ -1403,5 +1392,3 @@ void QtRec::endRecording() { | |||
1403 | wavFile->adjustHeaders( filePara.fd, filePara.numberSamples); | 1392 | wavFile->adjustHeaders( filePara.fd, filePara.numberSamples); |
1404 | // soundDevice->sd=-1; | ||
1405 | filePara.numberSamples = 0; | 1393 | filePara.numberSamples = 0; |
1406 | // filePara.sd=-1; | ||
1407 | wavFile->closeFile(); | 1394 | wavFile->closeFile(); |
diff --git a/noncore/multimedia/opierec/qtrec.h b/noncore/multimedia/opierec/qtrec.h index 642048a..6e81af6 100644 --- a/noncore/multimedia/opierec/qtrec.h +++ b/noncore/multimedia/opierec/qtrec.h | |||
@@ -62,3 +62,10 @@ public: | |||
62 | 62 | ||
63 | signals: | ||
64 | void stopRecording(); | ||
65 | void startRecording(); | ||
66 | void stopPlaying(); | ||
67 | void startPlaying(); | ||
68 | |||
63 | public slots: | 69 | public slots: |
70 | |||
64 | private: | 71 | private: |
@@ -99,2 +106,4 @@ private: | |||
99 | private slots: | 106 | private slots: |
107 | void endPlaying(); | ||
108 | void endRecording(); | ||
100 | 109 | ||
@@ -102,2 +111,3 @@ private slots: | |||
102 | void FastforwardReleased(); | 111 | void FastforwardReleased(); |
112 | |||
103 | void changeDirCombo(int); | 113 | void changeDirCombo(int); |
@@ -111,2 +121,3 @@ private slots: | |||
111 | void changesamplerateCombo(int); | 121 | void changesamplerateCombo(int); |
122 | |||
112 | void cleanUp(); | 123 | void cleanUp(); |
@@ -172,4 +183,2 @@ protected: | |||
172 | bool setupAudio( bool b); | 183 | bool setupAudio( bool b); |
173 | void endPlaying(); | ||
174 | void endRecording(); | ||
175 | void fileBeamFinished( Ir *ir); | 184 | void fileBeamFinished( Ir *ir); |
diff --git a/noncore/multimedia/opierec/wavFile.cpp b/noncore/multimedia/opierec/wavFile.cpp index b53c416..a0423f0 100644 --- a/noncore/multimedia/opierec/wavFile.cpp +++ b/noncore/multimedia/opierec/wavFile.cpp | |||
@@ -154,3 +154,3 @@ bool WavFile::setWavHeader(int fd, wavhdr *hdr) { | |||
154 | write( fd,hdr, sizeof(*hdr)); | 154 | write( fd,hdr, sizeof(*hdr)); |
155 | owarn << "writing header: bitrate " << wavResolution << ", samplerate " << wavSampleRate << ", channels " << wavChannels << oendl; | 155 | // owarn << "writing header: bitrate " << wavResolution << ", samplerate " << wavSampleRate << ", channels " << wavChannels << oendl; |
156 | return true; | 156 | return true; |
@@ -164,3 +164,3 @@ bool WavFile::adjustHeaders(int fd, int total) { | |||
164 | write( fd, &total, sizeof(total)); | 164 | write( fd, &total, sizeof(total)); |
165 | owarn << "adjusting header " << total << "" << oendl; | 165 | // owarn << "adjusting header " << total << "" << oendl; |
166 | return true; | 166 | return true; |
@@ -169,3 +169,3 @@ bool WavFile::adjustHeaders(int fd, int total) { | |||
169 | int WavFile::parseWavHeader(int fd) { | 169 | int WavFile::parseWavHeader(int fd) { |
170 | owarn << "Parsing wav header" << oendl; | 170 | // owarn << "Parsing wav header" << oendl; |
171 | char string[4]; | 171 | char string[4]; |
@@ -177,3 +177,3 @@ int WavFile::parseWavHeader(int fd) { | |||
177 | if (read(fd, string, 4) < 4) { | 177 | if (read(fd, string, 4) < 4) { |
178 | owarn << " Could not read from sound file." << oendl; | 178 | // owarn << " Could not read from sound file." << oendl; |
179 | return -1; | 179 | return -1; |
@@ -181,3 +181,3 @@ int WavFile::parseWavHeader(int fd) { | |||
181 | if (strncmp(string, "RIFF", 4)) { | 181 | if (strncmp(string, "RIFF", 4)) { |
182 | owarn << " not a valid WAV file." << oendl; | 182 | // owarn << " not a valid WAV file." << oendl; |
183 | return -1; | 183 | return -1; |
@@ -186,3 +186,3 @@ int WavFile::parseWavHeader(int fd) { | |||
186 | if (read(fd, string, 4) < 4) { | 186 | if (read(fd, string, 4) < 4) { |
187 | owarn << "Could not read from sound file." << oendl; | 187 | // owarn << "Could not read from sound file." << oendl; |
188 | return -1; | 188 | return -1; |
@@ -190,3 +190,3 @@ int WavFile::parseWavHeader(int fd) { | |||
190 | if (strncmp(string, "WAVE", 4)) { | 190 | if (strncmp(string, "WAVE", 4)) { |
191 | owarn << "not a valid WAV file." << oendl; | 191 | // owarn << "not a valid WAV file." << oendl; |
192 | return -1; | 192 | return -1; |
@@ -197,3 +197,3 @@ int WavFile::parseWavHeader(int fd) { | |||
197 | if (read(fd, string, 4) < 4) { | 197 | if (read(fd, string, 4) < 4) { |
198 | owarn << "Could not read from sound file." << oendl; | 198 | // owarn << "Could not read from sound file." << oendl; |
199 | return -1; | 199 | return -1; |
@@ -202,3 +202,3 @@ int WavFile::parseWavHeader(int fd) { | |||
202 | if (read(fd, &longdata, 4) < 4) { | 202 | if (read(fd, &longdata, 4) < 4) { |
203 | owarn << "Could not read from sound file." << oendl; | 203 | // owarn << "Could not read from sound file." << oendl; |
204 | return -1; | 204 | return -1; |
@@ -209,3 +209,3 @@ int WavFile::parseWavHeader(int fd) { | |||
209 | if (read(fd, &fmt, 2) < 2) { | 209 | if (read(fd, &fmt, 2) < 2) { |
210 | owarn << "Could not read format chunk." << oendl; | 210 | // owarn << "Could not read format chunk." << oendl; |
211 | return -1; | 211 | return -1; |
@@ -213,3 +213,3 @@ int WavFile::parseWavHeader(int fd) { | |||
213 | if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) { | 213 | if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) { |
214 | owarn << "Wave file contains unknown format. Unable to continue." << oendl; | 214 | // owarn << "Wave file contains unknown format. Unable to continue." << oendl; |
215 | return -1; | 215 | return -1; |
@@ -218,5 +218,5 @@ int WavFile::parseWavHeader(int fd) { | |||
218 | // compressionFormat=fmt; | 218 | // compressionFormat=fmt; |
219 | owarn << "compressionFormat is " << fmt << "" << oendl; | 219 | // owarn << "compressionFormat is " << fmt << "" << oendl; |
220 | if (read(fd, &ch, 2) < 2) { | 220 | if (read(fd, &ch, 2) < 2) { |
221 | owarn << "Could not read format chunk." << oendl; | 221 | // owarn << "Could not read format chunk." << oendl; |
222 | return -1; | 222 | return -1; |
@@ -224,6 +224,6 @@ int WavFile::parseWavHeader(int fd) { | |||
224 | wavChannels = ch; | 224 | wavChannels = ch; |
225 | owarn << "File has " << ch << " channels" << oendl; | 225 | // owarn << "File has " << ch << " channels" << oendl; |
226 | } | 226 | } |
227 | if (read(fd, &samplerrate, 4) < 4) { | 227 | if (read(fd, &samplerrate, 4) < 4) { |
228 | owarn << "Could not read from format chunk." << oendl; | 228 | // owarn << "Could not read from format chunk." << oendl; |
229 | return -1; | 229 | return -1; |
@@ -232,3 +232,3 @@ int WavFile::parseWavHeader(int fd) { | |||
232 | // sampleRate = samplerrate; | 232 | // sampleRate = samplerrate; |
233 | owarn << "File has samplerate of " << (int) samplerrate << "" << oendl; | 233 | // owarn << "File has samplerate of " << (int) samplerrate << "" << oendl; |
234 | } | 234 | } |
@@ -236,3 +236,3 @@ int WavFile::parseWavHeader(int fd) { | |||
236 | if (read(fd, &bitrate, 2) < 2) { | 236 | if (read(fd, &bitrate, 2) < 2) { |
237 | owarn << "Could not read format chunk." << oendl; | 237 | // owarn << "Could not read format chunk." << oendl; |
238 | return -1; | 238 | return -1; |
@@ -241,3 +241,3 @@ int WavFile::parseWavHeader(int fd) { | |||
241 | // resolution = bitrate; | 241 | // resolution = bitrate; |
242 | owarn << "File has bitrate of " << bitrate << "" << oendl; | 242 | // owarn << "File has bitrate of " << bitrate << "" << oendl; |
243 | } | 243 | } |