[xwax-devel] fix for old hardware
Brought to you by:
hills
From: Anonymous x. lover,
\) <int...@bl...> - 2013-11-30 17:36:25
|
------------------------------------------------------------------------ -------------------------------- This email was sent via Anonymous email service for free. YOU CAN REMOVE THIS TEXT MESSAGE BY BEING A PAID MEMBER FOR $10/year. <http://bit.ly/k37rpz> CLICK HERE => <http://bit.ly/k37rpz> Message ID= 65626 ------------------------------------------------------------------------ -------------------------------- Hello all, A while ago I was having lots of fun with xwax on 14 year old hardware and tinycore linux... I needed the following code to get my old soundblaster working and thought it would make a good addition to the xwax project - which is absolutely ruddy fantastic!!!!!!! ... --- alsa.c_ORIG 2013-05-16 10:41:35.748290888 +0100 +++ alsa.c 2013-05-16 10:41:35.748290888 +0100 @@ -120,10 +120,17 @@ static int pcm_open(struct alsa_pcm *als dir = 1; r = snd_pcm_hw_params_set_periods_min(alsa->pcm, hw_params, &p, &dir); if (r < 0) { - alsa_error("hw_params_set_periods_min", r); - fprintf(stderr, "Buffer of %dms may be too small for this hardware.\n", - buffer_time); - return -1; + p--; + r = snd_pcm_hw_params_set_periods_min(alsa->pcm, hw_params, &p, &dir); + if (r < 0) { + alsa_error("hw_params_set_periods_min", r); + fprintf(stderr, "Buffer of %dms may be too small for this hardware.\n", + buffer_time); + return -1; + } + else { + fprintf(stderr, "Could not enable double buffering for this hardware.\n"); + } } r = snd_pcm_hw_params(alsa->pcm, hw_params); ... All the best, Anonymous xwax lover ;) ------------------------------------------------------------------------ -------------------------------- This email was sent via Anonymous email service for free. YOU CAN REMOVE THIS TEXT MESSAGE BY BEING A PAID MEMBER FOR $10/year. <http://bit.ly/k37rpz> CLICK HERE => <http://bit.ly/k37rpz> Message ID= 65626 ------------------------------------------------------------------------ -------------------------------- |