author | llornkcor <llornkcor> | 2004-08-06 18:53:51 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-08-06 18:53:51 (UTC) |
commit | 75675815cb051e14bf8ad50c4069338bfa83eed1 (patch) (side-by-side diff) | |
tree | d09364d5fac22ce9c521ffc010030b8492ff7cdf | |
parent | cf4207c5c299812e46f40aaee307100f58317a97 (diff) | |
download | opie-75675815cb051e14bf8ad50c4069338bfa83eed1.zip opie-75675815cb051e14bf8ad50c4069338bfa83eed1.tar.gz opie-75675815cb051e14bf8ad50c4069338bfa83eed1.tar.bz2 |
use openzaurus dsp
-rw-r--r-- | noncore/multimedia/opierec/qtrec.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp index e3385cd..1141faa 100644 --- a/noncore/multimedia/opierec/qtrec.cpp +++ b/noncore/multimedia/opierec/qtrec.cpp @@ -38,67 +38,73 @@ using namespace Opie::Core; /* STD */ #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> #include <pthread.h> #ifdef PDAUDIO //ALSA #include <alsa/asoundlib.h> static int deviceSampleRates[8] = { 32000, 44100, 48000, 88200, 96000, 176400, 192000, -1 }; static int deviceBitRates[] = { 8, 16, 24, 32, -1 }; #else //OSS static int deviceSampleRates[6] = { 11025, 16000, 22050, 32000, 44100, -1 }; static int deviceBitRates[] = { 8, 16, -1 }; #endif #if defined(QT_QWS_SL5XXX) ///#if defined(QT_QWS_EBX) #define DSPSTROUT "/dev/dsp" -#define DSPSTRIN "/dev/dsp1" #define DSPSTRMIXEROUT "/dev/mixer" + +#ifdef SHARP +#define DSPSTRIN "/dev/dsp1" #define DSPSTRMIXERIN "/dev/mixer1" +#else +#define DSPSTRIN "/dev/dsp" +#define DSPSTRMIXERIN "/dev/mixer" +#endif #else #define DSPSTROUT "/dev/dsp" #define DSPSTRIN "/dev/dsp" #define DSPSTRMIXERIN "/dev/mixer" #define DSPSTRMIXEROUT "/dev/mixer" #endif //#define ZAURUS 0 struct adpcm_state encoder_state; struct adpcm_state decoder_state; 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; |