-rw-r--r-- | noncore/multimedia/opierec/qtrec.cpp | 137 | ||||
-rw-r--r-- | noncore/multimedia/opierec/qtrec.h | 2 |
2 files changed, 72 insertions, 67 deletions
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp index 3b8cb0d..fb2d819 100644 --- a/noncore/multimedia/opierec/qtrec.cpp +++ b/noncore/multimedia/opierec/qtrec.cpp | |||
@@ -74,6 +74,6 @@ static int deviceBitRates[] = { 8, 16, -1 }; | |||
74 | #else | 74 | #else |
75 | 75 | ||
76 | #define DSPSTROUT "/dev/dsp" | 76 | #define DSPSTROUT "/dev/dsp1" |
77 | #define DSPSTRIN "/dev/dsp" | 77 | #define DSPSTRIN "/dev/dsp1" |
78 | #define DSPSTRMIXERIN "/dev/mixer" | 78 | #define DSPSTRMIXERIN "/dev/mixer" |
79 | #define DSPSTRMIXEROUT "/dev/mixer" | 79 | #define DSPSTRMIXEROUT "/dev/mixer" |
@@ -134,16 +134,16 @@ void quickRec() | |||
134 | int level = 0; | 134 | int level = 0; |
135 | int threshold = 0; | 135 | int threshold = 0; |
136 | // int bits = filePara.resolution; | 136 | int bits = filePara.resolution; |
137 | // odebug << "bits " << bits << "" << oendl; | 137 | odebug << "bits " << bits << "" << oendl; |
138 | 138 | ||
139 | if( filePara.resolution == 16 ) { //AFMT_S16_LE) | 139 | if( filePara.resolution == 16 ) { //AFMT_S16_LE) |
140 | // odebug << "AFMT_S16_LE size " << filePara.SecondsToRecord << "" << oendl; | 140 | odebug << "AFMT_S16_LE size " << filePara.SecondsToRecord << "" << oendl; |
141 | // odebug << "samples to record " << filePara.samplesToRecord << "" << oendl; | 141 | odebug << "samples to record " << filePara.samplesToRecord << "" << oendl; |
142 | // odebug << "" << filePara.sd << "" << oendl; | 142 | odebug << "" << filePara.sd << "" << oendl; |
143 | level = 7; | 143 | level = 7; |
144 | threshold = 0; | 144 | threshold = 0; |
145 | 145 | ||
146 | if( filePara.format == WAVE_FORMAT_DVI_ADPCM) { | 146 | if( filePara.format == WAVE_FORMAT_DVI_ADPCM) { |
147 | // odebug << "start recording WAVE_FORMAT_DVI_ADPCM" << oendl; | 147 | odebug << "start recording WAVE_FORMAT_DVI_ADPCM" << oendl; |
148 | // <<<<<<<<<<<<<<<<<<<<<<<<<<< WAVE_FORMAT_DVI_ADPCM >>>>>>>>>>>>>>>>>>>>>> | 148 | // <<<<<<<<<<<<<<<<<<<<<<<<<<< WAVE_FORMAT_DVI_ADPCM >>>>>>>>>>>>>>>>>>>>>> |
149 | char abuf[ BUFSIZE/2 ]; | 149 | char abuf[ BUFSIZE/2 ]; |
@@ -156,5 +156,5 @@ void quickRec() | |||
156 | for(;;) { | 156 | for(;;) { |
157 | if ( stopped) { | 157 | if ( stopped) { |
158 | // odebug << "quickRec:: stopped" << oendl; | 158 | odebug << "quickRec:: stopped" << oendl; |
159 | break; | 159 | break; |
160 | } | 160 | } |
@@ -181,6 +181,8 @@ void quickRec() | |||
181 | timeSlider->setValue( total); | 181 | timeSlider->setValue( total); |
182 | 182 | ||
183 | filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate * (float)2 | 183 | printf("%d, bytes %d,total %d\r",number, bytesWritten, total); |
184 | / filePara.channels; | 184 | fflush(stdout); |
185 | |||
186 | filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate * (float)2/ filePara.channels; | ||
185 | 187 | ||
186 | qApp->processEvents(); | 188 | qApp->processEvents(); |
@@ -205,5 +207,5 @@ void quickRec() | |||
205 | } | 207 | } |
206 | 208 | ||
207 | number = soundDevice->devRead( filePara.sd, (short *)inbuffer, BUFSIZE); | 209 | number = soundDevice->devRead( soundDevice->sd /*filePara.sd*/, (short *)inbuffer, BUFSIZE); |
208 | 210 | ||
209 | if( number <= 0) { | 211 | if( number <= 0) { |
@@ -229,6 +231,6 @@ void quickRec() | |||
229 | if( filePara.SecondsToRecord != 0) | 231 | if( filePara.SecondsToRecord != 0) |
230 | timeSlider->setValue( total); | 232 | timeSlider->setValue( total); |
231 | // printf("Writing number %d, bytes %d,total %d\r",number, bytesWritten , total); | 233 | printf("%d, bytes %d,total %d\r",number, bytesWritten , total); |
232 | // fflush(stdout); | 234 | fflush(stdout); |
233 | 235 | ||
234 | filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate | 236 | filePara.numberOfRecordedSeconds = (float)total / (float)filePara.sampleRate |
@@ -255,5 +257,5 @@ void quickRec() | |||
255 | } | 257 | } |
256 | 258 | ||
257 | number = ::read( filePara.sd, unsigned_inbuffer, BUFSIZE); | 259 | number = ::read( soundDevice->sd /*filePara.sd*/ , unsigned_inbuffer, BUFSIZE); |
258 | bytesWritten = ::write( filePara.fd , unsigned_inbuffer, number); | 260 | bytesWritten = ::write( filePara.fd , unsigned_inbuffer, number); |
259 | waveform->newSamples( (const short *) unsigned_inbuffer, number ); | 261 | waveform->newSamples( (const short *) unsigned_inbuffer, number ); |
@@ -268,5 +270,5 @@ void quickRec() | |||
268 | total += bytesWritten; | 270 | total += bytesWritten; |
269 | filePara.numberSamples = total; | 271 | filePara.numberSamples = total; |
270 | // printf("\nWriting number %d, bytes %d,total %d \r",number, bytesWritten , total); | 272 | // printf("%d, bytes %d,total %d \r",number, bytesWritten , total); |
271 | // fflush(stdout); | 273 | // fflush(stdout); |
272 | if( filePara.SecondsToRecord !=0) | 274 | if( filePara.SecondsToRecord !=0) |
@@ -498,5 +500,5 @@ void QtRec::init() { | |||
498 | 500 | ||
499 | TabWidget = new QTabWidget( this, "TabWidget" ); | 501 | TabWidget = new QTabWidget( this, "TabWidget" ); |
500 | layout->addMultiCellWidget(TabWidget, 0, 7, 0, 7); | 502 | layout->addMultiCellWidget(TabWidget, 0, 7, 0, 8); |
501 | // TabWidget->setTabShape(QTabWidget::Triangular); | 503 | // TabWidget->setTabShape(QTabWidget::Triangular); |
502 | 504 | ||
@@ -511,11 +513,11 @@ void QtRec::init() { | |||
511 | layout1->addMultiCellWidget( timeSlider, 1, 1, 0, 3); | 513 | layout1->addMultiCellWidget( timeSlider, 1, 1, 0, 3); |
512 | 514 | ||
513 | timeLabel = new QLabel( tab, "TimeLabel" ); | 515 | // timeLabel = new QLabel( tab, "TimeLabel" ); |
514 | layout1->addMultiCellWidget( timeLabel, 0, 0, 0, 3); | 516 | // layout1->addMultiCellWidget( timeLabel, 0, 0, 0, 3); |
515 | 517 | ||
516 | playLabel2 = new QLabel(tab, "PlayLabel2" ); | 518 | // playLabel2 = new QLabel(tab, "PlayLabel2" ); |
517 | playLabel2->setText(tr("Play") ); | 519 | // playLabel2->setText(tr("Play") ); |
518 | playLabel2->setFixedHeight( 18); | 520 | // playLabel2->setFixedHeight( 18); |
519 | layout1->addMultiCellWidget( playLabel2, 0, 0, 4, 4); | 521 | // layout1->addMultiCellWidget( playLabel2, 0, 0, 4, 4); |
520 | 522 | ||
521 | Stop_PushButton = new QPushButton( tab, "Stop_PushButton" ); | 523 | Stop_PushButton = new QPushButton( tab, "Stop_PushButton" ); |
@@ -534,9 +536,9 @@ void QtRec::init() { | |||
534 | toEndButton->setPixmap( Resource::loadPixmap( "fastforward" ) ); | 536 | toEndButton->setPixmap( Resource::loadPixmap( "fastforward" ) ); |
535 | 537 | ||
536 | QLabel *recLabel2; | 538 | // QLabel *recLabel2; |
537 | recLabel2 = new QLabel( tab, "recLabel2" ); | 539 | // recLabel2 = new QLabel( tab, "recLabel2" ); |
538 | recLabel2->setText(tr("Rec")); | 540 | // recLabel2->setText(tr("Rec")); |
539 | recLabel2->setFixedHeight( 18); | 541 | // recLabel2->setFixedHeight( 18); |
540 | layout1->addMultiCellWidget( recLabel2, 0, 0, 7, 7); | 542 | // layout1->addMultiCellWidget( recLabel2, 0, 0, 7, 7); |
541 | 543 | ||
542 | Rec_PushButton = new QPushButton( tab, "Rec_PushButton" ); | 544 | Rec_PushButton = new QPushButton( tab, "Rec_PushButton" ); |
@@ -558,5 +560,5 @@ void QtRec::init() { | |||
558 | deleteSoundButton = new QPushButton( tab, "deleteSoundButton" ); | 560 | deleteSoundButton = new QPushButton( tab, "deleteSoundButton" ); |
559 | layout1->addMultiCellWidget( deleteSoundButton, 1, 1, 8, 8); | 561 | layout1->addMultiCellWidget( deleteSoundButton, 1, 1, 8, 8); |
560 | deleteSoundButton->setText( tr( "Delete" ) ); | 562 | deleteSoundButton->setText( tr( "Del" ) ); |
561 | 563 | ||
562 | ListView1 = new QListView( tab, "IconView1" ); | 564 | ListView1 = new QListView( tab, "IconView1" ); |
@@ -564,17 +566,19 @@ void QtRec::init() { | |||
564 | 566 | ||
565 | ListView1->addColumn( tr( "Name" ) ); | 567 | ListView1->addColumn( tr( "Name" ) ); |
566 | ListView1->setColumnWidth( 0, 140); | 568 | // ListView1->setColumnWidth( 0, 140); |
567 | ListView1->setSorting( 1, false); | 569 | ListView1->setSorting( 1, false); |
568 | ListView1->addColumn( tr( "Time" ) ); //in seconds | 570 | ListView1->addColumn( tr( "Time" ) ); //in seconds |
569 | ListView1->setColumnWidth( 1, 50); | 571 | // ListView1->setColumnWidth( 1, -1); |
570 | ListView1->addColumn( tr("Location") ); | 572 | // ListView1->addColumn( tr("Location") ); |
571 | ListView1->setColumnWidth( 2, 50); | 573 | // ListView1->setColumnWidth( 2, -1); |
572 | ListView1->addColumn( tr("Date") ); | 574 | // ListView1->addColumn( tr("Date") ); |
573 | ListView1->setColumnWidth( 3, 63); | 575 | // ListView1->setColumnWidth( 3, -1); |
574 | 576 | ListView1->setColumnWidthMode(0, QListView::Maximum); | |
575 | ListView1->setColumnWidthMode( 0, QListView::Manual); | 577 | // ListView1->setColumnWidthMode(1, QListView::Maximum); |
578 | |||
579 | // ListView1->setColumnWidthMode( 0, QListView::Manual); | ||
576 | ListView1->setColumnAlignment( 1, QListView::AlignCenter); | 580 | ListView1->setColumnAlignment( 1, QListView::AlignCenter); |
577 | ListView1->setColumnAlignment( 2, QListView::AlignRight); | 581 | // ListView1->setColumnAlignment( 2, QListView::AlignRight); |
578 | ListView1->setColumnAlignment( 3, QListView::AlignLeft); | 582 | // ListView1->setColumnAlignment( 3, QListView::AlignLeft); |
579 | ListView1->setAllColumnsShowFocus( true ); | 583 | ListView1->setAllColumnsShowFocus( true ); |
580 | QPEApplication::setStylusOperation( ListView1->viewport(), QPEApplication::RightOnHold); | 584 | QPEApplication::setStylusOperation( ListView1->viewport(), QPEApplication::RightOnHold); |
@@ -647,5 +651,5 @@ void QtRec::init() { | |||
647 | 651 | ||
648 | autoMuteCheckBox = new QCheckBox ( tr("Auto Mute"), tab_3 ); | 652 | autoMuteCheckBox = new QCheckBox ( tr("Auto Mute"), tab_3 ); |
649 | stereoCheckBox = new QCheckBox ( tr("Stereo Channels"), tab_3 ); | 653 | stereoCheckBox = new QCheckBox ( tr("Stereo"), tab_3 ); |
650 | 654 | ||
651 | glayout3->addMultiCellWidget( compressionCheckBox, 2, 2, 0, 3); | 655 | glayout3->addMultiCellWidget( compressionCheckBox, 2, 2, 0, 3); |
@@ -708,5 +712,5 @@ void QtRec::init() { | |||
708 | waveform->setMinimumSize( QSize( 0, 50 ) ); | 712 | waveform->setMinimumSize( QSize( 0, 50 ) ); |
709 | 713 | ||
710 | layout->addMultiCellWidget( waveform, 8, 8, 0, 7 ); | 714 | layout->addMultiCellWidget( waveform, 8, 8, 0, 8); |
711 | waveform->setBackgroundColor ( black ); | 715 | waveform->setBackgroundColor ( black ); |
712 | } | 716 | } |
@@ -738,5 +742,5 @@ void QtRec::initIconView() { | |||
738 | mediaLocation = getStorage( filePath); | 742 | mediaLocation = getStorage( filePath); |
739 | if( info.exists()) { | 743 | if( info.exists()) { |
740 | item = new QListViewItem( ListView1, temp, fileS, mediaLocation, fileDate); | 744 | item = new QListViewItem( ListView1, temp, fileS /*, mediaLocation, fileDate*/); |
741 | item->setPixmap( 0, image0); | 745 | item->setPixmap( 0, image0); |
742 | if( currentFileName == filePath) | 746 | if( currentFileName == filePath) |
@@ -876,9 +880,9 @@ void QtRec::doPlayBtn() { | |||
876 | 880 | ||
877 | if(!stopped) { | 881 | if(!stopped) { |
878 | playLabel2->setText(tr("Play")); | 882 | // playLabel2->setText(tr("Play")); |
879 | stop(); | 883 | stop(); |
880 | } else { | 884 | } else { |
881 | if(ListView1->currentItem() == 0) return; | 885 | if(ListView1->currentItem() == 0) return; |
882 | playLabel2->setText(tr("Stop")); | 886 | // playLabel2->setText(tr("Stop")); |
883 | currentFile = ListView1->currentItem()->text(0); | 887 | currentFile = ListView1->currentItem()->text(0); |
884 | start(); | 888 | start(); |
@@ -904,5 +908,5 @@ bool QtRec::rec() { //record | |||
904 | QString timeString; | 908 | QString timeString; |
905 | timeString.sprintf("%.0f", 0.0); | 909 | timeString.sprintf("%.0f", 0.0); |
906 | timeLabel->setText( timeString+ " seconds"); | 910 | // timeLabel->setText( timeString+ " seconds"); |
907 | if(!stopped) { | 911 | if(!stopped) { |
908 | monitoring = true; | 912 | monitoring = true; |
@@ -910,5 +914,5 @@ bool QtRec::rec() { //record | |||
910 | } else { | 914 | } else { |
911 | secCount = 1; | 915 | secCount = 1; |
912 | playLabel2->setText(tr("Stop")); | 916 | // playLabel2->setText(tr("Stop")); |
913 | monitoring = false; | 917 | monitoring = false; |
914 | setRecordButton( true); | 918 | setRecordButton( true); |
@@ -968,8 +972,9 @@ bool QtRec::rec() { //record | |||
968 | #endif | 972 | #endif |
969 | filePara.fileName=currentFile.latin1(); | 973 | filePara.fileName=currentFile.latin1(); |
970 | odebug << "Start recording thread" << oendl; | 974 | odebug << "Start recording" << oendl; |
971 | stopped = false; | 975 | stopped = false; |
972 | 976 | ||
973 | #ifdef THREADED | 977 | #ifdef THREADED |
978 | odebug << "Start recording thread" << oendl; | ||
974 | pthread_t thread1; | 979 | pthread_t thread1; |
975 | pthread_create( &thread1, NULL, (void * (*)(void *))quickRec, NULL/* &*/); | 980 | pthread_create( &thread1, NULL, (void * (*)(void *))quickRec, NULL/* &*/); |
@@ -1189,5 +1194,5 @@ bool QtRec::doPlay() { | |||
1189 | 1194 | ||
1190 | timeString.sprintf("%f", filePara.numberOfRecordedSeconds); | 1195 | timeString.sprintf("%f", filePara.numberOfRecordedSeconds); |
1191 | timeLabel->setText( timeString+ tr(" seconds")); | 1196 | // timeLabel->setText( timeString+ tr(" seconds")); |
1192 | 1197 | ||
1193 | QString msg; | 1198 | QString msg; |
@@ -1477,5 +1482,5 @@ void QtRec::endRecording() { | |||
1477 | QString cmd; | 1482 | QString cmd; |
1478 | cmd.sprintf("mv "+ wavFile->trackName() + " " + wavFile->currentFileName); | 1483 | cmd.sprintf("mv "+ wavFile->trackName() + " " + wavFile->currentFileName); |
1479 | // odebug << "moving tmp file to "+currentFileName << oendl; | 1484 | odebug << "moving tmp file to "+currentFileName << oendl; |
1480 | system( cmd.latin1()); | 1485 | system( cmd.latin1()); |
1481 | } | 1486 | } |
@@ -1497,9 +1502,9 @@ void QtRec::endRecording() { | |||
1497 | time.sprintf("%.2f", filePara.numberOfRecordedSeconds); | 1502 | time.sprintf("%.2f", filePara.numberOfRecordedSeconds); |
1498 | cfg.writeEntry( wavFile->currentFileName, time ); | 1503 | cfg.writeEntry( wavFile->currentFileName, time ); |
1499 | // odebug << "writing config numberOfRecordedSeconds "+time << oendl; | 1504 | odebug << "writing config numberOfRecordedSeconds "+time << oendl; |
1500 | 1505 | ||
1501 | cfg.write(); | 1506 | cfg.write(); |
1502 | odebug << "finished recording" << oendl; | 1507 | odebug << "finished recording" << oendl; |
1503 | timeLabel->setText(""); | 1508 | // timeLabel->setText(""); |
1504 | } | 1509 | } |
1505 | 1510 | ||
@@ -1518,5 +1523,5 @@ void QtRec::endPlaying() { | |||
1518 | waveform->reset(); | 1523 | waveform->reset(); |
1519 | // errorStop(); | 1524 | // errorStop(); |
1520 | // odebug << "end playing" << oendl; | 1525 | odebug << "end playing" << oendl; |
1521 | setRecordButton( false); | 1526 | setRecordButton( false); |
1522 | 1527 | ||
@@ -1530,6 +1535,6 @@ void QtRec::endPlaying() { | |||
1530 | soundDevice->sd = -1; | 1535 | soundDevice->sd = -1; |
1531 | // if(soundDevice) delete soundDevice; | 1536 | // if(soundDevice) delete soundDevice; |
1532 | // odebug << "file and sound device closed" << oendl; | 1537 | odebug << "file and sound device closed" << oendl; |
1533 | timeLabel->setText(""); | 1538 | // timeLabel->setText(""); |
1534 | total = 0; | 1539 | total = 0; |
1535 | filePara.numberSamples = 0; | 1540 | filePara.numberSamples = 0; |
@@ -1539,5 +1544,5 @@ void QtRec::endPlaying() { | |||
1539 | // if(wavFile) delete wavFile; //this crashes | 1544 | // if(wavFile) delete wavFile; //this crashes |
1540 | 1545 | ||
1541 | // odebug << "track closed" << oendl; | 1546 | odebug << "track closed" << oendl; |
1542 | killTimers(); | 1547 | killTimers(); |
1543 | owarn << "reset slider" << oendl; | 1548 | owarn << "reset slider" << oendl; |
@@ -1865,5 +1870,5 @@ void QtRec::timerEvent( QTimerEvent * ) { | |||
1865 | 1870 | ||
1866 | timeString.sprintf("%d", secCount); | 1871 | timeString.sprintf("%d", secCount); |
1867 | timeLabel->setText( timeString + " seconds"); | 1872 | // timeLabel->setText( timeString + " seconds"); |
1868 | 1873 | ||
1869 | secCount++; | 1874 | secCount++; |
@@ -1872,5 +1877,5 @@ void QtRec::timerEvent( QTimerEvent * ) { | |||
1872 | void QtRec::changeTimeSlider(int index) { | 1877 | void QtRec::changeTimeSlider(int index) { |
1873 | if( ListView1->currentItem() == 0 || !wavFile->track.isOpen()) return; | 1878 | if( ListView1->currentItem() == 0 || !wavFile->track.isOpen()) return; |
1874 | // odebug << "Slider moved to " << index << "" << oendl; | 1879 | odebug << "Slider moved to " << index << "" << oendl; |
1875 | paused = true; | 1880 | paused = true; |
1876 | stopped = true; | 1881 | stopped = true; |
@@ -1882,10 +1887,10 @@ void QtRec::changeTimeSlider(int index) { | |||
1882 | timeString.sprintf( "%.2f", filePara.numberOfRecordedSeconds); | 1887 | timeString.sprintf( "%.2f", filePara.numberOfRecordedSeconds); |
1883 | secCount = (int)filePara.numberOfRecordedSeconds; | 1888 | secCount = (int)filePara.numberOfRecordedSeconds; |
1884 | timeLabel->setText( timeString + tr(" seconds")); | 1889 | // timeLabel->setText( timeString + tr(" seconds")); |
1885 | } | 1890 | } |
1886 | 1891 | ||
1887 | void QtRec::timeSliderPressed() { | 1892 | void QtRec::timeSliderPressed() { |
1888 | if( ListView1->currentItem() == 0) return; | 1893 | if( ListView1->currentItem() == 0) return; |
1889 | // odebug << "slider pressed" << oendl; | 1894 | odebug << "slider pressed" << oendl; |
1890 | paused = true; | 1895 | paused = true; |
1891 | stopped = true; | 1896 | stopped = true; |
@@ -1896,5 +1901,5 @@ void QtRec::timeSliderReleased() { | |||
1896 | sliderPos = timeSlider->value(); | 1901 | sliderPos = timeSlider->value(); |
1897 | 1902 | ||
1898 | // odebug << "slider released " << sliderPos << "" << oendl; | 1903 | odebug << "slider released " << sliderPos << "" << oendl; |
1899 | stopped = false; | 1904 | stopped = false; |
1900 | int newPos = lseek( filePara.fd, sliderPos, SEEK_SET); | 1905 | int newPos = lseek( filePara.fd, sliderPos, SEEK_SET); |
@@ -1926,9 +1931,9 @@ void QtRec::rewindTimerTimeout() { | |||
1926 | // if(toBeginningButton->isDown()) | 1931 | // if(toBeginningButton->isDown()) |
1927 | timeSlider->setValue( sliderValue ) ; | 1932 | timeSlider->setValue( sliderValue ) ; |
1928 | // odebug << "" << sliderValue << "" << oendl; | 1933 | odebug << "" << sliderValue << "" << oendl; |
1929 | QString timeString; | 1934 | QString timeString; |
1930 | filePara.numberOfRecordedSeconds = (float)sliderValue / (float)filePara.sampleRate * (float)2; | 1935 | filePara.numberOfRecordedSeconds = (float)sliderValue / (float)filePara.sampleRate * (float)2; |
1931 | timeString.sprintf( "%.2f", filePara.numberOfRecordedSeconds); | 1936 | timeString.sprintf( "%.2f", filePara.numberOfRecordedSeconds); |
1932 | timeLabel->setText( timeString+ tr(" seconds")); | 1937 | // timeLabel->setText( timeString+ tr(" seconds")); |
1933 | } | 1938 | } |
1934 | 1939 | ||
@@ -1940,5 +1945,5 @@ void QtRec::rewindReleased() { | |||
1940 | int newPos = lseek( filePara.fd, sliderPos, SEEK_SET); | 1945 | int newPos = lseek( filePara.fd, sliderPos, SEEK_SET); |
1941 | total = newPos * 4; | 1946 | total = newPos * 4; |
1942 | // odebug << "rewind released " << total << "" << oendl; | 1947 | odebug << "rewind released " << total << "" << oendl; |
1943 | startTimer( 1000); | 1948 | startTimer( 1000); |
1944 | doPlay(); | 1949 | doPlay(); |
@@ -1972,5 +1977,5 @@ void QtRec::forwardTimerTimeout() { | |||
1972 | filePara.numberOfRecordedSeconds = (float)sliderValue / (float)filePara.sampleRate * (float)2; | 1977 | filePara.numberOfRecordedSeconds = (float)sliderValue / (float)filePara.sampleRate * (float)2; |
1973 | timeString.sprintf( "%.2f", filePara.numberOfRecordedSeconds); | 1978 | timeString.sprintf( "%.2f", filePara.numberOfRecordedSeconds); |
1974 | timeLabel->setText( timeString+ tr(" seconds")); | 1979 | // timeLabel->setText( timeString+ tr(" seconds")); |
1975 | } | 1980 | } |
1976 | 1981 | ||
@@ -2028,5 +2033,5 @@ void QtRec::setRecordButton(bool b) { | |||
2028 | if(Stop_PushButton->isDown()) | 2033 | if(Stop_PushButton->isDown()) |
2029 | Stop_PushButton->setDown( true); | 2034 | Stop_PushButton->setDown( true); |
2030 | playLabel2->setText( tr("Stop") ); | 2035 | // playLabel2->setText( tr("Stop") ); |
2031 | 2036 | ||
2032 | } else { //about to stop | 2037 | } else { //about to stop |
@@ -2036,5 +2041,5 @@ void QtRec::setRecordButton(bool b) { | |||
2036 | if(Stop_PushButton->isDown()) | 2041 | if(Stop_PushButton->isDown()) |
2037 | Stop_PushButton->setDown( false); | 2042 | Stop_PushButton->setDown( false); |
2038 | playLabel2->setText( tr("Play") ); | 2043 | // playLabel2->setText( tr("Play") ); |
2039 | if(Rec_PushButton->isDown()) | 2044 | if(Rec_PushButton->isDown()) |
2040 | Rec_PushButton->setDown( false); | 2045 | Rec_PushButton->setDown( false); |
diff --git a/noncore/multimedia/opierec/qtrec.h b/noncore/multimedia/opierec/qtrec.h index 5878d37..3808d99 100644 --- a/noncore/multimedia/opierec/qtrec.h +++ b/noncore/multimedia/opierec/qtrec.h | |||
@@ -5,5 +5,5 @@ copyright 2002 by L.J. Potter ljp@llornkcor.com | |||
5 | #ifndef QTREC_H | 5 | #ifndef QTREC_H |
6 | #define QTREC_H | 6 | #define QTREC_H |
7 | #define VERSION 20040101 | 7 | #define VERSION 20040628 |
8 | 8 | ||
9 | #include <qpe/ir.h> | 9 | #include <qpe/ir.h> |