-rw-r--r-- | noncore/multimedia/opierec/device.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/noncore/multimedia/opierec/device.cpp b/noncore/multimedia/opierec/device.cpp index 5319d97..db2d63f 100644 --- a/noncore/multimedia/opierec/device.cpp +++ b/noncore/multimedia/opierec/device.cpp | |||
@@ -28,3 +28,3 @@ Device::Device( QObject * parent, const char * dsp, const char * mixr, bool reco | |||
28 | mixstr = (char *)mixr; | 28 | mixstr = (char *)mixr; |
29 | 29 | ||
30 | devForm=-1; | 30 | devForm=-1; |
@@ -34,6 +34,6 @@ Device::Device( QObject * parent, const char * dsp, const char * mixr, bool reco | |||
34 | if( !record){ //playing | 34 | if( !record){ //playing |
35 | odebug << "setting up DSP for playing" << oendl; | 35 | odebug << "setting up DSP for playing" << oendl; |
36 | flags = O_WRONLY; | 36 | flags = O_WRONLY; |
37 | } else { //recording | 37 | } else { //recording |
38 | odebug << "setting up DSP for recording" << oendl; | 38 | odebug << "setting up DSP for recording" << oendl; |
39 | flags = O_RDWR; | 39 | flags = O_RDWR; |
@@ -98,3 +98,3 @@ void Device::changedOutVolume(int vol) { | |||
98 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << false; | 98 | QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << false; |
99 | owarn << "changing output vol " << vol << "" << oendl; | 99 | owarn << "changing output vol " << vol << "" << oendl; |
100 | } | 100 | } |
@@ -113,3 +113,3 @@ void Device::changedInVolume(int vol ) { | |||
113 | QCopEnvelope( "QPE/System", "micChange(bool)" ) << false; | 113 | QCopEnvelope( "QPE/System", "micChange(bool)" ) << false; |
114 | owarn << "changing input volume " << vol << "" << oendl; | 114 | owarn << "changing input volume " << vol << "" << oendl; |
115 | } | 115 | } |
@@ -151,3 +151,3 @@ exit(1); | |||
151 | */ | 151 | */ |
152 | odebug << "Opening " << dspstr << "" << oendl; | 152 | odebug << "Opening " << dspstr << "" << oendl; |
153 | if (( sd = ::open( dspstr, flags)) == -1) { | 153 | if (( sd = ::open( dspstr, flags)) == -1) { |
@@ -156,3 +156,3 @@ odebug << "Opening " << dspstr << "" << oendl; | |||
156 | +(QString)strerror(errno); | 156 | +(QString)strerror(errno); |
157 | odebug << "XXXXXXXXXXXXXXXXXXXXXXX "+errorMsg << oendl; | 157 | odebug << "XXXXXXXXXXXXXXXXXXXXXXX "+errorMsg << oendl; |
158 | return -1; | 158 | return -1; |
@@ -160,3 +160,3 @@ odebug << "Opening " << dspstr << "" << oendl; | |||
160 | 160 | ||
161 | odebug << "Opening mixer" << oendl; | 161 | odebug << "Opening mixer" << oendl; |
162 | int mixerHandle=0; | 162 | int mixerHandle=0; |
@@ -166,3 +166,3 @@ odebug << "Opening mixer" << oendl; | |||
166 | +(QString)strerror(errno); | 166 | +(QString)strerror(errno); |
167 | odebug << "XXXXXXXXXXXXXXXXXXXXXX "+errorMsg << oendl; | 167 | odebug << "XXXXXXXXXXXXXXXXXXXXXX "+errorMsg << oendl; |
168 | } | 168 | } |
@@ -182,3 +182,3 @@ odebug << "Opening mixer" << oendl; | |||
182 | close(pipefd[1]); | 182 | close(pipefd[1]); |
183 | // odebug << "" << soundDevice->sd << "" << oendl; | 183 | // odebug << "" << soundDevice->sd << "" << oendl; |
184 | _exit(0); | 184 | _exit(0); |
@@ -208,4 +208,4 @@ odebug << "Opening mixer" << oendl; | |||
208 | // sd = s.toInt(&ok, 10); | 208 | // sd = s.toInt(&ok, 10); |
209 | // odebug << "<<<<<<<<<<<<<>>>>>>>>>>>>"+s << oendl; | 209 | // odebug << "<<<<<<<<<<<<<>>>>>>>>>>>>"+s << oendl; |
210 | 210 | ||
211 | // f2.close(); | 211 | // f2.close(); |
@@ -213,4 +213,4 @@ odebug << "Opening mixer" << oendl; | |||
213 | ::close(mixerHandle ); | 213 | ::close(mixerHandle ); |
214 | // odebug << "open device " << dspstr << "" << oendl; | 214 | // odebug << "open device " << dspstr << "" << oendl; |
215 | // odebug << "success! " << sd << "" << oendl; | 215 | // odebug << "success! " << sd << "" << oendl; |
216 | return sd; | 216 | return sd; |
@@ -232,3 +232,3 @@ bool Device::closeDevice( bool) { | |||
232 | // sd=0; | 232 | // sd=0; |
233 | // odebug << "closed dsp" << oendl; | 233 | // odebug << "closed dsp" << oendl; |
234 | return true; | 234 | return true; |
@@ -237,3 +237,3 @@ bool Device::closeDevice( bool) { | |||
237 | bool Device::setDeviceFormat( int form) { | 237 | bool Device::setDeviceFormat( int form) { |
238 | odebug << "set device res " << form << " " << sd << "" << oendl; | 238 | odebug << "set device res " << form << " " << sd << "" << oendl; |
239 | if (ioctl( sd, SNDCTL_DSP_SETFMT, &form)==-1) { //set format | 239 | if (ioctl( sd, SNDCTL_DSP_SETFMT, &form)==-1) { //set format |
@@ -247,3 +247,3 @@ bool Device::setDeviceFormat( int form) { | |||
247 | bool Device::setDeviceChannels( int ch) { | 247 | bool Device::setDeviceChannels( int ch) { |
248 | odebug << "set channels " << ch << " " << sd << "" << oendl; | 248 | odebug << "set channels " << ch << " " << sd << "" << oendl; |
249 | if (ioctl( sd, SNDCTL_DSP_CHANNELS, &ch)==-1) { | 249 | if (ioctl( sd, SNDCTL_DSP_CHANNELS, &ch)==-1) { |
@@ -257,3 +257,3 @@ bool Device::setDeviceChannels( int ch) { | |||
257 | bool Device::setDeviceRate( int rate) { | 257 | bool Device::setDeviceRate( int rate) { |
258 | odebug << "set rate " << rate << " " << sd << "" << oendl; | 258 | odebug << "set rate " << rate << " " << sd << "" << oendl; |
259 | if (ioctl( sd, SNDCTL_DSP_SPEED, &rate) == -1) { | 259 | if (ioctl( sd, SNDCTL_DSP_SPEED, &rate) == -1) { |
@@ -318,7 +318,7 @@ int Device::getDeviceFragSize() { | |||
318 | int frag_size; | 318 | int frag_size; |
319 | 319 | ||
320 | if (ioctl( sd, SNDCTL_DSP_GETBLKSIZE, &frag_size) == -1) { | 320 | if (ioctl( sd, SNDCTL_DSP_GETBLKSIZE, &frag_size) == -1) { |
321 | odebug << "no fragsize" << oendl; | 321 | odebug << "no fragsize" << oendl; |
322 | } else { | 322 | } else { |
323 | odebug << "driver says frag size is " << frag_size << "" << oendl; | 323 | odebug << "driver says frag size is " << frag_size << "" << oendl; |
324 | } | 324 | } |
@@ -347,3 +347,3 @@ int Device::devRead(int soundDescriptor, short *buf, int size) { | |||
347 | int number = 0; | 347 | int number = 0; |
348 | number = ::read( soundDescriptor, (char *)buf, size); | 348 | number = ::read( sd /*soundDescriptor*/, (char *)buf, size); |
349 | return number; | 349 | return number; |
@@ -353,3 +353,3 @@ int Device::devWrite(int soundDescriptor, short * buf, int size) { | |||
353 | int bytesWritten = 0; | 353 | int bytesWritten = 0; |
354 | bytesWritten = ::write( soundDescriptor, buf, size); | 354 | bytesWritten = ::write( sd /*soundDescriptor*/, buf, size); |
355 | return bytesWritten; | 355 | return bytesWritten; |