author | llornkcor <llornkcor> | 2003-05-26 03:13:01 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-05-26 03:13:01 (UTC) |
commit | 830bab619ea396c018ccd29b20ce81cb47e113e1 (patch) (side-by-side diff) | |
tree | 41acd0f61f309992e5cd8faa4995cafff099fea1 | |
parent | eaa924af86511fd43fc9eac5438e73972f82158b (diff) | |
download | opie-830bab619ea396c018ccd29b20ce81cb47e113e1.zip opie-830bab619ea396c018ccd29b20ce81cb47e113e1.tar.gz opie-830bab619ea396c018ccd29b20ce81cb47e113e1.tar.bz2 |
remove extra includes
-rw-r--r-- | noncore/multimedia/opierec/device.cpp | 6 | ||||
-rw-r--r-- | noncore/multimedia/opierec/helpwindow.cpp | 23 | ||||
-rw-r--r-- | noncore/multimedia/opierec/opierec.control | 2 | ||||
-rw-r--r-- | noncore/multimedia/opierec/qtrec.cpp | 16 | ||||
-rw-r--r-- | noncore/multimedia/opierec/wavFile.cpp | 2 |
5 files changed, 1 insertions, 48 deletions
diff --git a/noncore/multimedia/opierec/device.cpp b/noncore/multimedia/opierec/device.cpp index c2029b7..f9a80c5 100644 --- a/noncore/multimedia/opierec/device.cpp +++ b/noncore/multimedia/opierec/device.cpp @@ -1,62 +1,56 @@ // device.cpp #include "device.h" -#include "qtrec.h" -#include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> -#include <qslider.h> -#include <qmessagebox.h> -#include <qfile.h> -#include <qtextstream.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <sys/soundcard.h> #include <unistd.h> #include<sys/wait.h> // #include <sys/stat.h> // #include <sys/time.h> // #include <sys/types.h> #include <unistd.h> #include <errno.h> //extern QtRec *qperec; Device::Device( QObject * parent, const char * dsp, const char * mixr, bool record ) : QObject( parent) { dspstr = (char *)dsp; mixstr = (char *)mixr; devForm=-1; devCh=-1; devRate=-1; if( !record){ //playing qDebug("setting up DSP for playing"); flags = O_WRONLY; } else { //recording qDebug("setting up DSP for recording"); flags = O_RDWR; // flags = O_RDONLY; selectMicInput(); } } bool Device::openDsp() { if( openDevice( flags) == -1) { perror("<<<<<<<<<<<<<<ioctl(\"Open device\")"); return false; } return true; } int Device::getOutVolume( ) { unsigned int volume; int mixerHandle = open( mixstr, O_RDWR ); if ( mixerHandle >= 0 ) { diff --git a/noncore/multimedia/opierec/helpwindow.cpp b/noncore/multimedia/opierec/helpwindow.cpp index 0c4ac78..1ab6510 100644 --- a/noncore/multimedia/opierec/helpwindow.cpp +++ b/noncore/multimedia/opierec/helpwindow.cpp @@ -1,89 +1,66 @@ /**************************************************************************** ** $Id$ ** ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. ** ** This file is part of an example program for Qt. This example ** program may be used, distributed and modified without limitation. ** *****************************************************************************/ #include "helpwindow.h" -#include <qstatusbar.h> -#include <qstringlist.h> #include <qlayout.h> -#include <qpe/qpemenubar.h> #include <qpe/qpetoolbar.h> #include <qpe/resource.h> #include <qaction.h> -#include <qpixmap.h> -#include <qpopupmenu.h> #include <qmenubar.h> -#include <qtoolbutton.h> -#include <qiconset.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qstylesheet.h> -#include <qmessagebox.h> -#include <qfiledialog.h> -#include <qapplication.h> -#include <qcombobox.h> -#include <qevent.h> -#include <qlineedit.h> -#include <qobjectlist.h> -#include <qfileinfo.h> -#include <qfile.h> -#include <qdatastream.h> -#include <qprinter.h> -#include <qsimplerichtext.h> -#include <qpaintdevicemetrics.h> #include <ctype.h> HelpWindow::HelpWindow( const QString& home_, const QString& _path, QWidget* parent, const char *name ) : QMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL() { QGridLayout *layout = new QGridLayout( this ); layout->setSpacing( 2); layout->setMargin( 2); qDebug(_path); browser = new QTextBrowser( this ); QStringList Strlist; Strlist.append( home_); browser->mimeSourceFactory()->setFilePath( Strlist ); browser->setFrameStyle( QFrame::Panel | QFrame::Sunken ); connect( browser, SIGNAL( textChanged() ), this, SLOT( textChanged() ) ); if ( !home_.isEmpty() ) browser->setSource( home_ ); QPEToolBar *toolbar = new QPEToolBar( this ); QAction *a = new QAction( tr( "Backward" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), browser, SLOT( backward() ) ); a->addTo( toolbar ); a = new QAction( tr( "Forward" ), Resource::loadPixmap( "forward" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), browser, SLOT( forward() ) ); a->addTo( toolbar ); layout->addMultiCellWidget( toolbar, 0, 0, 0, 0); layout->addMultiCellWidget( browser, 1, 2, 0, 2); browser->setFocus(); } void HelpWindow::setBackwardAvailable( bool b) { menuBar()->setItemEnabled( backwardId, b); } void HelpWindow::setForwardAvailable( bool b) { menuBar()->setItemEnabled( forwardId, b); } diff --git a/noncore/multimedia/opierec/opierec.control b/noncore/multimedia/opierec/opierec.control index e8396ae..455691f 100644 --- a/noncore/multimedia/opierec/opierec.control +++ b/noncore/multimedia/opierec/opierec.control @@ -1,10 +1,10 @@ -Package: opierec +Package: opie-rec Files: bin/opierec pics/opierec apps/Applications/opierec.desktop Priority: optional Section: multimedia/applications Maintainer: L.J. Potter <ljp@llornkcor.com> Architecture: arm Version: 1.5-2 Depends: opie ($QPE_VERSION) Description: audio sampling recorder A simple audio recording/playing application. diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp index 28f6546..0307d99 100644 --- a/noncore/multimedia/opierec/qtrec.cpp +++ b/noncore/multimedia/opierec/qtrec.cpp @@ -1,107 +1,91 @@ /**************************************************************************** // qtrec.cpp Created: Thu Jan 17 11:19:58 2002 copyright 2002 by L.J. Potter <ljp@llornkcor.com> ****************************************************************************/ #define DEV_VERSION #include "pixmaps.h" #include "qtrec.h" -#include "helpwindow.h" -#include "device.h" -#include "wavFile.h" #include <pthread.h> extern "C" { #include "adpcm.h" } #include <sys/soundcard.h> // #if defined (QTOPIA_INTERNAL_FSLP) // #include <qpe/lnkproperties.h> // #endif -#include <qpe/applnk.h> #include <qpe/config.h> -#include <qpe/ir.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/storage.h> -#include <qlineedit.h> -#include <qbuttongroup.h> #include <qcheckbox.h> #include <qcombobox.h> -#include <qcursor.h> //#include <qdatetime.h> #include <qdir.h> -#include <qfile.h> -#include <qtextstream.h> #include <qgroupbox.h> -#include <qiconview.h> -#include <qimage.h> #include <qlabel.h> #include <qlayout.h> -#include <qlineedit.h> #include <qlistview.h> #include <qmessagebox.h> -#include <qpixmap.h> #include <qpopupmenu.h> #include <qpushbutton.h> -#include <qregexp.h> #include <qslider.h> #include <qtabwidget.h> #include <qtimer.h> -#include <qvariant.h> #include <errno.h> #include <fcntl.h> #include <math.h> #include <mntent.h> #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <sys/soundcard.h> #include <sys/stat.h> #include <sys/time.h> #include <sys/types.h> #include <sys/vfs.h> #include <unistd.h> #include<sys/wait.h> #include <sys/signal.h> //#define ZAURUS 0 struct adpcm_state encoder_state; struct adpcm_state decoder_state; long findPeak(long input ); //char deviceRates[]; typedef struct { int sampleRate; /* int fragSize; */ /* int blockSize; */ int resolution; //bitrate int channels; //number of channels int fd; //file descriptor int sd; //sound device descriptor int numberSamples; //total number of samples int SecondsToRecord; // number of seconds that should be recorded float numberOfRecordedSeconds; //total number of samples recorded int samplesToRecord; //number of samples to be recorded int inVol; //input volume int outVol; //output volume int format; //wavfile format PCM.. ADPCM const char *fileName; //name of fiel to be played/recorded } fileParameters; fileParameters filePara; bool monitoring, recording; bool stopped; QLabel *timeLabel; QSlider *timeSlider; diff --git a/noncore/multimedia/opierec/wavFile.cpp b/noncore/multimedia/opierec/wavFile.cpp index 0bb5736..7bfffb6 100644 --- a/noncore/multimedia/opierec/wavFile.cpp +++ b/noncore/multimedia/opierec/wavFile.cpp @@ -1,54 +1,52 @@ //wavFile.cpp #include "wavFile.h" #include "qtrec.h" -#include <qdatetime.h> -#include <qstring.h> #include <qmessagebox.h> #include <qdir.h> #include <qpe/timestring.h> #include <qpe/config.h> #include <errno.h> #include <sys/time.h> #include <sys/types.h> #include <sys/vfs.h> #include <fcntl.h> #include <math.h> #include <mntent.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> WavFile::WavFile( QObject * parent,const QString &fileName, bool makeNwFile, int sampleRate, int channels, int resolution, int format ) : QObject( parent) { qDebug("new wave file"); bool b = makeNwFile; wavSampleRate=sampleRate; wavFormat=format; wavChannels=channels; wavResolution=resolution; useTmpFile=false; if( b) { newFile(); } else { openFile(fileName); } } bool WavFile::newFile() { qDebug("Set up new file"); Config cfg("OpieRec"); cfg.setGroup("Settings"); currentFileName=cfg.readEntry("directory",QDir::homeDirPath()); QString date; date = TimeString::dateString( QDateTime::currentDateTime(),false,true); date.replace(QRegExp("'"),""); date.replace(QRegExp(" "),"_"); |