diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-07-28 11:50:23 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-07-28 11:50:23 +0000 |
| commit | eaf8b9067e372798294205002a9ca46c203f6183 (patch) | |
| tree | 49bd3ef1d1e4b4a6312be38948b9e29e5451c10a /src | |
| parent | 579783f73845f7dafe1cd97ed109147282a7732f (diff) | |
| download | qmmp-eaf8b9067e372798294205002a9ca46c203f6183.tar.gz qmmp-eaf8b9067e372798294205002a9ca46c203f6183.tar.bz2 qmmp-eaf8b9067e372798294205002a9ca46c203f6183.zip | |
alsa: fixed sample rate
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4392 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/Output/alsa/outputalsa.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/Output/alsa/outputalsa.cpp b/src/plugins/Output/alsa/outputalsa.cpp index b0f6233f2..5774579f5 100644 --- a/src/plugins/Output/alsa/outputalsa.cpp +++ b/src/plugins/Output/alsa/outputalsa.cpp @@ -139,6 +139,7 @@ bool OutputALSA::initialize(quint32 freq, int chan, Qmmp::AudioFormat format) if (rate != exact_rate) { qWarning("OutputALSA: The rate %d Hz is not supported by your hardware.\n==> Using %d Hz instead.", rate, exact_rate); + rate = exact_rate; } uint c = chan; if ((err = snd_pcm_hw_params_set_channels_near(pcm_handle, hwparams, &c)) < 0) @@ -189,7 +190,7 @@ bool OutputALSA::initialize(quint32 freq, int chan, Qmmp::AudioFormat format) m_chunk_size = period_size; m_can_pause = snd_pcm_hw_params_can_pause(hwparams) && use_pause; qDebug("OutputALSA: can pause: %d", m_can_pause); - configure(freq, chan, format); //apply configuration + configure(rate, chan, format); //apply configuration //create alsa prebuffer; m_prebuf_size = 2 * snd_pcm_frames_to_bytes(pcm_handle, m_chunk_size); //buffer for two periods m_prebuf = (uchar *)malloc(m_prebuf_size); |
