[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-audio-dev
Subject: [Audio-dev] CR: Fix additional snd_pcm_hw_params_any() calls
From: "Rusty Lynch" <rustylynch1234 () gmail ! com>
Date: 2008-06-20 15:12:04
Message-ID: 23b556a40806200812l6076743cu4bd03d42107bdd0d () mail ! gmail ! com
[Download RAW message or body]
Description
----------------------------------
The following patch fixes the handling for the two remaining
snd_pcm_hw_params_any() calls, left out of the previous patch:
http://lists.helixcommunity.org/pipermail/audio-dev/2008-June/000898.html
I also fixed a couple more indention oddities.
This is still addressing:
https://bugs.helixcommunity.org/show_bug.cgi?id=8394
Files Modified
----------------------------------
audio/device/platform/unix/audlinux_alsa.cpp
Branches
---------------------------------
HEAD, Atlas310, Atlas341
--rusty
["additional-audio-return.patch" (text/x-diff)]
Description
----------------------------------
The following patch fixes the handling for the two remaining
snd_pcm_hw_params_any() calls, left out of the previous patch:
http://lists.helixcommunity.org/pipermail/audio-dev/2008-June/000898.html
I also fixed a couple more indention oddities.
This is still addressing:
https://bugs.helixcommunity.org/show_bug.cgi?id=8394
Files Modified
----------------------------------
audio/device/platform/unix/audlinux_alsa.cpp
Branches
---------------------------------
HEAD, Atlas310, Atlas341
Index: platform/unix/audlinux_alsa.cpp
===================================================================
RCS file: /cvsroot/audio/device/platform/unix/audlinux_alsa.cpp,v
retrieving revision 1.11
diff -u -r1.11 audlinux_alsa.cpp
--- platform/unix/audlinux_alsa.cpp 19 Jun 2008 16:56:41 -0000 1.11
+++ platform/unix/audlinux_alsa.cpp 20 Jun 2008 15:04:31 -0000
@@ -1423,18 +1423,18 @@
/* Apply to ALSA */
int err = 0;
- snd_pcm_hw_params_t *hwparams;
+ snd_pcm_hw_params_t *hwparams;
- snd_pcm_hw_params_alloca(&hwparams);
+ snd_pcm_hw_params_alloca(&hwparams);
- err = snd_pcm_hw_params_any(m_pAlsaPCMHandle, hwparams);
- if (err < 0)
+ err = snd_pcm_hw_params_any(m_pAlsaPCMHandle, hwparams);
+ if (err < 0)
{
HXLOGL1 ( HXLOG_ADEV, "snd_pcm_hw_params_any: %s", snd_strerror(err));
m_wLastError = RA_AOE_NOTENABLED;
- }
+ }
- if (err == 0)
+ if (err >= 0)
{
err = snd_pcm_hw_params_test_rate (m_pAlsaPCMHandle, hwparams, sample_rate, 0);
if (err < 0)
@@ -1478,20 +1478,20 @@
}
int err = 0;
- snd_pcm_hw_params_t *hwparams;
+ snd_pcm_hw_params_t *hwparams;
- snd_pcm_hw_params_alloca(&hwparams);
+ snd_pcm_hw_params_alloca(&hwparams);
m_wLastError = RA_AOE_NOERR;
- err = snd_pcm_hw_params_any(m_pAlsaPCMHandle, hwparams);
- if (err < 0)
+ err = snd_pcm_hw_params_any(m_pAlsaPCMHandle, hwparams);
+ if (err < 0)
{
- HXLOGL1 ( HXLOG_ADEV, "snd_pcm_hw_params_any: %s", snd_strerror(err));
- m_wLastError = RA_AOE_NOTENABLED;
- }
+ HXLOGL1 ( HXLOG_ADEV, "snd_pcm_hw_params_any: %s", snd_strerror(err));
+ m_wLastError = RA_AOE_NOTENABLED;
+ }
- if (err == 0)
+ if (err >= 0)
{
err = snd_pcm_hw_params_test_rate (m_pAlsaPCMHandle, hwparams, ulSampleRate, 0);
if (err < 0)
_______________________________________________
Audio-dev mailing list
Audio-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/audio-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic