-rw-r--r-- | noncore/graphics/opie-eye/gui/imageinfoui.cpp | 2 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opierec/qtrec.cpp | 18 | ||||
-rw-r--r-- | noncore/multimedia/opierec/wavFile.cpp | 14 |
5 files changed, 19 insertions, 19 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp index 27a67a6..e70d6a6 100644 --- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp +++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp | |||
@@ -153,13 +153,13 @@ imageinfo::~imageinfo() | |||
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ||
156 | void imageinfo::slot_fullInfo(const QString&_path, const QString&_t) | 156 | void imageinfo::slot_fullInfo(const QString&_path, const QString&_t) |
157 | { | 157 | { |
158 | if (_path == currentFile) { | 158 | if (_path == currentFile) { |
159 | qDebug(_t); | 159 | odebug << _t << oendl; |
160 | QString t = _t; | 160 | QString t = _t; |
161 | t.replace(QRegExp("\n"),"<br>"); | 161 | t.replace(QRegExp("\n"),"<br>"); |
162 | TextView1->setText(t); | 162 | TextView1->setText(t); |
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index 274a22a..6fff5ab 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp | |||
@@ -39,13 +39,13 @@ OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>) | |||
39 | PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) | 39 | PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) |
40 | : QMainWindow( wid, name, style ), m_info( 0 ), m_disp( 0 ) | 40 | : QMainWindow( wid, name, style ), m_info( 0 ), m_disp( 0 ) |
41 | { | 41 | { |
42 | setCaption( QObject::tr("Opie Eye Caramba" ) ); | 42 | setCaption( QObject::tr("Opie Eye Caramba" ) ); |
43 | m_cfg = new Opie::Core::OConfig("phunkview"); | 43 | m_cfg = new Opie::Core::OConfig("phunkview"); |
44 | m_cfg->setGroup("Zecke_view" ); | 44 | m_cfg->setGroup("Zecke_view" ); |
45 | // qDebug( "Process-wide OApplication object @ %0x", oApp ); | 45 | // odebug << "Process-wide OApplication object @ " << oApp << oendl; |
46 | /* | 46 | /* |
47 | * Initialize ToolBar and IconView | 47 | * Initialize ToolBar and IconView |
48 | * And Connect Them | 48 | * And Connect Them |
49 | */ | 49 | */ |
50 | QToolBar *bar = new QToolBar( this ); | 50 | QToolBar *bar = new QToolBar( this ); |
51 | bar->setHorizontalStretchable( true ); | 51 | bar->setHorizontalStretchable( true ); |
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 95a0f45..1c08b41 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -217,13 +217,13 @@ static QString timeAsString( long length ) { | |||
217 | return QString("%1:%2%3").arg( minutes ).arg( seconds / 10 ).arg( seconds % 10 ); | 217 | return QString("%1:%2%3").arg( minutes ).arg( seconds / 10 ).arg( seconds % 10 ); |
218 | } | 218 | } |
219 | 219 | ||
220 | void AudioWidget::updateSlider( long i, long max ) { | 220 | void AudioWidget::updateSlider( long i, long max ) { |
221 | 221 | ||
222 | time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); | 222 | time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); |
223 | // qDebug( timeAsString( i ) + " / " + timeAsString( max ) ) ; | 223 | // odebug << timeAsString( i ) << " / " << timeAsString( max ) << oendl; |
224 | 224 | ||
225 | if ( max == 0 ) { | 225 | if ( max == 0 ) { |
226 | return; | 226 | return; |
227 | } | 227 | } |
228 | // Will flicker too much if we don't do this | 228 | // Will flicker too much if we don't do this |
229 | // Scale to something reasonable | 229 | // Scale to something reasonable |
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp index 6eb6524..3b8cb0d 100644 --- a/noncore/multimedia/opierec/qtrec.cpp +++ b/noncore/multimedia/opierec/qtrec.cpp | |||
@@ -118,16 +118,15 @@ Device *soundDevice; | |||
118 | void quickRec() | 118 | void quickRec() |
119 | #else | 119 | #else |
120 | void QtRec::quickRec() | 120 | void QtRec::quickRec() |
121 | #endif | 121 | #endif |
122 | { | 122 | { |
123 | 123 | ||
124 | qDebug("%d", | 124 | odebug << ( filePara.numberSamples/filePara.sampleRate * filePara.channels ) << oendl; |
125 | filePara.numberSamples/filePara.sampleRate * filePara.channels); | 125 | odebug << "samples " << filePara.numberSamples << ", rate " << filePara.sampleRate |
126 | qDebug("samples %d, rate %d, channels %d", | 126 | << ", channels " << filePara.channels << oendl; |
127 | filePara.numberSamples, filePara.sampleRate, filePara.channels); | ||
128 | 127 | ||
129 | int total = 0; // Total number of bytes read in so far. | 128 | int total = 0; // Total number of bytes read in so far. |
130 | int bytesWritten, number; | 129 | int bytesWritten, number; |
131 | 130 | ||
132 | bytesWritten = 0; | 131 | bytesWritten = 0; |
133 | number = 0; | 132 | number = 0; |
@@ -916,16 +915,15 @@ bool QtRec::rec() { //record | |||
916 | 915 | ||
917 | if( setupAudio( true)) | 916 | if( setupAudio( true)) |
918 | if(setUpFile()) { | 917 | if(setUpFile()) { |
919 | int fileSize = 0; | 918 | int fileSize = 0; |
920 | Config cfg("OpieRec"); | 919 | Config cfg("OpieRec"); |
921 | cfg.setGroup("Settings"); | 920 | cfg.setGroup("Settings"); |
922 | // qDebug( "<<<<<<<Device bits %d, device rate %d, device channels %d", | 921 | // odebug << "<<<<<<<Device bits " << soundDevice->getDeviceBits() |
923 | // soundDevice->getDeviceBits(), | 922 | // << ", device rate " << soundDevice->getDeviceRate() |
924 | // soundDevice->getDeviceRate(), | 923 | // << ", device channels " << soundDevice->getDeviceChannels() << oendl; |
925 | // soundDevice->getDeviceChannels()); | ||
926 | 924 | ||
927 | //filePara.sampleRate = cfg.readNumEntry("samplerate", 22050); | 925 | //filePara.sampleRate = cfg.readNumEntry("samplerate", 22050); |
928 | // odebug << "sample rate is " << filePara.sampleRate << "" << oendl; | 926 | // odebug << "sample rate is " << filePara.sampleRate << "" << oendl; |
929 | filePara.SecondsToRecord = getCurrentSizeLimit(); | 927 | filePara.SecondsToRecord = getCurrentSizeLimit(); |
930 | 928 | ||
931 | // odebug << "size limit " << filePara.SecondsToRecord << " sec" << oendl; | 929 | // odebug << "size limit " << filePara.SecondsToRecord << " sec" << oendl; |
@@ -941,14 +939,14 @@ bool QtRec::rec() { //record | |||
941 | // odebug << "WAVE_FORMAT_DVI_ADPCM" << oendl; | 939 | // odebug << "WAVE_FORMAT_DVI_ADPCM" << oendl; |
942 | fileSize = ((filePara.SecondsToRecord) * filePara.channels | 940 | fileSize = ((filePara.SecondsToRecord) * filePara.channels |
943 | * filePara.sampleRate * ( filePara.resolution / 8) ) / 4 + 250; | 941 | * filePara.sampleRate * ( filePara.resolution / 8) ) / 4 + 250; |
944 | } | 942 | } |
945 | 943 | ||
946 | filePara.samplesToRecord = fileSize; | 944 | filePara.samplesToRecord = fileSize; |
947 | qDebug("filesize should be %d, bits %d, rate %d", | 945 | odebug << "filesize should be " << filePara.samplesToRecord |
948 | filePara.samplesToRecord, filePara.resolution, filePara.sampleRate); | 946 | << ", bits " << filePara.resolution << ", rate " << filePara.sampleRate; |
949 | if( paused) { | 947 | if( paused) { |
950 | paused = false; | 948 | paused = false; |
951 | } | 949 | } |
952 | // else { | 950 | // else { |
953 | odebug << "Setting timeslider " << filePara.samplesToRecord << "" << oendl; | 951 | odebug << "Setting timeslider " << filePara.samplesToRecord << "" << oendl; |
954 | // if(fileSize != 0) | 952 | // if(fileSize != 0) |
diff --git a/noncore/multimedia/opierec/wavFile.cpp b/noncore/multimedia/opierec/wavFile.cpp index 7e9b50f..fc0130c 100644 --- a/noncore/multimedia/opierec/wavFile.cpp +++ b/noncore/multimedia/opierec/wavFile.cpp | |||
@@ -149,14 +149,15 @@ bool WavFile::setWavHeader(int fd, wavhdr *hdr) { | |||
149 | (*hdr).nBlockAlign = wavChannels*( wavResolution/8); //block align | 149 | (*hdr).nBlockAlign = wavChannels*( wavResolution/8); //block align |
150 | (*hdr).bitsPerSample = wavResolution; //bits per sample 8, or 16 | 150 | (*hdr).bitsPerSample = wavResolution; //bits per sample 8, or 16 |
151 | 151 | ||
152 | strncpy((*hdr).dataID, "data", 4); | 152 | strncpy((*hdr).dataID, "data", 4); |
153 | 153 | ||
154 | write( fd,hdr, sizeof(*hdr)); | 154 | write( fd,hdr, sizeof(*hdr)); |
155 | qDebug("writing header: bitrate%d, samplerate %d, channels %d", | 155 | odebug << "writing header: bitrate " << wavResolution |
156 | wavResolution, wavSampleRate, wavChannels); | 156 | << ", samplerate " << wavSampleRate |
157 | << ", channels " << wavChannels << oendl; | ||
157 | return true; | 158 | return true; |
158 | } | 159 | } |
159 | 160 | ||
160 | bool WavFile::adjustHeaders(int fd, int total) { | 161 | bool WavFile::adjustHeaders(int fd, int total) { |
161 | lseek(fd, 4, SEEK_SET); | 162 | lseek(fd, 4, SEEK_SET); |
162 | int i = total + 36; | 163 | int i = total + 36; |
@@ -209,14 +210,13 @@ int WavFile::parseWavHeader(int fd) { | |||
209 | lseek(fd, 4, SEEK_CUR); | 210 | lseek(fd, 4, SEEK_CUR); |
210 | if (read(fd, &fmt, 2) < 2) { | 211 | if (read(fd, &fmt, 2) < 2) { |
211 | odebug << "Could not read format chunk.\n" << oendl; | 212 | odebug << "Could not read format chunk.\n" << oendl; |
212 | return -1; | 213 | return -1; |
213 | } | 214 | } |
214 | if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) { | 215 | if (fmt != WAVE_FORMAT_PCM && fmt != WAVE_FORMAT_DVI_ADPCM) { |
215 | qDebug("Wave file contains unknown format." | 216 | odebug << "Wave file contains unknown format. Unable to continue.\n" << oendl; |
216 | " Unable to continue.\n"); | ||
217 | return -1; | 217 | return -1; |
218 | } | 218 | } |
219 | wavFormat = fmt; | 219 | wavFormat = fmt; |
220 | // compressionFormat=fmt; | 220 | // compressionFormat=fmt; |
221 | odebug << "compressionFormat is " << fmt << "" << oendl; | 221 | odebug << "compressionFormat is " << fmt << "" << oendl; |
222 | if (read(fd, &ch, 2) < 2) { | 222 | if (read(fd, &ch, 2) < 2) { |
@@ -263,14 +263,16 @@ int WavFile::parseWavHeader(int fd) { | |||
263 | } else { | 263 | } else { |
264 | if (read(fd, &longdata, 4) < 4) { | 264 | if (read(fd, &longdata, 4) < 4) { |
265 | odebug << "Could not read from sound file.\n" << oendl; | 265 | odebug << "Could not read from sound file.\n" << oendl; |
266 | return -1; | 266 | return -1; |
267 | } else { | 267 | } else { |
268 | wavNumberSamples = longdata; | 268 | wavNumberSamples = longdata; |
269 | qDebug("file has length of %d \nlasting %d seconds", (int)longdata, | 269 | odebug << "file hase length of " << (int)longdata << "\n" |
270 | (int)(( longdata / wavSampleRate) / wavChannels) / ( wavChannels*( wavResolution/8)) ); | 270 | << "lasting " |
271 | << (int)(( longdata / wavSampleRate) / wavChannels) / ( wavChannels*( wavResolution/8)) | ||
272 | << " seconds" << oendl; | ||
271 | // wavSeconds = (( longdata / wavSampleRate) / wavChannels) / ( wavChannels*( wavResolution/8)); | 273 | // wavSeconds = (( longdata / wavSampleRate) / wavChannels) / ( wavChannels*( wavResolution/8)); |
272 | 274 | ||
273 | return longdata; | 275 | return longdata; |
274 | } | 276 | } |
275 | } | 277 | } |
276 | } | 278 | } |