annotate Plugins/Input/mpg123/interface.c @ 1472:04cdccf13105 trunk

[svn] - reset real_ip<InputPlugin *> when we are done with it
author nenolod
date Wed, 02 Aug 2006 22:28:10 -0700
parents 705d4c089fce
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1091
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
1 /*
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
2 * libmpgdec: An advanced MPEG 1/2/3 decoder engine.
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
3 * interface.c: library interfaces
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
4 *
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
5 * Copyright (c) 2005-2006 William Pitcock <nenolod@nenolod.net>
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
6 * Portions copyright (C) 1999 Michael Hipp
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
7 *
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
11 * (at your option) any later version.
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
12 *
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
16 * GNU General Public License for more details.
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
17 *
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
1459
705d4c089fce [svn] Fix postal code.
chainsaw
parents: 1458
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1091
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
21 */
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
22
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
23 #include "common.h"
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
24
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1091
diff changeset
25 static const long outscale = 32768;
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1091
diff changeset
26
1091
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
27 mpgdec_t *global_ins;
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
28
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
29 mpgdec_t *mpgdec_new(void)
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
30 {
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
31 mpgdec_t *ins = g_malloc0(sizeof(mpgdec_t));
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
32
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
33 /* yeah i know this is cheating */
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
34 global_ins = ins;
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1091
diff changeset
35
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1091
diff changeset
36 mpgdec_make_decode_tables(outscale);
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1091
diff changeset
37 psycho_init();
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1091
diff changeset
38
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 1091
diff changeset
39 return ins;
1091
ecdd6a7cafed [svn] - more stuff
nenolod
parents:
diff changeset
40 }