Main Page   Compound List   File List   Compound Members   File Members  

cslsample.h

Go to the documentation of this file.
00001 /* CSL - Common Sound Layer
00002  * Copyright (C) 2000-2001 Stefan Westerfeld and Tim Janik
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General
00015  * Public License along with this library; if not, write to the
00016  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
00017  * Boston, MA 02111-1307, USA.
00018  */
00019 #ifndef __CSL_SAMPLE_H__
00020 #define __CSL_SAMPLE_H__
00021 
00022 
00023 #include        <csl/csldefs.h>
00024 #include        <csl/cslmain.h>
00025 #include        <csl/cslutils.h>
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif /* __cplusplus */
00030 
00036 typedef struct _CslSample       CslSample;
00037 
00038 
00039 /* --- CSL Sample API --- */
00040 CslErrorType    csl_sample_new            (CslDriver      *driver,
00041                                            const char     *name,
00042                                            const char     *role,
00043                                            const char     *title,
00044                                            CslSample     **sample_p);
00045 void            csl_sample_release        (CslSample      *sample);
00046 CslErrorType    csl_sample_new_from_file  (CslDriver      *driver, 
00047                                            const char     *filename,
00048                                            const char     *role,
00049                                            const char     *title,
00050                                            CslSample     **sample_p);
00051 CslErrorType    csl_sample_new_from_cache (CslDriver      *driver,
00052                                            const char     *name,
00053                                            const char     *role,
00054                                            const char     *title,
00055                                            CslSample     **sample_p);
00056 int             csl_sample_write          (CslSample      *sample,
00057                                            unsigned int    n_bytes,
00058                                            void           *bytes);
00059 CslErrorType    csl_sample_write_done     (CslSample      *sample);
00060 CslErrorType    csl_sample_cache_add      (CslSample      *sample);
00061 CslErrorType    csl_sample_cache_remove   (CslSample      *sample);
00062 
00063 /* palying samples */
00064 CslErrorType    csl_sample_play           (CslSample      *sample);
00065 CslBool         csl_sample_is_playing     (CslSample      *sample);
00066 CslErrorType    csl_sample_stop           (CslSample      *sample);
00067 CslErrorType    csl_sample_wait_done      (CslSample      *sample);
00068 
00069 
00070 #ifdef __cplusplus
00071 }
00072 #endif /* __cplusplus */
00073 
00074 #endif /* __CSL_SAMPLE_H__ */
00075 
00076 /* vim:ts=8:sw=2:sts=2
00077  */

Generated at Wed Jun 6 17:51:41 2001 for CSL by doxygen1.2.8 written by Dimitri van Heesch, © 1997-2001