sound.c (39004e693d9164594ded4ed8ef48c6bcb25ebf1c) sound.c (bd18f3340844b7bf72499464ee51572b9a48c7e5)
1/*
2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
3 * (C) 1997 Luigi Rizzo (luigi@iet.unipi.it)
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

178 if (sz > 0) {
179 d->aplay = (pcm_channel **)malloc(sz, M_DEVBUF, M_NOWAIT);
180 if (!d->aplay) goto no;
181 bzero(d->aplay, sz);
182
183 d->arec = (pcm_channel **)malloc(sz, M_DEVBUF, M_NOWAIT);
184 if (!d->arec) goto no;
185 bzero(d->arec, sz);
1/*
2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
3 * (C) 1997 Luigi Rizzo (luigi@iet.unipi.it)
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

178 if (sz > 0) {
179 d->aplay = (pcm_channel **)malloc(sz, M_DEVBUF, M_NOWAIT);
180 if (!d->aplay) goto no;
181 bzero(d->aplay, sz);
182
183 d->arec = (pcm_channel **)malloc(sz, M_DEVBUF, M_NOWAIT);
184 if (!d->arec) goto no;
185 bzero(d->arec, sz);
186
187 sz = (numplay + numrec) * sizeof(int);
188 d->ref = (int *)malloc(sz, M_DEVBUF, M_NOWAIT);
189 if (!d->ref) goto no;
190 bzero(d->ref, sz);
186 }
187
188 if (numplay > 0) {
189 d->play = (pcm_channel *)malloc(numplay * sizeof(pcm_channel),
190 M_DEVBUF, M_NOWAIT);
191 if (!d->play) goto no;
192 bzero(d->play, numplay * sizeof(pcm_channel));
193 }

--- 286 unchanged lines hidden ---
191 }
192
193 if (numplay > 0) {
194 d->play = (pcm_channel *)malloc(numplay * sizeof(pcm_channel),
195 M_DEVBUF, M_NOWAIT);
196 if (!d->play) goto no;
197 bzero(d->play, numplay * sizeof(pcm_channel));
198 }

--- 286 unchanged lines hidden ---