summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudioinput_alsa_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qaudioinput_alsa_p.cpp')
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp
index e957cb4..ea68c8d6 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp
@@ -256,7 +256,7 @@ bool QAudioInputPrivate::open()
int dir;
int err=-1;
int count=0;
- unsigned int freakuency=settings.frequency();
+ unsigned int freakuency=settings.sampleRate();
QString dev = QString(QLatin1String(m_device.constData()));
QList<QByteArray> devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioInput);
@@ -332,7 +332,7 @@ bool QAudioInputPrivate::open()
}
}
if ( !fatal ) {
- err = snd_pcm_hw_params_set_channels( handle, hwparams, (unsigned int)settings.channels() );
+ err = snd_pcm_hw_params_set_channels( handle, hwparams, (unsigned int)settings.channelCount() );
if ( err < 0 ) {
fatal = true;
errMessage = QString::fromLatin1("QAudioInput: snd_pcm_hw_params_set_channels: err = %1").arg(err);
@@ -505,7 +505,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
errorState = QAudio::NoError;
deviceState = QAudio::IdleState;
} else {
- totalTimeValue += snd_pcm_bytes_to_frames(handle, err)*1000000/settings.frequency();
+ totalTimeValue += snd_pcm_bytes_to_frames(handle, err)*1000000/settings.sampleRate();
resuming = false;
errorState = QAudio::NoError;
deviceState = QAudio::ActiveState;
@@ -534,7 +534,7 @@ void QAudioInputPrivate::resume()
resuming = true;
deviceState = QAudio::ActiveState;
int chunks = buffer_size/period_size;
- timer->start(buffer_time*chunks/2000);
+ timer->start(period_time*chunks/2000);
emit stateChanged(deviceState);
}
}
@@ -702,7 +702,7 @@ qint64 InputPrivate::readData( char* data, qint64 len)
count++;
}
if(err > 0 && readFrames > 0) {
- audioDevice->totalTimeValue += readFrames*1000/audioDevice->settings.frequency()*1000;
+ audioDevice->totalTimeValue += readFrames*1000/audioDevice->settings.sampleRate()*1000;
audioDevice->deviceState = QAudio::ActiveState;
return err;
}