summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/oss-sound/oss-sound.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 03:43:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 03:43:07 +0000
commit70b9eea2ba01c3691497f49e4c45cb070c16193c (patch)
tree9a6df61aa247a27275aad9c5245e419e89c2c640 /kradio3/plugins/oss-sound/oss-sound.cpp
parent998c1384ace4ae4655997c181fa33242148cd0a4 (diff)
downloadtderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.tar.gz
tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.zip
TQt4 port kradio
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1238952 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/plugins/oss-sound/oss-sound.cpp')
-rw-r--r--kradio3/plugins/oss-sound/oss-sound.cpp148
1 files changed, 74 insertions, 74 deletions
diff --git a/kradio3/plugins/oss-sound/oss-sound.cpp b/kradio3/plugins/oss-sound/oss-sound.cpp
index 760399e..e640191 100644
--- a/kradio3/plugins/oss-sound/oss-sound.cpp
+++ b/kradio3/plugins/oss-sound/oss-sound.cpp
@@ -41,8 +41,8 @@ PLUGIN_LIBRARY_FUNCTIONS(OSSSoundDevice, "kradio-oss-sound", i18n("Open Sound Sy
struct _lrvol { unsigned char l, r; short dummy; };
-OSSSoundDevice::OSSSoundDevice(const QString &name)
- : QObject(NULL, NULL),
+OSSSoundDevice::OSSSoundDevice(const TQString &name)
+ : TQObject(NULL, NULL),
PluginBase(name, i18n("KRadio OSS Sound Plugin")),
m_DSPDeviceName(""),
m_MixerDeviceName(""),
@@ -64,7 +64,7 @@ OSSSoundDevice::OSSSoundDevice(const QString &name)
m_EnablePlayback(true),
m_EnableCapture(true)
{
- QObject::connect(&m_PollingTimer, SIGNAL(timeout()), this, SLOT(slotPoll()));
+ TQObject::connect(&m_PollingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotPoll()));
}
@@ -119,7 +119,7 @@ void OSSSoundDevice::noticeConnectedI (ISoundStreamServer *s, bool pointer_valid
void OSSSoundDevice::saveState (KConfig *c) const
{
- c->setGroup(QString("oss-sound-") + PluginBase::name());
+ c->setGroup(TQString("oss-sound-") + PluginBase::name());
c->writeEntry("dsp-device", m_DSPDeviceName);
c->writeEntry("mixer-device", m_MixerDeviceName);
@@ -132,7 +132,7 @@ void OSSSoundDevice::saveState (KConfig *c) const
void OSSSoundDevice::restoreState (KConfig *c)
{
- c->setGroup(QString("oss-sound-") + PluginBase::name());
+ c->setGroup(TQString("oss-sound-") + PluginBase::name());
m_EnablePlayback = c->readBoolEntry("enable-playback", true);
m_EnableCapture = c->readBoolEntry("enable-capture", true);
@@ -150,7 +150,7 @@ void OSSSoundDevice::restoreState (KConfig *c)
}
-void OSSSoundDevice::setMixerDeviceName(const QString &dev_name)
+void OSSSoundDevice::setMixerDeviceName(const TQString &dev_name)
{
if (m_MixerDeviceName != dev_name) {
m_MixerDeviceName = dev_name;
@@ -167,7 +167,7 @@ void OSSSoundDevice::setMixerDeviceName(const QString &dev_name)
ConfigPageInfo OSSSoundDevice::createConfigurationPage()
{
OSSSoundConfiguration *conf = new OSSSoundConfiguration(NULL, this);
- QObject::connect(this, SIGNAL(sigUpdateConfig()), conf, SLOT(slotUpdateConfig()));
+ TQObject::connect(this, TQT_SIGNAL(sigUpdateConfig()), conf, TQT_SLOT(slotUpdateConfig()));
return ConfigPageInfo (conf,
i18n("OSS Sound"),
i18n("OSS Sound Device Options"),
@@ -200,9 +200,9 @@ AboutPageInfo OSSSoundDevice::createAboutPage()
-bool OSSSoundDevice::preparePlayback(SoundStreamID id, const QString &channel, bool active_mode, bool start_immediately)
+bool OSSSoundDevice::preparePlayback(SoundStreamID id, const TQString &channel, bool active_mode, bool start_immediately)
{
- if (id.isValid() && m_revPlaybackChannels.contains(channel)) {
+ if (id.isValid() && m_revPlaybackChannels.tqcontains(channel)) {
m_PlaybackStreams.insert(id, SoundStreamConfig(m_revPlaybackChannels[channel], active_mode));
if (start_immediately)
startPlayback(id);
@@ -213,9 +213,9 @@ bool OSSSoundDevice::preparePlayback(SoundStreamID id, const QString &channel, b
}
-bool OSSSoundDevice::prepareCapture(SoundStreamID id, const QString &channel)
+bool OSSSoundDevice::prepareCapture(SoundStreamID id, const TQString &channel)
{
- if (id.isValid() && m_revCaptureChannels.contains(channel)) {
+ if (id.isValid() && m_revCaptureChannels.tqcontains(channel)) {
m_CaptureStreams.insert(id, SoundStreamConfig(m_revCaptureChannels[channel]));
return true;
// FIXME: what to do if stream is already playing?
@@ -225,8 +225,8 @@ bool OSSSoundDevice::prepareCapture(SoundStreamID id, const QString &channel)
bool OSSSoundDevice::releasePlayback(SoundStreamID id)
{
- if (id.isValid() && m_PlaybackStreams.contains(id)) {
- if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
+ if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
stopPlayback(id);
}
m_PlaybackStreams.remove(id);
@@ -237,7 +237,7 @@ bool OSSSoundDevice::releasePlayback(SoundStreamID id)
bool OSSSoundDevice::releaseCapture(SoundStreamID id)
{
- if (id.isValid() && m_CaptureStreams.contains(id)) {
+ if (id.isValid() && m_CaptureStreams.tqcontains(id)) {
if (m_CaptureStreamID == id) {
stopCapture(id);
}
@@ -261,7 +261,7 @@ bool OSSSoundDevice::supportsCapture() const
bool OSSSoundDevice::startPlayback(SoundStreamID id)
{
- if (id.isValid() && m_PlaybackStreams.contains(id) && m_EnablePlayback) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id) && m_EnablePlayback) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
@@ -272,7 +272,7 @@ bool OSSSoundDevice::startPlayback(SoundStreamID id)
ok = true;
}
} else {
- if (!m_PassivePlaybackStreams.contains(id))
+ if (!m_PassivePlaybackStreams.tqcontains(id))
m_PassivePlaybackStreams.append(id);
ok = true;
}
@@ -300,12 +300,12 @@ bool OSSSoundDevice::pausePlayback(SoundStreamID /*id*/)
bool OSSSoundDevice::stopPlayback(SoundStreamID id)
{
- if (id.isValid() && m_PlaybackStreams.contains(id)) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (!cfg.m_ActiveMode) {
- if (m_PassivePlaybackStreams.contains(id)) {
+ if (m_PassivePlaybackStreams.tqcontains(id)) {
// writeMixerVolume(cfg.m_Channel, 0);
m_PassivePlaybackStreams.remove(id);
}
@@ -324,7 +324,7 @@ bool OSSSoundDevice::stopPlayback(SoundStreamID id)
bool OSSSoundDevice::isPlaybackRunning(SoundStreamID id, bool &b) const
{
- if (id.isValid() && m_PlaybackStreams.contains(id)) {
+ if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
b = true;
return true;
} else {
@@ -337,7 +337,7 @@ bool OSSSoundDevice::startCaptureWithFormat(SoundStreamID id,
SoundFormat &real_format,
bool force_format)
{
- if (m_CaptureStreams.contains(id) && m_EnableCapture) {
+ if (m_CaptureStreams.tqcontains(id) && m_EnableCapture) {
if (m_CaptureStreamID != id) {
m_CapturePos = 0;
@@ -402,7 +402,7 @@ bool OSSSoundDevice::isCaptureRunning(SoundStreamID id, bool &b, SoundFormat &sf
bool OSSSoundDevice::noticeSoundStreamClosed(SoundStreamID id)
{
bool found = false;
- if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
+ if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
stopPlayback(id);
found = true;
}
@@ -419,13 +419,13 @@ bool OSSSoundDevice::noticeSoundStreamClosed(SoundStreamID id)
bool OSSSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStreamID newID)
{
bool found = false;
- if (m_PlaybackStreams.contains(oldID)) {
+ if (m_PlaybackStreams.tqcontains(oldID)) {
m_PlaybackStreams.insert(newID, m_PlaybackStreams[oldID]);
if (newID != oldID)
m_PlaybackStreams.remove(oldID);
found = true;
}
- if (m_CaptureStreams.contains(oldID)) {
+ if (m_CaptureStreams.tqcontains(oldID)) {
m_CaptureStreams.insert(newID, m_CaptureStreams[oldID]);
if (newID != oldID)
m_CaptureStreams.remove(oldID);
@@ -436,7 +436,7 @@ bool OSSSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStrea
m_PlaybackStreamID = newID;
if (m_CaptureStreamID == oldID)
m_CaptureStreamID = newID;
- if (m_PassivePlaybackStreams.contains(oldID)) {
+ if (m_PassivePlaybackStreams.tqcontains(oldID)) {
m_PassivePlaybackStreams.remove(oldID);
m_PassivePlaybackStreams.append(newID);
}
@@ -478,7 +478,7 @@ bool OSSSoundDevice::noticeSoundStreamData(SoundStreamID id,
// if (n < size) {
// m_PlaybackSkipCount += size - n;
// } else if (m_PlaybackSkipCount > 0) {
-// logWarning(i18n("%1: Playback buffer overflow. Skipped %1 bytes").arg(m_DSPDeviceName).arg(QString::number(m_PlaybackSkipCount)));
+// logWarning(i18n("%1: Playback buffer overflow. Skipped %1 bytes").tqarg(m_DSPDeviceName).tqarg(TQString::number(m_PlaybackSkipCount)));
// m_PlaybackSkipCount = 0;
// }
@@ -504,7 +504,7 @@ void OSSSoundDevice::slotPoll()
bytesRead = 0;
} else if (bytesRead == 0) {
err = -1;
- logError(i18n("OSS device %1: No data to record").arg(m_DSPDeviceName));
+ logError(i18n("OSS device %1: No data to record").tqarg(m_DSPDeviceName));
} else {
err = errno;
}
@@ -514,7 +514,7 @@ void OSSSoundDevice::slotPoll()
buffer = m_CaptureBuffer.getData(size);
time_t cur_time = time(NULL);
size_t consumed_size = SIZE_T_DONT_CARE;
- notifySoundStreamData(m_CaptureStreamID, m_DSPFormat, buffer, size, consumed_size, SoundMetaData(m_CapturePos, cur_time - m_CaptureStartTime, cur_time, i18n("internal stream, not stored (%1)").arg(m_DSPDeviceName)));
+ notifySoundStreamData(m_CaptureStreamID, m_DSPFormat, buffer, size, consumed_size, SoundMetaData(m_CapturePos, cur_time - m_CaptureStartTime, cur_time, i18n("internal stream, not stored (%1)").tqarg(m_DSPDeviceName)));
if (consumed_size == SIZE_T_DONT_CARE)
consumed_size = size;
m_CaptureBuffer.removeData(consumed_size);
@@ -546,7 +546,7 @@ void OSSSoundDevice::slotPoll()
}
if (err) {
- logError(i18n("Error %1 while handling OSS device %2").arg(QString().setNum(err)).arg(m_DSPDeviceName));
+ logError(i18n("Error %1 while handling OSS device %2").tqarg(TQString().setNum(err)).tqarg(m_DSPDeviceName));
}
if (m_PlaybackStreamID.isValid())
@@ -554,8 +554,8 @@ void OSSSoundDevice::slotPoll()
if (m_CaptureStreamID.isValid())
checkMixerVolume(m_CaptureStreamID);
- QValueListConstIterator<SoundStreamID> end = m_PassivePlaybackStreams.end();
- for (QValueListConstIterator<SoundStreamID> it = m_PassivePlaybackStreams.begin(); it != end; ++it)
+ TQValueListConstIterator<SoundStreamID> end = m_PassivePlaybackStreams.end();
+ for (TQValueListConstIterator<SoundStreamID> it = m_PassivePlaybackStreams.begin(); it != end; ++it)
checkMixerVolume(*it);
}
@@ -590,13 +590,13 @@ bool OSSSoundDevice::openDSPDevice(const SoundFormat &format, bool reopen)
m_DSP_fd = open(m_DSPDeviceName.ascii(), O_NONBLOCK | O_RDONLY);
bool err = m_DSP_fd < 0;
if (err) {
- logError(i18n("Cannot open DSP device %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot open DSP device %1").tqarg(m_DSPDeviceName));
return false;
}
int caps = 0;
err |= (ioctl (m_DSP_fd, SNDCTL_DSP_GETCAPS, &caps) != 0);
if (err)
- logError(i18n("Cannot read DSP capabilities for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot read DSP capabilities for %1").tqarg(m_DSPDeviceName));
m_DuplexMode = (caps & DSP_CAP_DUPLEX) ? DUPLEX_FULL : DUPLEX_HALF;
close (m_DSP_fd);
@@ -616,60 +616,60 @@ bool OSSSoundDevice::openDSPDevice(const SoundFormat &format, bool reopen)
err = m_DSP_fd < 0;
if (err) {
- logError(i18n("Cannot open DSP device %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot open DSP device %1").tqarg(m_DSPDeviceName));
return false;
}
int oss_format = getOSSFormat(m_DSPFormat);
err |= (ioctl(m_DSP_fd, SNDCTL_DSP_SETFMT, &oss_format) != 0);
if (err)
- logError(i18n("Cannot set DSP sample format for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set DSP sample format for %1").tqarg(m_DSPDeviceName));
int channels = m_DSPFormat.m_Channels;
err |= (ioctl(m_DSP_fd, SNDCTL_DSP_CHANNELS, &channels) != 0);
if (err)
- logError(i18n("Cannot set number of channels for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set number of channels for %1").tqarg(m_DSPDeviceName));
int rate = m_DSPFormat.m_SampleRate;
err |= (ioctl(m_DSP_fd, SNDCTL_DSP_SPEED, &rate) != 0);
if (err)
- logError(i18n("Cannot set sampling rate for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set sampling rate for %1").tqarg(m_DSPDeviceName));
if (rate != (int)m_DSPFormat.m_SampleRate) {
logWarning(i18n("Asking for %1 Hz but %2 uses %3 Hz").
- arg(QString::number(m_DSPFormat.m_SampleRate)).
+ arg(TQString::number(m_DSPFormat.m_SampleRate)).
arg(m_DSPDeviceName).
- arg(QString::number(rate)));
+ arg(TQString::number(rate)));
m_DSPFormat.m_SampleRate = rate;
}
int stereo = m_DSPFormat.m_Channels == 2;
err |= (ioctl(m_DSP_fd, SNDCTL_DSP_STEREO, &stereo) != 0);
if (err)
- logError(i18n("Cannot set stereo mode for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set stereo mode for %1").tqarg(m_DSPDeviceName));
unsigned sampleSize = m_DSPFormat.m_SampleBits;
err |= (ioctl(m_DSP_fd, SNDCTL_DSP_SAMPLESIZE, &sampleSize) != 0);
if (err || sampleSize != m_DSPFormat.m_SampleBits)
- logError(i18n("Cannot set sample size for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set sample size for %1").tqarg(m_DSPDeviceName));
// setup buffer, ask for 40ms latency
int tmp = (400 * m_DSPFormat.frameSize() * m_DSPFormat.m_SampleRate) / 1000;
- int mask = -1; for (; tmp; tmp >>= 1) ++mask;
- if (mask < 8) mask = 12; // default 4kB
- mask |= 0x7FFF0000;
- err |= ioctl (m_DSP_fd, SNDCTL_DSP_SETFRAGMENT, &mask);
+ int tqmask = -1; for (; tmp; tmp >>= 1) ++tqmask;
+ if (tqmask < 8) tqmask = 12; // default 4kB
+ tqmask |= 0x7FFF0000;
+ err |= ioctl (m_DSP_fd, SNDCTL_DSP_SETFRAGMENT, &tqmask);
if (err)
- logError(i18n("Cannot set buffers for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot set buffers for %1").tqarg(m_DSPDeviceName));
int bufferBlockSize = 0;
err |= ioctl (m_DSP_fd, SNDCTL_DSP_GETBLKSIZE, &bufferBlockSize);
if (err) {
- logError(i18n("Cannot read buffer size for %1").arg(m_DSPDeviceName));
+ logError(i18n("Cannot read buffer size for %1").tqarg(m_DSPDeviceName));
} else {
- logInfo(i18n("%1 uses buffer blocks of %2 bytes").arg(m_DSPDeviceName).arg(QString::number(bufferBlockSize)));
+ logInfo(i18n("%1 uses buffer blocks of %2 bytes").tqarg(m_DSPDeviceName).tqarg(TQString::number(bufferBlockSize)));
size_t tmp = (((m_BufferSize - 1) / bufferBlockSize) + 1) * bufferBlockSize;
setBufferSize(tmp);
- logInfo(i18n("adjusted own buffer size to %1 bytes").arg(QString::number(tmp)));
+ logInfo(i18n("adjusted own buffer size to %1 bytes").tqarg(TQString::number(tmp)));
}
int trigger = ~PCM_ENABLE_INPUT & ~PCM_ENABLE_OUTPUT;
@@ -721,7 +721,7 @@ bool OSSSoundDevice::openMixerDevice(bool reopen)
m_Mixer_fd = open(m_MixerDeviceName.ascii(), O_RDONLY);
if (m_Mixer_fd < 0) {
- logError(i18n("Cannot open mixer device %1").arg(m_MixerDeviceName));
+ logError(i18n("Cannot open mixer device %1").tqarg(m_MixerDeviceName));
} else {
m_PollingTimer.start(40);
}
@@ -744,7 +744,7 @@ bool OSSSoundDevice::closeMixerDevice(bool force)
}
-void OSSSoundDevice::getMixerChannels(int query, QStringList &retval, QMap<QString, int> &revmap) const
+void OSSSoundDevice::getMixerChannels(int query, TQStringList &retval, TQMap<TQString, int> &revmap) const
{
retval.clear();
revmap.clear();
@@ -754,21 +754,21 @@ void OSSSoundDevice::getMixerChannels(int query, QStringList &retval, QMap<QStri
fd = open(m_MixerDeviceName.ascii(), O_RDONLY);
if (fd < 0) {
- logError(i18n("OSSSoundDevice::getMixerChannels: Cannot open mixer device %1").arg(m_MixerDeviceName));
+ logError(i18n("OSSSoundDevice::getMixerChannels: Cannot open mixer device %1").tqarg(m_MixerDeviceName));
}
if (fd >= 0) {
- int mask = 0;
- if ( ioctl(fd, MIXER_READ(query), &mask) == 0 ) {
+ int tqmask = 0;
+ if ( ioctl(fd, MIXER_READ(query), &tqmask) == 0 ) {
for (int i = 0; i < SOUND_MIXER_NRDEVICES; ++i) {
- if (mask & (1 << i)) {
+ if (tqmask & (1 << i)) {
static const char *labels[] = SOUND_DEVICE_LABELS;
retval.append(i18n(labels[i]));
revmap.insert(i18n(labels[i]), i);
}
}
} else {
- logError(i18n("OSSSoundDevice::getMixerChannels: Cannot read mixer device mask on device %1").arg(m_MixerDeviceName));
+ logError(i18n("OSSSoundDevice::getMixerChannels: Cannot read mixer device tqmask on device %1").tqarg(m_MixerDeviceName));
}
}
if (fd != m_Mixer_fd)
@@ -776,13 +776,13 @@ void OSSSoundDevice::getMixerChannels(int query, QStringList &retval, QMap<QStri
}
-const QStringList &OSSSoundDevice::getPlaybackChannels() const
+const TQStringList &OSSSoundDevice::getPlaybackChannels() const
{
return m_PlaybackChannels;
}
-const QStringList &OSSSoundDevice::getCaptureChannels() const
+const TQStringList &OSSSoundDevice::getCaptureChannels() const
{
return m_CaptureChannels;
}
@@ -790,7 +790,7 @@ const QStringList &OSSSoundDevice::getCaptureChannels() const
bool OSSSoundDevice::setPlaybackVolume(SoundStreamID id, float volume)
{
- if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
+ if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (rint(100*volume) != rint(100*cfg.m_Volume)) {
@@ -820,7 +820,7 @@ bool OSSSoundDevice::setCaptureVolume(SoundStreamID id, float volume)
bool OSSSoundDevice::getPlaybackVolume(SoundStreamID id, float &volume) const
{
- if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
+ if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
const SoundStreamConfig &cfg = m_PlaybackStreams[id];
volume = cfg.m_Volume;
return true;
@@ -844,7 +844,7 @@ void OSSSoundDevice::checkMixerVolume(SoundStreamID id)
{
if (m_Mixer_fd >= 0 && id.isValid()) {
- if (m_PassivePlaybackStreams.contains(id) || m_PlaybackStreamID == id) {
+ if (m_PassivePlaybackStreams.tqcontains(id) || m_PlaybackStreamID == id) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
float v = readMixerVolume(cfg.m_Channel);
@@ -874,8 +874,8 @@ float OSSSoundDevice::readMixerVolume(int channel) const
if (err) {
logError("OSSSound::readMixerVolume: " +
i18n("error %1 while reading volume from %2")
- .arg(QString().setNum(err))
- .arg(m_MixerDeviceName));
+ .tqarg(TQString().setNum(err))
+ .tqarg(m_MixerDeviceName));
tmpvol.l = tmpvol.r = 0;
}
return float(tmpvol.l) / 100.0;
@@ -897,9 +897,9 @@ float OSSSoundDevice::writeMixerVolume (int channel, float vol)
if (err != 0) {
logError("OSSSoundDevice::writeMixerVolume: " +
i18n("error %1 while setting volume to %2 on device %3")
- .arg(QString().setNum(err))
- .arg(QString().setNum(vol))
- .arg(m_MixerDeviceName));
+ .tqarg(TQString().setNum(err))
+ .tqarg(TQString().setNum(vol))
+ .tqarg(m_MixerDeviceName));
return -1;
}
}
@@ -913,21 +913,21 @@ void OSSSoundDevice::selectCaptureChannel (int channel)
int err = ioctl(m_Mixer_fd, SOUND_MIXER_WRITE_RECSRC, &x);
if (err)
logError(i18n("Selecting recording source on device %1 failed with error code %2")
- .arg(m_MixerDeviceName)
- .arg(QString::number(err)));
+ .tqarg(m_MixerDeviceName)
+ .tqarg(TQString::number(err)));
_lrvol tmpvol;
err = ioctl(m_Mixer_fd, MIXER_READ(SOUND_MIXER_IGAIN), &tmpvol);
if (err)
logError(i18n("Reading igain volume on device %1 failed with error code %2")
- .arg(m_MixerDeviceName)
- .arg(QString::number(err)));
+ .tqarg(m_MixerDeviceName)
+ .tqarg(TQString::number(err)));
if (tmpvol.r == 0 && tmpvol.l == 0) {
tmpvol.r = tmpvol.l = 1;
err = ioctl(m_Mixer_fd, MIXER_WRITE(SOUND_MIXER_IGAIN), &tmpvol);
if (err)
logError(i18n("Setting igain volume on device %1 failed with error code %2")
- .arg(m_MixerDeviceName)
- .arg(QString::number(err)));
+ .tqarg(m_MixerDeviceName)
+ .tqarg(TQString::number(err)));
}
}
@@ -972,7 +972,7 @@ void OSSSoundDevice::enableCapture(bool on)
}
-void OSSSoundDevice::setDSPDeviceName(const QString &s)
+void OSSSoundDevice::setDSPDeviceName(const TQString &s)
{
m_DSPDeviceName = s;
SoundFormat f = m_DSPFormat;
@@ -981,9 +981,9 @@ void OSSSoundDevice::setDSPDeviceName(const QString &s)
}
-QString OSSSoundDevice::getSoundStreamClientDescription() const
+TQString OSSSoundDevice::getSoundStreamClientDescription() const
{
- return i18n("OSS Sound Device %1").arg(PluginBase::name());
+ return i18n("OSS Sound Device %1").tqarg(PluginBase::name());
}