mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
Argh.
This commit is contained in:
parent
c09420da6b
commit
459503e61b
2 changed files with 3 additions and 9 deletions
|
@ -37,7 +37,7 @@
|
||||||
QF_ALSA_NEED (int, snd_pcm_close, (snd_pcm_t *pcm))
|
QF_ALSA_NEED (int, snd_pcm_close, (snd_pcm_t *pcm))
|
||||||
QF_ALSA_NEED (int, snd_pcm_hw_params, (snd_pcm_t *pcm, snd_pcm_hw_params_t *params))
|
QF_ALSA_NEED (int, snd_pcm_hw_params, (snd_pcm_t *pcm, snd_pcm_hw_params_t *params))
|
||||||
QF_ALSA_NEED (int, snd_pcm_hw_params_any, (snd_pcm_t *pcm, snd_pcm_hw_params_t *params))
|
QF_ALSA_NEED (int, snd_pcm_hw_params_any, (snd_pcm_t *pcm, snd_pcm_hw_params_t *params))
|
||||||
#if SND_LIB_MAJOR < 1
|
#if SND_LIB_MAJOR < 1 && SND_LIB_MINOR >=9 && SND_LIB_SUBMINOR < 8
|
||||||
QF_ALSA_NEED (snd_pcm_sframes_t, snd_pcm_hw_params_get_buffer_size, (const snd_pcm_hw_params_t *params))
|
QF_ALSA_NEED (snd_pcm_sframes_t, snd_pcm_hw_params_get_buffer_size, (const snd_pcm_hw_params_t *params))
|
||||||
QF_ALSA_NEED (snd_pcm_sframes_t, snd_pcm_hw_params_get_period_size, (const snd_pcm_hw_params_t *params, int *dir))
|
QF_ALSA_NEED (snd_pcm_sframes_t, snd_pcm_hw_params_get_period_size, (const snd_pcm_hw_params_t *params, int *dir))
|
||||||
QF_ALSA_NEED (int, snd_pcm_hw_params_set_access, (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t val))
|
QF_ALSA_NEED (int, snd_pcm_hw_params_set_access, (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t val))
|
||||||
|
|
|
@ -261,18 +261,12 @@ SNDDMA_Init (void)
|
||||||
memset ((dma_t *) &sn, 0, sizeof (sn));
|
memset ((dma_t *) &sn, 0, sizeof (sn));
|
||||||
sn.splitbuffer = 0;
|
sn.splitbuffer = 0;
|
||||||
sn.channels = stereo + 1;
|
sn.channels = stereo + 1;
|
||||||
qfsnd_pcm_hw_params_get_period_size (hw, (snd_pcm_uframes_t *)
|
sn.submission_chunk = qfsnd_pcm_hw_params_get_period_size (hw, 0);
|
||||||
&sn.submission_chunk, 0);
|
|
||||||
// don't mix less than this
|
// don't mix less than this
|
||||||
sn.samplepos = 0; // in mono samples
|
sn.samplepos = 0; // in mono samples
|
||||||
sn.samplebits = bps;
|
sn.samplebits = bps;
|
||||||
|
|
||||||
err = qfsnd_pcm_hw_params_get_buffer_size (hw, &buffer_size);
|
buffer_size = qfsnd_pcm_hw_params_get_buffer_size (hw);
|
||||||
if (0 > err) {
|
|
||||||
Sys_Printf ("ALSA: Unable to get buffer size for playback: %s\n",
|
|
||||||
qfsnd_strerror (err));
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
sn.samples = buffer_size * sn.channels; // mono samples in buffer
|
sn.samples = buffer_size * sn.channels; // mono samples in buffer
|
||||||
sn.speed = rate;
|
sn.speed = rate;
|
||||||
|
|
Loading…
Reference in a new issue