Deleted Added
full compact
buffer.c (107237) buffer.c (109623)
1/*
2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <dev/sound/pcm/sound.h>
28
29#include "feeder_if.h"
30
1/*
2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <dev/sound/pcm/sound.h>
28
29#include "feeder_if.h"
30
31SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/buffer.c 107237 2002-11-25 17:17:43Z cg $");
31SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pcm/buffer.c 109623 2003-01-21 08:56:16Z alfred $");
32
33#define MIN(x, y) (((x) < (y))? (x) : (y))
34
35#define SNDBUF_NAMELEN 48
36struct snd_dbuf {
37 device_t dev;
38 u_int8_t *buf, *tmpbuf;
39 unsigned int bufsize, maxsize;

--- 13 unchanged lines hidden (view full) ---

53 char name[SNDBUF_NAMELEN];
54};
55
56struct snd_dbuf *
57sndbuf_create(device_t dev, char *drv, char *desc)
58{
59 struct snd_dbuf *b;
60
32
33#define MIN(x, y) (((x) < (y))? (x) : (y))
34
35#define SNDBUF_NAMELEN 48
36struct snd_dbuf {
37 device_t dev;
38 u_int8_t *buf, *tmpbuf;
39 unsigned int bufsize, maxsize;

--- 13 unchanged lines hidden (view full) ---

53 char name[SNDBUF_NAMELEN];
54};
55
56struct snd_dbuf *
57sndbuf_create(device_t dev, char *drv, char *desc)
58{
59 struct snd_dbuf *b;
60
61 b = malloc(sizeof(*b), M_DEVBUF, M_WAITOK | M_ZERO);
61 b = malloc(sizeof(*b), M_DEVBUF, M_ZERO);
62 snprintf(b->name, SNDBUF_NAMELEN, "%s:%s", drv, desc);
63 b->dev = dev;
64
65 return b;
66}
67
68void
69sndbuf_destroy(struct snd_dbuf *b)

--- 596 unchanged lines hidden ---
62 snprintf(b->name, SNDBUF_NAMELEN, "%s:%s", drv, desc);
63 b->dev = dev;
64
65 return b;
66}
67
68void
69sndbuf_destroy(struct snd_dbuf *b)

--- 596 unchanged lines hidden ---