| 1 | /* |
| 2 | pools.h: |
| 3 | |
| 4 | Copyright (C) 2013 by Victor Lazzarini |
| 5 | |
| 6 | This file is part of Csound. |
| 7 | |
| 8 | The Csound Library is free software; you can redistribute it |
| 9 | and/or modify it under the terms of the GNU Lesser General Public |
| 10 | License as published by the Free Software Foundation; either |
| 11 | version 2.1 of the License, or (at your option) any later version. |
| 12 | |
| 13 | Csound is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU Lesser General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU Lesser General Public |
| 19 | License along with Csound; if not, write to the Free Software |
| 20 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
| 21 | 02110-1301 USA |
| 22 | */ |
| 23 | |
| 24 | #ifndef POOLS_H |
| 25 | #define POOLS_H |
| 26 | |
| 27 | #define POOL_SIZE 256 |
| 28 | |
| 29 | typedef struct myflt_pool { |
| 30 | CS_VAR_MEM* values; |
| 31 | int max; |
| 32 | int count; |
| 33 | } MYFLT_POOL; |
| 34 | |
| 35 | MYFLT_POOL* myflt_pool_create(CSOUND* csound); |
| 36 | int myflt_pool_indexof(MYFLT_POOL* pool, MYFLT value); |
| 37 | int myflt_pool_find_or_add(CSOUND* csound, MYFLT_POOL* pool, MYFLT value); |
| 38 | int myflt_pool_find_or_addc(CSOUND* csound, MYFLT_POOL* pool, char* s); |
| 39 | void myflt_pool_free(CSOUND *csound, MYFLT_POOL *pool); |
| 40 | |
| 41 | #endif |
| 42 |