Main Page   Data Structures   File List   Data Fields   Globals  

seq.h

Go to the documentation of this file.
00001 /* FluidSynth - A Software Synthesizer
00002  *
00003  * Copyright (C) 2003  Peter Hanappe and others.
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public License
00007  * as published by the Free Software Foundation; either version 2 of
00008  * the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful, but
00011  * WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *  
00015  * You should have received a copy of the GNU Library General Public
00016  * License along with this library; if not, write to the Free
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018  * 02111-1307, USA
00019  */
00020 
00021 #ifndef _FLUIDSYNTH_SEQ_H
00022 #define _FLUIDSYNTH_SEQ_H
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 
00029 typedef void (*fluid_event_callback_t)(unsigned int time, fluid_event_t* event, 
00030                                       fluid_sequencer_t* seq, void* data);
00031 
00032 
00034 FLUIDSYNTH_API fluid_sequencer_t* new_fluid_sequencer(void);
00035 
00037 FLUIDSYNTH_API void delete_fluid_sequencer(fluid_sequencer_t* seq);
00038 
00045 FLUIDSYNTH_API 
00046 short fluid_sequencer_register_client(fluid_sequencer_t* seq, char* name, 
00047                                      fluid_event_callback_t callback, void* data);
00048 
00050 FLUIDSYNTH_API void fluid_sequencer_unregister_client(fluid_sequencer_t* seq, short id);
00051 
00053 FLUIDSYNTH_API int fluid_sequencer_count_clients(fluid_sequencer_t* seq);
00054 
00056 FLUIDSYNTH_API short fluid_sequencer_get_client_id(fluid_sequencer_t* seq, int index);
00057 
00059 FLUIDSYNTH_API char* fluid_sequencer_get_client_name(fluid_sequencer_t* seq, int id);
00060 
00062 FLUIDSYNTH_API int fluid_sequencer_client_is_dest(fluid_sequencer_t* seq, int id);
00063 
00064 
00065 
00067 FLUIDSYNTH_API void fluid_sequencer_send_now(fluid_sequencer_t* seq, fluid_event_t* evt);
00068 
00069 
00075 FLUIDSYNTH_API 
00076 int fluid_sequencer_send_at(fluid_sequencer_t* seq, fluid_event_t* evt, 
00077                            unsigned int time, int absolute);
00078 
00082 FLUIDSYNTH_API 
00083 void fluid_sequencer_remove_events(fluid_sequencer_t* seq, short source, short dest, int type);
00084 
00085 
00087 FLUIDSYNTH_API unsigned int fluid_sequencer_get_tick(fluid_sequencer_t* seq);
00088 
00091 FLUIDSYNTH_API void fluid_sequencer_set_time_scale(fluid_sequencer_t* seq, double scale);
00092 
00095 FLUIDSYNTH_API double fluid_sequencer_get_time_scale(fluid_sequencer_t* seq);
00096 
00097 // compile in internal traceing functions
00098 #define FLUID_SEQ_WITH_TRACE 0
00099 
00100 #if FLUID_SEQ_WITH_TRACE
00101 FLUIDSYNTH_API char * fluid_seq_gettrace(fluid_sequencer_t* seq);
00102 FLUIDSYNTH_API void fluid_seq_cleartrace(fluid_sequencer_t* seq);
00103 #endif
00104 
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108 
00109 #endif /* _FLUIDSYNTH_SEQ_H */

Generated on Thu Mar 13 19:09:34 2003 for libfluidsynth by doxygen1.2.15