summaryrefslogtreecommitdiffstats
path: root/branches/lydia/sndfile_decoder.h
blob: 76fbb1e5ad3076d3e071357eb28f62a27cf81d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* MuSE - Multiple Streaming Engine
 * Copyright (C) 2004 Angelo Michele Failla aka pallotron <pallotron@freaknet.org>
 *
 * This source code is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Public License as published 
 * by the Free Software Foundation; either version 2 of the License,
 * or (at your option) any later version.
 *
 * This source code 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.
 * Please refer to the GNU Public License for more details.
 *
 * You should have received a copy of the GNU Public License along with
 * this source code; if not, write to:
 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

/**
   @file dec_ogg.h libsnd decoder
   @desc input channel: decoder implemenation
*/

#ifndef __IN_SND_H__
#define __IN_SND_H__

#include <sound_decoder.h>
#include <linklist.h>

/* libsndfile inclusion */
#include <sndfile.h>

/**
   TODO: commento da scrivere
   @class MuseDecSndFile
   @brief SndFile decoder
*/
class MuseDecSndFile: public MuseDec, Entry {
			
	public:
		/* TODO: scrivere il commento per la doc */
		MuseDecSndFile (); /* constructor */
		~MuseDecSndFile (); /* destructor */

		int load (char *file);
		bool seek (float pos);

		IN_DATATYPE *get_audio ();

	private:
		/* pointer to data */
		SNDFILE *sf;
		/* file information struct */
		SF_INFO sf_info_struct;		
		short snd_buffer[IN_CHUNK];

};

#endif