/* * GRacer * * Copyright (C) 1999 Takashi Matsuda * * 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, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __GRACER_SOUND_H__ #define __GRACER_SOUND_H__ #include "tcldefs.h" #ifdef __cplusplus extern "C" { #endif typedef void *GrSample; typedef void *GrEnvelope; typedef enum { GR_SAMPLE_LOOP, GR_SAMPLE_ONE_SHOT, } GrReplayMode; typedef enum { GR_ENVELOPE_PITCH, GR_ENVELOPE_VOLUME, } GrEnvelopeType; int Sound_Init (Tcl_Interp *interp); int gr_sound_update (void); GrSample gr_sample_new (char *filename); void gr_sample_free (GrSample sample); void gr_sample_adjust_volume (GrSample sample, float volume); void gr_sample_play (GrSample sample, int magic); void gr_sample_loop (GrSample sample, int magic); void gr_sample_stop (GrSample sample, int magic); void gr_sample_pause (GrSample sample, int magic); void gr_sample_resume (GrSample sample, int magic); GrEnvelope gr_envelope_new (int num_step, GrReplayMode mode); void gr_envelope_free (GrEnvelope envelope); void gr_envelope_set_step (GrEnvelope envelope, int step, float _time, float _value); void gr_sample_add_envelope (GrSample sample, int magic, int slot, GrEnvelope envelope, GrEnvelopeType type); #ifdef __cplusplus } #endif #endif /* __GRACER_SOUND_H__ */