Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 142509
Collapse All | Expand All

(-)src/backends/alc_backend_bsd.c.orig (-6 / +22 lines)
Lines 9-15 Link Here
9
 */
9
 */
10
#include "al_siteconfig.h"
10
#include "al_siteconfig.h"
11
11
12
#define __BSD_VISIBLE 1
13
12
#include <AL/al.h>
14
#include <AL/al.h>
15
#include <AL/alext.h>
13
#include <assert.h>
16
#include <assert.h>
14
#include <fcntl.h>
17
#include <fcntl.h>
15
#include <sys/soundcard.h>
18
#include <sys/soundcard.h>
Lines 113-119 Link Here
113
 */
114
 */
114
static void *grab_write_native(void) {
115
static void *grab_write_native(void) {
115
	int divisor = _alSpot(_AL_DEF_BUFSIZ) | (2<<16);
Lines 126-135 Link Here
126
	if(ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
127
		perror("ioctl SETFRAGMENT");
128
	}
129
Lines 318-327 Link Here
318
}
314
}
319
static ALboolean set_write_native(UNUSED(void *handle),
315
static ALboolean set_write_native(UNUSED(void *handle),
320
				  UNUSED(unsigned int *bufsiz),
316
				  unsigned int *bufsiz,
317
	int divisor;
Lines 363-368 Link Here
360
361
	if(ioctl(dsp_fd, SNDCTL_DSP_GETBLKSIZE, bufsiz) < 0) {
362
#ifdef DEBUG_MAXIMUS
363
		fprintf(stderr, "blksize %d\n", *bufsiz);
364
		perror("get_devsp blksize ioctl");
365
#endif
366
		return AL_FALSE;
367
	}
368
369
	divisor = _alSpot(*bufsiz) | (2<<16);
370
	if(ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
371
#ifdef DEBUG_MAXIMUS
372
		fprintf(stderr, "divisor %d\n", divisor);
373
		perror("set_devsp fragment ioctl");
374
#endif
375
		return AL_FALSE;
376
	}
363
}
377
}

Return to bug 142509