-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 | |||
@@ -46,51 +46,57 @@ using namespace Opie::Core; | |||
46 | #include <sys/ioctl.h> | 46 | #include <sys/ioctl.h> |
47 | #include <sys/soundcard.h> | 47 | #include <sys/soundcard.h> |
48 | #include <sys/stat.h> | 48 | #include <sys/stat.h> |
49 | #include <sys/time.h> | 49 | #include <sys/time.h> |
50 | #include <sys/types.h> | 50 | #include <sys/types.h> |
51 | #include <sys/vfs.h> | 51 | #include <sys/vfs.h> |
52 | #include <unistd.h> | 52 | #include <unistd.h> |
53 | #include <sys/wait.h> | 53 | #include <sys/wait.h> |
54 | #include <sys/signal.h> | 54 | #include <sys/signal.h> |
55 | #include <pthread.h> | 55 | #include <pthread.h> |
56 | 56 | ||
57 | #ifdef PDAUDIO //ALSA | 57 | #ifdef PDAUDIO //ALSA |
58 | #include <alsa/asoundlib.h> | 58 | #include <alsa/asoundlib.h> |
59 | static int deviceSampleRates[8] = { 32000, 44100, 48000, 88200, 96000, 176400, 192000, -1 }; | 59 | static int deviceSampleRates[8] = { 32000, 44100, 48000, 88200, 96000, 176400, 192000, -1 }; |
60 | static int deviceBitRates[] = { 8, 16, 24, 32, -1 }; | 60 | static int deviceBitRates[] = { 8, 16, 24, 32, -1 }; |
61 | #else //OSS | 61 | #else //OSS |
62 | static int deviceSampleRates[6] = { 11025, 16000, 22050, 32000, 44100, -1 }; | 62 | static int deviceSampleRates[6] = { 11025, 16000, 22050, 32000, 44100, -1 }; |
63 | static int deviceBitRates[] = { 8, 16, -1 }; | 63 | static int deviceBitRates[] = { 8, 16, -1 }; |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #if defined(QT_QWS_SL5XXX) | 66 | #if defined(QT_QWS_SL5XXX) |
67 | ///#if defined(QT_QWS_EBX) | 67 | ///#if defined(QT_QWS_EBX) |
68 | 68 | ||
69 | #define DSPSTROUT "/dev/dsp" | 69 | #define DSPSTROUT "/dev/dsp" |
70 | #define DSPSTRIN "/dev/dsp1" | ||
71 | #define DSPSTRMIXEROUT "/dev/mixer" | 70 | #define DSPSTRMIXEROUT "/dev/mixer" |
71 | |||
72 | #ifdef SHARP | ||
73 | #define DSPSTRIN "/dev/dsp1" | ||
72 | #define DSPSTRMIXERIN "/dev/mixer1" | 74 | #define DSPSTRMIXERIN "/dev/mixer1" |
75 | #else | ||
76 | #define DSPSTRIN "/dev/dsp" | ||
77 | #define DSPSTRMIXERIN "/dev/mixer" | ||
78 | #endif | ||
73 | 79 | ||
74 | #else | 80 | #else |
75 | 81 | ||
76 | #define DSPSTROUT "/dev/dsp" | 82 | #define DSPSTROUT "/dev/dsp" |
77 | #define DSPSTRIN "/dev/dsp" | 83 | #define DSPSTRIN "/dev/dsp" |
78 | #define DSPSTRMIXERIN "/dev/mixer" | 84 | #define DSPSTRMIXERIN "/dev/mixer" |
79 | #define DSPSTRMIXEROUT "/dev/mixer" | 85 | #define DSPSTRMIXEROUT "/dev/mixer" |
80 | 86 | ||
81 | #endif | 87 | #endif |
82 | 88 | ||
83 | //#define ZAURUS 0 | 89 | //#define ZAURUS 0 |
84 | struct adpcm_state encoder_state; | 90 | struct adpcm_state encoder_state; |
85 | struct adpcm_state decoder_state; | 91 | struct adpcm_state decoder_state; |
86 | 92 | ||
87 | typedef struct { | 93 | typedef struct { |
88 | int sampleRate; | 94 | int sampleRate; |
89 | /* int fragSize; */ | 95 | /* int fragSize; */ |
90 | /* int blockSize; */ | 96 | /* int blockSize; */ |
91 | int resolution; //bitrate | 97 | int resolution; //bitrate |
92 | int channels; //number of channels | 98 | int channels; //number of channels |
93 | int fd; //file descriptor | 99 | int fd; //file descriptor |
94 | int sd; //sound device descriptor | 100 | int sd; //sound device descriptor |
95 | int numberSamples; //total number of samples | 101 | int numberSamples; //total number of samples |
96 | int SecondsToRecord; // number of seconds that should be recorded | 102 | int SecondsToRecord; // number of seconds that should be recorded |