mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
avoid the weird usage of assert() in the ALSA header files that gcc 4.2 wants to complain about
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -367,7 +367,8 @@ static snd_pcm_t *alsa_card_init(char *dev, snd_pcm_stream_t stream)
|
||||
} else
|
||||
ast_log(LOG_DEBUG, "Opening device %s in %s mode\n", dev, (stream == SND_PCM_STREAM_CAPTURE) ? "read" : "write");
|
||||
|
||||
snd_pcm_hw_params_alloca(&hwparams);
|
||||
hwparams = alloca(snd_pcm_hw_params_sizeof());
|
||||
memset(hwparams, 0, snd_pcm_hw_params_sizeof());
|
||||
snd_pcm_hw_params_any(handle, hwparams);
|
||||
|
||||
err = snd_pcm_hw_params_set_access(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED);
|
||||
@@ -416,7 +417,8 @@ static snd_pcm_t *alsa_card_init(char *dev, snd_pcm_stream_t stream)
|
||||
if (err < 0)
|
||||
ast_log(LOG_ERROR, "Couldn't set the new hw params: %s\n", snd_strerror(err));
|
||||
|
||||
snd_pcm_sw_params_alloca(&swparams);
|
||||
swparams = alloca(snd_pcm_sw_params_sizeof());
|
||||
memset(swparams, 0, snd_pcm_sw_params_sizeof());
|
||||
snd_pcm_sw_params_current(handle, swparams);
|
||||
|
||||
#if 1
|
||||
|
Reference in New Issue
Block a user