Mercurial > audlegacy-plugins
annotate src/alac/plugin.c @ 2284:d19b53359b24
cleaned up the sndfile wav plugin, currently limiting it ONLY TO WAV
PLAYBACK. if somebody is more experienced with it and wants to restore
the other formats, go ahead (maybe change the name of the plugin too?).
author | mf0102 <0102@gmx.at> |
---|---|
date | Wed, 09 Jan 2008 15:41:22 +0100 |
parents | 1428a79d6706 |
children | ed6c81bd9016 |
rev | line source |
---|---|
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
1 /* |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
2 * Copyright (c) 2005 David Hammerton |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
3 * All rights reserved. |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
4 * |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
5 * Adapted from example program by William Pitcock <nenolod@atheme.org> |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
6 * |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
7 * Permission is hereby granted, free of charge, to any person |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
8 * obtaining a copy of this software and associated documentation |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
9 * files (the "Software"), to deal in the Software without |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
10 * restriction, including without limitation the rights to use, |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
11 * copy, modify, merge, publish, distribute, sublicense, and/or |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
12 * sell copies of the Software, and to permit persons to whom the |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
13 * Software is furnished to do so, subject to the following conditions: |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
14 * |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
15 * The above copyright notice and this permission notice shall be |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
16 * included in all copies or substantial portions of the Software. |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
17 * |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
19 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
20 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
21 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
22 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
24 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
25 * OTHER DEALINGS IN THE SOFTWARE. |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
26 */ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
27 |
330 | 28 #include "config.h" |
29 | |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
30 #include <ctype.h> |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
31 #include <stdio.h> |
330 | 32 |
33 #if HAVE_STDINT_H | |
34 # include <stdint.h> | |
35 #else | |
36 # if HAVE_INTTYPES_H | |
37 # include <inttypes.h> | |
38 # endif | |
39 #endif | |
40 | |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
41 #include <stdlib.h> |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
42 #include <errno.h> |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
43 #include <string.h> |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
44 |
69 | 45 #include <glib.h> |
527
d124034ebea3
[svn] - glib/gi18n.h -> audacious/i18n.h for automatic dgettext support
nenolod
parents:
372
diff
changeset
|
46 #include <audacious/i18n.h> |
69 | 47 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
48 #include <audacious/plugin.h> |
1423
c5bbf2c90ba3
alac: new tuple API
William Pitcock <nenolod@atheme-project.org>
parents:
1395
diff
changeset
|
49 #include <audacious/main.h> |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
50 #include <audacious/output.h> |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
51 #include <audacious/vfs.h> |
69 | 52 #include <audacious/util.h> |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
53 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
54 #include "demux.h" |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
55 #include "decomp.h" |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
56 #include "stream.h" |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
57 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
58 static int input_opened = 0; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
59 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
60 gpointer decode_thread(void *args); |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
61 static GThread *playback_thread; |
66 | 62 static int going = 0; |
91
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
63 static int seek_to = -1; |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
64 |
57
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
65 extern void set_endian(); |
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
66 |
69 | 67 static void alac_about(void) |
68 { | |
69 static GtkWidget *aboutbox; | |
1284
190a447e5229
"About" window is now translatable.
Stany HENRY <StrassBoy@gmail.com>
parents:
1190
diff
changeset
|
70 |
69 | 71 if(aboutbox != NULL) |
72 return; | |
73 | |
1677
f6f5603a0954
xmms_show_message() changed to audacious_info_dialog()
Matti Hamalainen <ccr@tnsp.org>
parents:
1510
diff
changeset
|
74 aboutbox = audacious_info_dialog(_("About Apple Lossless Audio Plugin"), |
1284
190a447e5229
"About" window is now translatable.
Stany HENRY <StrassBoy@gmail.com>
parents:
1190
diff
changeset
|
75 _("Copyright (c) 2006 Audacious team\n" |
190a447e5229
"About" window is now translatable.
Stany HENRY <StrassBoy@gmail.com>
parents:
1190
diff
changeset
|
76 "Portions (c) 2005-2006 David Hammerton <crazney -at- crazney.net>"), |
69 | 77 _("Ok"), FALSE, NULL, NULL); |
78 | |
79 g_signal_connect(G_OBJECT(aboutbox), "destroy", | |
80 G_CALLBACK(gtk_widget_destroyed), | |
81 &aboutbox); | |
82 } | |
83 | |
256 | 84 gboolean is_our_fd(char *filename, VFSFile* input_file) |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
85 { |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
86 demux_res_t demux_res; |
77 | 87 stream_t *input_stream; |
88 | |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
89 input_stream = stream_create_file(input_file, 1); |
57
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
90 |
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
91 set_endian(); |
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
92 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
93 if (!input_stream) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
94 return FALSE; |
1284
190a447e5229
"About" window is now translatable.
Stany HENRY <StrassBoy@gmail.com>
parents:
1190
diff
changeset
|
95 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
96 /* if qtmovie_read returns successfully, the stream is up to |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
97 * the movie data, which can be used directly by the decoder */ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
98 if (!qtmovie_read(input_stream, &demux_res)) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
99 { |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
100 stream_destroy(input_stream); |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
101 return FALSE; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
102 } |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
103 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
104 stream_destroy(input_stream); |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
105 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
106 return TRUE; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
107 } |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
108 |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
109 Tuple *build_aud_tuple_from_demux(demux_res_t *demux_res, char *path) |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
110 { |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
111 Tuple *ti = aud_tuple_new_from_filename(path); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
112 |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
113 if (demux_res->tuple.art != NULL) |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
114 aud_tuple_associate_string(ti, FIELD_ARTIST, NULL, demux_res->tuple.art); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
115 if (demux_res->tuple.nam != NULL) |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
116 aud_tuple_associate_string(ti, FIELD_TITLE, NULL, demux_res->tuple.nam); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
117 if (demux_res->tuple.alb != NULL) |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
118 aud_tuple_associate_string(ti, FIELD_ALBUM, NULL, demux_res->tuple.alb); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
119 if (demux_res->tuple.gen != NULL) |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
120 aud_tuple_associate_string(ti, FIELD_GENRE, NULL, demux_res->tuple.gen); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
121 if (demux_res->tuple.cmt != NULL) |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
122 aud_tuple_associate_string(ti, FIELD_COMMENT, NULL, demux_res->tuple.cmt); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
123 if (demux_res->tuple.day != NULL) |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
124 aud_tuple_associate_int(ti, FIELD_YEAR, NULL, atoi(demux_res->tuple.day)); |
1423
c5bbf2c90ba3
alac: new tuple API
William Pitcock <nenolod@atheme-project.org>
parents:
1395
diff
changeset
|
125 |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
126 aud_tuple_associate_string(ti, FIELD_CODEC, NULL, "Apple Lossless (ALAC)"); |
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
127 aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossless"); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
128 |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
129 return ti; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
130 } |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
131 |
1423
c5bbf2c90ba3
alac: new tuple API
William Pitcock <nenolod@atheme-project.org>
parents:
1395
diff
changeset
|
132 Tuple *build_tuple(char *filename) |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
133 { |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
134 demux_res_t demux_res; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
135 VFSFile *input_file; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
136 stream_t *input_stream; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
137 |
1978 | 138 input_file = aud_vfs_fopen(filename, "rb"); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
139 input_stream = stream_create_file(input_file, 1); |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
140 |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
141 set_endian(); |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
142 |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
143 if (!input_stream) |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
144 { |
1978 | 145 aud_vfs_fclose(input_file); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
146 return NULL; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
147 } |
1284
190a447e5229
"About" window is now translatable.
Stany HENRY <StrassBoy@gmail.com>
parents:
1190
diff
changeset
|
148 |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
149 /* if qtmovie_read returns successfully, the stream is up to |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
150 * the movie data, which can be used directly by the decoder */ |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
151 if (!qtmovie_read(input_stream, &demux_res)) |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
152 { |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
153 stream_destroy(input_stream); |
1978 | 154 aud_vfs_fclose(input_file); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
155 return NULL; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
156 } |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
157 |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
158 stream_destroy(input_stream); |
1978 | 159 aud_vfs_fclose(input_file); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
160 |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
161 return build_aud_tuple_from_demux(&demux_res, filename); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
162 } |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
163 |
561
914c96de3244
[svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents:
559
diff
changeset
|
164 static InputPlayback *playback; |
914c96de3244
[svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents:
559
diff
changeset
|
165 |
559 | 166 static void play_file(InputPlayback *data) |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
167 { |
559 | 168 char *filename = data->filename; |
68
d435a3abc035
[svn] - set alac::going before we fork the decoder thread off, this stops the core from getting confused
nenolod
parents:
67
diff
changeset
|
169 going = 1; |
561
914c96de3244
[svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents:
559
diff
changeset
|
170 playback = data; |
1347
76eee61ed25a
alac: new threading model
William Pitcock <nenolod@atheme-project.org>
parents:
1284
diff
changeset
|
171 playback_thread = g_thread_self(); |
1447
195b5657303e
updated input plugins to use set_pb_ready to signal to the core that they're ready for playback
Giacomo Lozito <james@develia.org>
parents:
1431
diff
changeset
|
172 playback->set_pb_ready(playback); |
1347
76eee61ed25a
alac: new threading model
William Pitcock <nenolod@atheme-project.org>
parents:
1284
diff
changeset
|
173 decode_thread(filename); |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
174 } |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
175 |
559 | 176 static void stop(InputPlayback * data) |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
177 { |
68
d435a3abc035
[svn] - set alac::going before we fork the decoder thread off, this stops the core from getting confused
nenolod
parents:
67
diff
changeset
|
178 going = 0; |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
179 g_thread_join(playback_thread); |
2056
1428a79d6706
remove improper use of output API
William Pitcock <nenolod@atheme.org>
parents:
2055
diff
changeset
|
180 data->output->close_audio(); |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
181 } |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
182 |
559 | 183 static void do_pause(InputPlayback *data, short paused) |
184 { | |
2056
1428a79d6706
remove improper use of output API
William Pitcock <nenolod@atheme.org>
parents:
2055
diff
changeset
|
185 data->output->pause(paused); |
559 | 186 } |
187 | |
188 static void seek(InputPlayback * data, gint time) | |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
189 { |
91
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
190 seek_to = time; |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
191 } |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
192 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
193 static int get_sample_info(demux_res_t *demux_res, uint32_t samplenum, |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
194 uint32_t *sample_duration, |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
195 uint32_t *sample_byte_size) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
196 { |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
197 unsigned int duration_index_accum = 0; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
198 unsigned int duration_cur_index = 0; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
199 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
200 if (samplenum >= demux_res->num_sample_byte_sizes) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
201 return 0; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
202 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
203 if (!demux_res->num_time_to_samples) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
204 return 0; |
67 | 205 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
206 while ((demux_res->time_to_sample[duration_cur_index].sample_count + duration_index_accum) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
207 <= samplenum) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
208 { |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
209 duration_index_accum += demux_res->time_to_sample[duration_cur_index].sample_count; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
210 duration_cur_index++; |
67 | 211 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
212 if (duration_cur_index >= demux_res->num_time_to_samples) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
213 return 0; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
214 } |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
215 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
216 *sample_duration = demux_res->time_to_sample[duration_cur_index].sample_duration; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
217 *sample_byte_size = demux_res->sample_byte_size[samplenum]; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
218 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
219 return 1; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
220 } |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
221 |
57
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
222 void GetBuffer(demux_res_t *demux_res) |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
223 { |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
224 unsigned long destBufferSize = 1024*16; /* 16kb buffer = 4096 frames = 1 alac sample */ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
225 void *pDestBuffer = malloc(destBufferSize); |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
226 int bytes_read = 0; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
227 |
57
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
228 unsigned int buffer_size = 1024*128; |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
229 void *buffer; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
230 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
231 unsigned int i; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
232 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
233 buffer = malloc(buffer_size); |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
234 |
68
d435a3abc035
[svn] - set alac::going before we fork the decoder thread off, this stops the core from getting confused
nenolod
parents:
67
diff
changeset
|
235 for (i = 0; i < demux_res->num_sample_byte_sizes && going == 1; i++) |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
236 { |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
237 uint32_t sample_duration; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
238 uint32_t sample_byte_size; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
239 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
240 int outputBytes; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
241 |
91
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
242 #if 0 |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
243 /* XXX: Horribly inaccurate seek. -nenolod */ |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
244 if (seek_to != -1) |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
245 { |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
246 gulong duration = |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
247 (demux_res->num_sample_byte_sizes * (float)((1024 * demux_res->sample_size) - 1.0) / |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
248 (float)(demux_res->sample_rate / 251)); |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
249 |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
250 i = (duration - seek_to) / demux_res->num_sample_byte_sizes; |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
251 |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
252 g_print("seek to ALAC frame: %d\n", i); |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
253 |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
254 seek_to = -1; |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
255 } |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
256 #endif |
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
257 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
258 /* just get one sample for now */ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
259 if (!get_sample_info(demux_res, i, |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
260 &sample_duration, &sample_byte_size)) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
261 return; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
262 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
263 if (buffer_size < sample_byte_size) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
264 return; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
265 |
77 | 266 stream_read(demux_res->stream, sample_byte_size, buffer); |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
267 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
268 /* now fetch */ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
269 outputBytes = destBufferSize; |
77 | 270 decode_frame(demux_res->alac, buffer, pDestBuffer, &outputBytes); |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
271 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
272 /* write */ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
273 bytes_read += outputBytes; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
274 |
1998
8f3188746b64
chase last changeset in aud
William Pitcock <nenolod@atheme.org>
parents:
1984
diff
changeset
|
275 playback->pass_audio(playback, FMT_S16_LE, demux_res->num_channels, outputBytes, pDestBuffer, &going); |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
276 } |
70 | 277 |
278 free(buffer); | |
279 free(pDestBuffer); | |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
280 } |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
281 |
1074 | 282 static gchar *fmts[] = { "m4a", "alac", NULL }; |
283 | |
284 InputPlugin alac_ip = { | |
285 .description = "Apple Lossless Plugin", | |
286 .about = alac_about, | |
287 .play_file = play_file, | |
288 .stop = stop, | |
289 .pause = do_pause, | |
290 .seek = seek, | |
291 .get_song_tuple = build_tuple, | |
292 .is_our_file_from_vfs = is_our_fd, | |
1979
839804c3b3a4
aud_vfs_extensions -> vfs_extensions, some vtable fixes
William Pitcock <nenolod@atheme.org>
parents:
1978
diff
changeset
|
293 .vfs_extensions = fmts, |
1074 | 294 }; |
295 | |
296 InputPlugin *alac_iplist[] = { &alac_ip, NULL }; | |
297 | |
1395
761e17b23e0c
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
1347
diff
changeset
|
298 DECLARE_PLUGIN(alac, NULL, NULL, alac_iplist, NULL, NULL, NULL, NULL, NULL); |
1074 | 299 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
300 gpointer decode_thread(void *args) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
301 { |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
302 demux_res_t demux_res; |
71 | 303 gulong duration = 0; /* samples added up */ |
77 | 304 VFSFile *input_file; |
305 stream_t *input_stream; | |
1423
c5bbf2c90ba3
alac: new tuple API
William Pitcock <nenolod@atheme-project.org>
parents:
1395
diff
changeset
|
306 Tuple *ti; |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
307 gchar *title; |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
308 |
85 | 309 memset(&demux_res, 0, sizeof(demux_res)); |
78 | 310 |
57
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
311 set_endian(); |
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
312 |
1978 | 313 input_file = aud_vfs_fopen((char *) args, "rb"); |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
314 input_stream = stream_create_file(input_file, 1); |
57
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
315 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
316 if (!input_stream) |
91
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
317 return NULL; |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
318 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
319 /* if qtmovie_read returns successfully, the stream is up to |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
320 * the movie data, which can be used directly by the decoder */ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
321 if (!qtmovie_read(input_stream, &demux_res)) |
91
6e1002ea4ded
[svn] - some seek code (can't be implemented right now though)
nenolod
parents:
85
diff
changeset
|
322 return NULL; |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
323 |
78 | 324 demux_res.stream = input_stream; |
325 | |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
326 /* Get the titlestring ready. */ |
1976
5fa26178eaef
s/tuple_/aud_tuple_/g
William Pitcock <nenolod@atheme.org>
parents:
1973
diff
changeset
|
327 ti = build_aud_tuple_from_demux(&demux_res, (char *) args); |
2055 | 328 title = aud_tuple_formatter_make_title_string(ti, aud_get_gentitle_format()); |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
329 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
330 /* initialise the sound converter */ |
77 | 331 demux_res.alac = create_alac(demux_res.sample_size, demux_res.num_channels); |
332 alac_set_info(demux_res.alac, demux_res.codecdata); | |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
333 |
71 | 334 /* Sample rates are multiples of 251?! Apple is *fucking* *insane*! -nenolod */ |
335 duration = (demux_res.num_sample_byte_sizes * (float)((1024 * demux_res.sample_size) - 1.0) / | |
336 (float)(demux_res.sample_rate / 251)); | |
337 | |
561
914c96de3244
[svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents:
559
diff
changeset
|
338 playback->output->open_audio(FMT_S16_LE, demux_res.sample_rate, demux_res.num_channels); |
1984
489e32a8e106
change some places to use set_params() instead of set_info() directly
William Pitcock <nenolod@atheme.org>
parents:
1979
diff
changeset
|
339 playback->set_params(playback, title, duration, -1, demux_res.sample_rate, demux_res.num_channels); |
57
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
340 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
341 /* will convert the entire buffer */ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
342 GetBuffer(&demux_res); |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
343 |
66 | 344 going = 0; |
345 | |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
346 stream_destroy(input_stream); |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
347 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
348 if (input_opened) |
1978 | 349 aud_vfs_fclose(input_file); |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
350 |
561
914c96de3244
[svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents:
559
diff
changeset
|
351 playback->output->close_audio(); |
57
96901271d2e2
[svn] - fix crashing. works on my x64 box, static on bigendian (tested: x64-be, mips, ppc64)
nenolod
parents:
56
diff
changeset
|
352 |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
353 return NULL; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
354 } |