[quake2] Release 0.16
Brendan Burns
brendanburns at comcast.net
Mon Jan 3 15:58:48 EST 2005
Thanks, I'll add this into CVS...
--brendan
On Jan 3, 2005, at 9:19 AM, Fabrice Colin wrote:
> Hello,
>
> On Sa, 2005-01-01 at 23:19 -0500, Brendan Burns wrote:
> > Hey folks,
> > I've posted an official release 0.16 on the web-site. I think alsa
> > sound is working and all mouse bugs are fixed. I tried connecting
> to
> > a multi-player game and mouse worked fine, including inversion...
> > Please try it out and let me know if problems persist.
>
> I tried to build the source on Fedora Core 3 with ALSA support turned
> on
> and had to make a couple of changes to src/linux/snd_alsa.c to get the
> source to compile.
> The errors centered on snd_pcm_hw_params_get_buffer_size(). FC3 comes
> with ALSA 1.0.6. I have attached a patch.
>
> I hope this helps.
>
> Fabrice
>
> --- src/linux/snd_alsa.c 2005-01-03 13:33:43.120714240 +0000
> +++ src/linux/snd_alsa.c 2005-01-03 13:42:26.266184040 +0000
> @@ -26,9 +26,9 @@
>
> #include "../client/client.h"
> #include "../client/snd_loc.h"
> -#define snd_buf (dma.samples * 2)
>
> -static int snd_inited;
> +static int snd_buf;
> +static int snd_inited;
> static short *buffer;
>
> static snd_pcm_t *playback_handle;
> @@ -45,7 +45,7 @@
> {
> int i;
> int err;
> - int buffersize;
> + snd_pcm_uframes_t buffersize;
> int framesize;
> int format;
>
> @@ -156,8 +156,13 @@
> return 0;
> }
>
> - buffer_size = snd_pcm_hw_params_get_buffer_size(hw_params);
> - frame_size = (snd_pcm_format_physical_width(format)*dma.channels)/8;
> + err = snd_pcm_hw_params_get_buffer_size(hw_params, &buffersize);
> + if (err < 0) {
> + Com_Printf("ALSA snd error couldn't get buffer size
> (%s).\n",snd_strerror(err));
> + snd_pcm_hw_params_free(hw_params);
> + return 0;
> + }
> + framesize = (snd_pcm_format_physical_width(format)*dma.channels)/8;
>
> snd_pcm_hw_params_free(hw_params);
> hw_params = NULL;
> @@ -167,7 +172,7 @@
> return 0;
> }
>
> - snd_buf = buffer_size*frame_size;
> + snd_buf = buffersize*framesize;
>
>
> buffer=malloc(snd_buf);
>
>
More information about the quake2
mailing list