Files
nunuhara_xsystem4/include/id_pool.h
T
Nunuhara Cabbage fc8e7eee22 Replace SDL_mixer with libsndfile + sts_mixer
Replace SDL_mixer with an audio implementation using libsndfile,
sts_mixer (a single-file header library) and SDL's basic audio
interface.

This allows for much more flexibility in controlling audio playback.
Fading is now properly implemented, as well as various other functions
from the SACT2/KiwiSoundEngine interface.

sts_mixer can support recursive mixing, so it will be possible to
implement the "VolumeValancer" mixer channels specified in
System40.ini in the future (once I figure out how the mapping of audio
files to mixer channels is supposed to work).
2021-09-30 22:07:04 -07:00

32 lines
1.1 KiB
C

/* Copyright (C) 2019 Nunuhara Cabbage <nunuhara@haniwa.technology>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://gnu.org/licenses/>.
*/
#ifndef SYSTEM4_ID_POOL_H
#define SYSTEM4_ID_POOL_H
struct id_pool {
void **slots;
int nr_slots;
};
void id_pool_init(struct id_pool *pool);
void id_pool_release(struct id_pool *pool, int id);
int id_pool_get_unused(struct id_pool *pool);
void *id_pool_get(struct id_pool *pool, int id);
void *id_pool_set(struct id_pool *pool, int id, void *data);
#endif /* SYSTEM4_ID_POOL_H */