Capsim Block Documentation
This star selects one of two input data channels to output.
| Num | Description | Type | Name | Default Value | |
|---|---|---|---|---|---|
| 0 | Time in samples to switch to channel 1 from 0 | int | switch_time | 0 |
| Num | Type | Name | Initial Value | Description |
|---|---|---|---|---|
| 0 | int | inbufs | ||
| 1 | int | outbufs | ||
| 2 | int | timer | switch_time |
int i,j; |
|---|
if((inbufs = NO_INPUT_BUFFERS()) != 2
|| (outbufs = NO_OUTPUT_BUFFERS()) < 1) {
fprintf(stderr,"mux: i/o buffers connect problem\n");
return(1);
}
|
|---|
for(i=0; i |
|---|
/* Capsim (r) Text Mode Kernel (TMK) Star Library (Blocks)
Copyright (C) 1989-2002 XCAD Corporation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
http://capsimtmk.sourceforge.net
XCAD Corporation
Raleigh, North Carolina */
|
|---|
/* toggle.s */ /********************************************************************** toggle() *********************************************************************** This star selects one of two input data channels to output. It always begins with channel 0. After a delay, it switches to ch.1. Parameter 1 selects the number of samples of ch.0 to output before switching to ch.1. Note: Both input buffers are incremented (it_in) at each time, whether their sample is chosen for output or not. The output supports auto-fanout (automatic "forking"). |
|---|