1/*- 2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org> 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/feeder.c 170815 2007-06-16 03:37:28Z ariff $"); |
32 33MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); 34 35#define MAXFEEDERS 256 36#undef FEEDER_DEBUG 37 38int feeder_buffersize = FEEDBUFSZ; 39TUNABLE_INT("hw.snd.feeder_buffersize", &feeder_buffersize); --- 823 unchanged lines hidden (view full) --- 863 offset); 864 if (l > 0) 865 sndbuf_dispose(src, buffer + offset, l); 866 else 867 ch->feedcount--; 868 } else { 869 if (l > 0) 870 sndbuf_dispose(src, buffer, l); |
871 memset(buffer + l, 872 sndbuf_zerodata(sndbuf_getfmt(src)), 873 offset); 874 if (!(ch->flags & CHN_F_CLOSING)) 875 ch->xruns++; |
876 } 877 } else if (l > 0) 878 sndbuf_dispose(src, buffer, l); 879 880 return count; 881} 882 883static kobj_method_t feeder_root_methods[] = { --- 13 unchanged lines hidden --- |