summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/oss-sound/oss-sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kradio3/plugins/oss-sound/oss-sound.cpp')
-rw-r--r--kradio3/plugins/oss-sound/oss-sound.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kradio3/plugins/oss-sound/oss-sound.cpp b/kradio3/plugins/oss-sound/oss-sound.cpp
index c1a9160..2ac0f6e 100644
--- a/kradio3/plugins/oss-sound/oss-sound.cpp
+++ b/kradio3/plugins/oss-sound/oss-sound.cpp
@@ -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(TQString::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(TQString().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())
@@ -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,24 +616,24 @@ 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(TQString::number(m_DSPFormat.m_SampleRate)).
@@ -645,12 +645,12 @@ bool OSSSoundDevice::openDSPDevice(const SoundFormat &format, bool reopen)
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;
@@ -659,17 +659,17 @@ bool OSSSoundDevice::openDSPDevice(const SoundFormat &format, bool reopen)
mask |= 0x7FFF0000;
err |= ioctl (m_DSP_fd, SNDCTL_DSP_SETFRAGMENT, &mask);
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(TQString::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(TQString::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);
}
@@ -754,7 +754,7 @@ void OSSSoundDevice::getMixerChannels(int query, TQStringList &retval, TQMap<TQS
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) {
@@ -768,7 +768,7 @@ void OSSSoundDevice::getMixerChannels(int query, TQStringList &retval, TQMap<TQS
}
}
} else {
- logError(i18n("OSSSoundDevice::getMixerChannels: Cannot read mixer device mask on device %1").arg(m_MixerDeviceName));
+ logError(i18n("OSSSoundDevice::getMixerChannels: Cannot read mixer device mask on device %1").tqarg(m_MixerDeviceName));
}
}
if (fd != m_Mixer_fd)
@@ -874,8 +874,8 @@ float OSSSoundDevice::readMixerVolume(int channel) const
if (err) {
logError("OSSSound::readMixerVolume: " +
i18n("error %1 while reading volume from %2")
- .arg(TQString().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(TQString().setNum(err))
- .arg(TQString().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(TQString::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(TQString::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(TQString::number(err)));
+ .tqarg(m_MixerDeviceName)
+ .tqarg(TQString::number(err)));
}
}
@@ -983,7 +983,7 @@ void OSSSoundDevice::setDSPDeviceName(const TQString &s)
TQString OSSSoundDevice::getSoundStreamClientDescription() const
{
- return i18n("OSS Sound Device %1").arg(PluginBase::name());
+ return i18n("OSS Sound Device %1").tqarg(PluginBase::name());
}