dec_snd.h Source File

Main Page Modules Class Hierarchy Compound List File List Compound Members File Members

# dec_snd.h

    00001 /* MuSE - Multiple Streaming Engine
    00002  * Copyright (C) 2004 Angelo Michele Failla aka pallotron <pallotron@freaknet.org>
    00003  *
    00004  * This source code is free software; you can redistribute it and/or
    00005  * modify it under the terms of the GNU Public License as published
    00006  * by the Free Software Foundation; either version 2 of the License,
    00007  * or (at your option) any later version.
    00008  *
    00009  * This source code 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.
    00012  * Please refer to the GNU Public License for more details.
    00013  *
    00014  * You should have received a copy of the GNU Public License along with
    00015  * this source code; if not, write to:
    00016  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00017  *
    00018  */
    00019
    00025 #ifndef __IN_SND_H__
    00026 #define __IN_SND_H__
    00027
    00028 #include <config.h>
    00029
    00030 #ifdef HAVE_SNDFILE
    00031
    00032 #include <decoder.h>
    00033
    00034 /* libsndfile inclusion */
    00035 #include <sndfile.h>
    00036
    00042 class MuseDecSndFile:public MuseDec
    00043 {
    00044         private:
    00045                 /* pointer to data */
    00046                 SNDFILE *sf;
    00047                 /* file information struct */
    00048                 SF_INFO sf_info_struct;
    00049                 short snd_buffer[IN_CHUNK];
    00050
    00051         public:
    00052                 /* TODO: scrivere il commento per la doc */
    00053                 MuseDecSndFile (); /* constructor */
    00054                 ~MuseDecSndFile (); /* destructor */
    00055
    00056                 int load (char *file);
    00057                 bool seek (float pos);
    00058
    00059                 IN_DATATYPE *get_audio ();
    00060
    00061 };
    00062
    00063 #endif /* HAVE SNDFILE */
    00064 #endif