1246
|
1 /*
|
|
2 * A FLAC decoder plugin for the Audacious Media Player
|
|
3 * Copyright (C) 2005 Ralf Ertzinger
|
|
4 *
|
|
5 * This program is free software; you can redistribute it and/or modify
|
|
6 * it under the terms of the GNU General Public License as published by
|
|
7 * the Free Software Foundation; either version 2 of the License, or
|
|
8 * (at your option) any later version.
|
|
9 *
|
|
10 * This program is distributed in the hope that it will be useful,
|
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 * GNU General Public License for more details.
|
|
14 *
|
|
15 * You should have received a copy of the GNU General Public License
|
|
16 * along with this program; if not, write to the Free Software
|
|
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
18 */
|
|
19
|
|
20 #include <FLAC/all.h>
|
|
21 #include "flac_compat112.h"
|
|
22 #include "debug.h"
|
|
23
|
|
24 #if !defined(FLAC_API_VERSION_CURRENT)
|
|
25
|
|
26 FLAC__SeekableStreamDecoderState FLAC__stream_decoder_init_stream(
|
|
27 FLAC__SeekableStreamDecoder* decoder,
|
|
28 FLAC__SeekableStreamDecoderReadCallback read_callback,
|
|
29 FLAC__SeekableStreamDecoderSeekCallback seek_callback,
|
|
30 FLAC__SeekableStreamDecoderTellCallback tell_callback,
|
|
31 FLAC__SeekableStreamDecoderLengthCallback length_callback,
|
|
32 FLAC__SeekableStreamDecoderEofCallback eof_callback,
|
|
33 FLAC__SeekableStreamDecoderWriteCallback write_callback,
|
|
34 FLAC__SeekableStreamDecoderMetadataCallback metadata_callback,
|
|
35 FLAC__SeekableStreamDecoderErrorCallback error_callback,
|
|
36 void * client_data) {
|
|
37
|
|
38 FLAC__SeekableStreamDecoderState ret;
|
|
39
|
|
40 _ENTER;
|
|
41
|
|
42 FLAC__seekable_stream_decoder_set_read_callback(decoder, read_callback);
|
|
43 FLAC__seekable_stream_decoder_set_seek_callback(decoder, seek_callback);
|
|
44 FLAC__seekable_stream_decoder_set_tell_callback(decoder, tell_callback);
|
|
45 FLAC__seekable_stream_decoder_set_length_callback(decoder, length_callback);
|
|
46 FLAC__seekable_stream_decoder_set_eof_callback(decoder, eof_callback);
|
|
47 FLAC__seekable_stream_decoder_set_write_callback(decoder, write_callback);
|
|
48 FLAC__seekable_stream_decoder_set_metadata_callback(decoder, metadata_callback);
|
|
49 FLAC__seekable_stream_decoder_set_error_callback(decoder, error_callback);
|
|
50 FLAC__seekable_stream_decoder_set_client_data(decoder, client_data);
|
|
51
|
|
52 ret = FLAC__seekable_stream_decoder_init(decoder);
|
|
53
|
|
54 _LEAVE ret;
|
|
55 }
|
|
56
|
|
57 #endif
|