summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opierec/device.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opierec/device.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opierec/device.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/noncore/multimedia/opierec/device.cpp b/noncore/multimedia/opierec/device.cpp
index ce49e96..5319d97 100644
--- a/noncore/multimedia/opierec/device.cpp
+++ b/noncore/multimedia/opierec/device.cpp
@@ -4,6 +4,9 @@
+/* OPIE */
+#include <opie2/odebug.h>
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
+using namespace Opie::Core;
-
+/* STD */
#include <fcntl.h>
@@ -14,6 +17,3 @@
#include <unistd.h>
-#include<sys/wait.h>
-// #include <sys/stat.h>
-// #include <sys/time.h>
-// #include <sys/types.h>
+#include <sys/wait.h>
#include <unistd.h>
@@ -34,6 +34,6 @@ Device::Device( QObject * parent, const char * dsp, const char * mixr, bool reco
if( !record){ //playing
- qDebug("setting up DSP for playing");
+ odebug << "setting up DSP for playing" << oendl;
flags = O_WRONLY;
} else { //recording
- qDebug("setting up DSP for recording");
+ odebug << "setting up DSP for recording" << oendl;
flags = O_RDWR;
@@ -98,3 +98,3 @@ void Device::changedOutVolume(int vol) {
QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << false;
- qWarning("changing output vol %d", vol);
+ owarn << "changing output vol " << vol << "" << oendl;
}
@@ -113,3 +113,3 @@ void Device::changedInVolume(int vol ) {
QCopEnvelope( "QPE/System", "micChange(bool)" ) << false;
- qWarning("changing input volume %d", vol);
+ owarn << "changing input volume " << vol << "" << oendl;
}
@@ -151,3 +151,3 @@ exit(1);
*/
-qDebug("Opening %s",dspstr);
+odebug << "Opening " << dspstr << "" << oendl;
if (( sd = ::open( dspstr, flags)) == -1) {
@@ -156,3 +156,3 @@ qDebug("Opening %s",dspstr);
+(QString)strerror(errno);
- qDebug("XXXXXXXXXXXXXXXXXXXXXXX "+errorMsg);
+ odebug << "XXXXXXXXXXXXXXXXXXXXXXX "+errorMsg << oendl;
return -1;
@@ -160,3 +160,3 @@ qDebug("Opening %s",dspstr);
-qDebug("Opening mixer");
+odebug << "Opening mixer" << oendl;
int mixerHandle=0;
@@ -166,3 +166,3 @@ qDebug("Opening mixer");
+(QString)strerror(errno);
- qDebug("XXXXXXXXXXXXXXXXXXXXXX "+errorMsg);
+ odebug << "XXXXXXXXXXXXXXXXXXXXXX "+errorMsg << oendl;
}
@@ -182,3 +182,3 @@ qDebug("Opening mixer");
close(pipefd[1]);
- // qDebug("%d",soundDevice->sd );
+ // odebug << "" << soundDevice->sd << "" << oendl;
_exit(0);
@@ -208,3 +208,3 @@ qDebug("Opening mixer");
// sd = s.toInt(&ok, 10);
-// qDebug("<<<<<<<<<<<<<>>>>>>>>>>>>"+s);
+// odebug << "<<<<<<<<<<<<<>>>>>>>>>>>>"+s << oendl;
@@ -213,4 +213,4 @@ qDebug("Opening mixer");
::close(mixerHandle );
-// qDebug("open device %s", dspstr);
-// qDebug("success! %d",sd);
+// odebug << "open device " << dspstr << "" << oendl;
+// odebug << "success! " << sd << "" << oendl;
return sd;
@@ -232,3 +232,3 @@ bool Device::closeDevice( bool) {
// sd=0;
-// qDebug("closed dsp");
+// odebug << "closed dsp" << oendl;
return true;
@@ -237,3 +237,3 @@ bool Device::closeDevice( bool) {
bool Device::setDeviceFormat( int form) {
- qDebug("set device res %d %d", form, sd);
+ odebug << "set device res " << form << " " << sd << "" << oendl;
if (ioctl( sd, SNDCTL_DSP_SETFMT, &form)==-1) { //set format
@@ -247,3 +247,3 @@ bool Device::setDeviceFormat( int form) {
bool Device::setDeviceChannels( int ch) {
- qDebug("set channels %d %d", ch, sd);
+ odebug << "set channels " << ch << " " << sd << "" << oendl;
if (ioctl( sd, SNDCTL_DSP_CHANNELS, &ch)==-1) {
@@ -257,3 +257,3 @@ bool Device::setDeviceChannels( int ch) {
bool Device::setDeviceRate( int rate) {
- qDebug("set rate %d %d", rate, sd);
+ odebug << "set rate " << rate << " " << sd << "" << oendl;
if (ioctl( sd, SNDCTL_DSP_SPEED, &rate) == -1) {
@@ -320,5 +320,5 @@ int Device::getDeviceFragSize() {
if (ioctl( sd, SNDCTL_DSP_GETBLKSIZE, &frag_size) == -1) {
- qDebug("no fragsize");
+ odebug << "no fragsize" << oendl;
} else {
- qDebug("driver says frag size is %d", frag_size);
+ odebug << "driver says frag size is " << frag_size << "" << oendl;
}