summaryrefslogtreecommitdiff
path: root/src/ogg.h
blob: 88544bb141ae22caa70ee7d5e70f83e5a8de46aa (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
/*
** Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
**
** This program is free software ; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by
** the Free Software Foundation ; either version 2.1 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 Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser 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 SF_SRC_OGG_H

enum
{	OGG_ANNODEX = 300,
	OGG_ANXDATA,
	OGG_FLAC,
	OGG_FLAC0,
	OGG_PCM,
	OGG_SPEEX,
	OGG_VORBIS,
} ;

typedef struct
{	/* Sync and verify incoming physical bitstream */
	ogg_sync_state osync ;
	/* Take physical pages, weld into a logical stream of packets */
	ogg_stream_state ostream ;
	/* One Ogg bitstream page.  Vorbis packets are inside */
	ogg_page opage ;
	/* One raw packet of data for decode */
	ogg_packet opacket ;
	int eos ;
	int codec ;
} OGG_PRIVATE ;


#define readint(buf, base) (((buf [base + 3] << 24) & 0xff000000) | \
								((buf [base + 2] <<16) & 0xff0000) | \
								((buf [base + 1] << 8) & 0xff00) | \
								(buf [base] & 0xff))



#endif /* SF_SRC_OGG_H */