Max Kellermann
635cfbae13
decoder_control: use g_free() to manage mixramp allocations
...
Be consistent with the rest of MPD, and don't use the non-portable
header "malloc.h".
2010-09-23 08:49:21 +02:00
Rasi
31ab0b3df1
Added album tag support for libgme decoder
2010-07-23 23:13:03 +02:00
Max Kellermann
4364b30c42
decoder/mad: move RVA2 code to tag_rva2.c
2010-07-20 23:03:54 +02:00
Max Kellermann
c0da938d4f
Merge release 0.15.12 from branch 'v0.15.x'
...
Conflicts:
NEWS
configure.ac
2010-07-20 23:03:06 +02:00
Max Kellermann
8b055c3127
tag_rva2: set "gain", not "peak"
...
RVA2 tags only store the "gain" value, there is no "peak" attribute.
2010-07-20 22:32:55 +02:00
Max Kellermann
172182b18f
decoder/mad: parse_rva2() returns bool
2010-07-20 18:27:11 +02:00
Max Kellermann
898a13f196
decoder/wildmidi: support version 0.2.3
...
In libwildmidi 0.2.3, the function WildMidi_SampledSeek() was removed,
without changing the SO name. This patch adds an autoconf check for
that function. Fall back to WildMidi_FastSeek() if
WildMidi_SampledSeek() is not available anymore.
2010-07-20 18:23:56 +02:00
Max Kellermann
e2e8d0d2f3
decoder/ffmpeg: fix libavformat 0.6 by using av_open_input_stream()
...
libavformat 0.6 does not pass the original URI pointer to the "open"
method, which leads to a crash because MPD was using a dirty hack to
pass a pointer to that method.
This patch switches to av_open_input_stream() with a custom
ByteIOContext class, instead of doing the URI string hack with
av_open_input_file().
Loosely based on a patch from Jasper St. Pierre.
2010-07-19 23:03:06 +02:00
Max Kellermann
b2e3c0757b
decoder/ffmpeg: manual format probing
...
Use the libavformat function av_probe_input_format() to probe the
AVInputFormat, instead of letting av_open_input_file() do it
implicitly. We will switch to av_open_input_stream() very soon, which
does not have the probing code.
Loosely based on a patch from Jasper St. Pierre.
2010-07-19 22:59:59 +02:00
Anton Khirnov
0fc0196dba
ffmpeg: read the audio stream metadata in addition to global
...
in some formats, e.g. vorbis, the metadata is stored per-stream.
2010-07-12 11:36:55 +02:00
Anton Khirnov
1492324c76
ffmpeg: factor tag_type <-> ffmpeg tag name maps into a table.
2010-07-12 11:36:55 +02:00
Max Kellermann
49bc317fb8
decoder/ffmpeg: fix libavformat 0.6 by using av_open_input_stream()
...
libavformat 0.6 does not pass the original URI pointer to the "open"
method, which leads to a crash because MPD was using a dirty hack to
pass a pointer to that method.
This patch switches to av_open_input_stream() with a custom
ByteIOContext class, instead of doing the URI string hack with
av_open_input_file().
Loosely based on a patch from Jasper St. Pierre.
2010-06-30 23:41:32 +02:00
Max Kellermann
375a09d6f6
decoder/ffmpeg: manual format probing
...
Use the libavformat function av_probe_input_format() to probe the
AVInputFormat, instead of letting av_open_input_file() do it
implicitly. We will switch to av_open_input_stream() very soon, which
does not have the probing code.
Loosely based on a patch from Jasper St. Pierre.
2010-06-30 23:40:31 +02:00
Max Kellermann
0265c34bed
decoder/ffmpeg: free URI, fix memory leak
...
Free the string allocated by decoder_get_uri().
2010-06-30 23:40:04 +02:00
Max Kellermann
a1882f48be
decoder/vorbis: handle uri==NULL
...
This fixes a theoretical crash, which has never occurred in practice.
2010-06-30 23:38:49 +02:00
Anton Khirnov
c3569814bd
ffmpeg: read more metadata.
2010-06-30 23:18:45 +02:00
Max Kellermann
814daac5ba
decoder/ffmpeg: free AVFormatContext on error
...
Fix a memory leak in some code paths.
2010-06-30 23:14:43 +02:00
Max Kellermann
ec89ce5a8a
decoder/mp4ff: support tag "album artist"
...
We already supported "albumartist", but it seems some folks also use
"album artist" (with a space).
2010-06-30 21:55:03 +02:00
Max Kellermann
77e6810c14
decoder/mikmod: fix memory leak
...
The return value of Player_LoadTitle() is allocated with malloc(), and
must be freed by the caller.
2010-06-30 19:37:36 +00:00
Max Kellermann
5ebe33653c
decoder/mp4ff: remove duplicate entries in the tag name table
...
Reuse the function tag_name_parse_i().
2010-06-30 21:36:15 +02:00
Max Kellermann
8e3eace289
decoder/mp4ff: moved code to mp4ff_tag_name_parse()
2010-06-30 21:36:00 +02:00
Max Kellermann
4d6d372a5b
decoder/vorbis: use single global ov_callbacks constant
...
Initialize the ov_callbacks struct at compile time.
2010-06-30 19:24:41 +00:00
Max Kellermann
0aeec90590
decoder/mp4ff: support tags "albumartist", "band"
...
I'm not sure if mapping "band" to TAG_PERFORMER is correct, but it
might be better than nothing.
2010-06-30 21:22:13 +02:00
Max Kellermann
cfcd84655c
decoder/mp4ff: use tag_table.h to parse tag names
...
Convert if/else/else/... to a loop.
2010-06-30 21:19:30 +02:00
Max Kellermann
9eb292c1e5
decoder/mp4ff: support tag "album artist"
...
We already supported "albumartist", but it seems some folks also use
"album artist" (with a space).
2010-06-25 22:54:18 +02:00
Romain Bignon
b571ba27a4
fix crash when decoder is NULL
2010-05-31 22:11:59 +02:00
Max Kellermann
de8f2739c2
decoder/mikmod: fix memory leak
...
The return value of Player_LoadTitle() is allocated with malloc(), and
must be freed by the caller.
2010-05-31 10:24:08 +02:00
Max Kellermann
2c1c588868
decoder/mikmod: duplicate the path only once
2010-05-31 10:22:08 +02:00
Max Kellermann
e271f69a34
decoder/mikdmod: moved local variable declarations in tag_dup()
2010-05-31 10:16:09 +02:00
Max Kellermann
39105f2119
decoder/wildmidi: moved local variable declarations in tag_dup()
2010-05-31 10:14:48 +02:00
Max Kellermann
4e080a9b06
decoder/gme: replace macro GME_BUF_SIZE
...
Added macros with better names: GME_BUFFER_FRAMES, GME_BUFFER_SAMPLES
(the former only used to calculate the latter).
2010-05-31 10:03:43 +02:00
Max Kellermann
d55740808d
decoder/gme: added constants for sample rate and channels
...
Move into enums.
2010-05-31 10:02:43 +02:00
Max Kellermann
6566038df9
decoder/gme: pass the whole buffer to decoder_data()
...
Pass sizeof(buf) to decoder_data(), not the number of samples (which
is half the size). At the same time, pass GME_BUF_SIZE to gme_play()
- libgme really wants to get the number of samples, not the number of
stereo frames. Previously, this plugin had been using only the first
half of the buffer.
2010-05-31 09:57:15 +02:00
Max Kellermann
f0faf00320
decoder/gme: allocate tag later, fixes memory leak
...
Allocate the "tag" object after the file has been opened successfully.
2010-05-31 09:43:25 +02:00
Max Kellermann
51c7577c8f
decoder/mp4ff: rename and move local variable
...
Allocate the "tag" object after the file has been checked. That
removes one tag_free() call in an error handler.
2010-05-31 09:35:49 +02:00
Max Kellermann
be308c6657
decoder/mp4ff: merge code into mp4ff_input_stream_open()
2010-05-31 09:29:45 +02:00
Max Kellermann
1729a0b437
decoder/mp4ff: move mp4ff_callback_t into mp4ff_input_stream
...
Allocate only one item on the stack.
2010-05-31 09:23:27 +02:00
Max Kellermann
1b2fc2ae19
decoder/mp4ff: rename mp4_context to mp4ff_input_stream
2010-05-31 09:22:42 +02:00
Max Kellermann
58a75f0b78
decoder/mp4ff: remove duplicate entries in the tag name table
...
Reuse the function tag_name_parse_i().
2010-05-31 08:48:41 +02:00
Max Kellermann
daf6e2b5da
decoder/mp4ff: moved code to mp4ff_tag_name_parse()
2010-05-31 08:47:59 +02:00
Max Kellermann
ca08c4dbf4
decoder/vorbis: rename local variable "ret"
2010-05-31 00:06:37 +02:00
Max Kellermann
8af52fa205
decoder/vorbis: implement method stream_tag()
...
This allows tags in archive files.
2010-05-31 00:02:57 +02:00
Max Kellermann
3b0bf856c4
decoder/vorbis: move code to vorbis_open_stream()
2010-05-31 00:00:04 +02:00
Max Kellermann
28f5803d34
decoder/vorbis: use single global ov_callbacks constant
...
Initialize the ov_callbacks struct at compile time.
2010-05-30 23:59:36 +02:00
Max Kellermann
0b72299857
decoder/vorbis: rename struct vorbis_decoder_data to vorbis_is
2010-05-30 23:57:58 +02:00
Max Kellermann
017d61a1aa
decoder/mp4ff: support tags "albumartist", "band"
...
I'm not sure if mapping "band" to TAG_PERFORMER is correct, but it
might be better than nothing.
2010-05-30 22:55:02 +02:00
Max Kellermann
4028d03a6e
decoder/mp4ff: use tag_table.h to parse tag names
...
Convert if/else/else/... to a loop.
2010-05-30 22:52:45 +02:00
Max Kellermann
44b771aca1
decoder/mp4ff: rename plugin "mp4" to "mp4ff"
...
The underlying library is named "libmp4ff". To reduce confusion,
rename the plugin to a more specific name.
2010-05-30 22:52:44 +02:00
Max Kellermann
9dda53e1d2
Merge release 0.15.10 from branch 'v0.15.x'
...
Conflicts:
NEWS
configure.ac
src/input/mms_input_plugin.c
2010-05-30 18:26:33 +02:00
Max Kellermann
442d2e74e3
decoder/mad: fix buffer variable name on !HAVE_ID3TAG
2010-05-30 17:27:03 +02:00
Max Kellermann
fa2ff849c5
input/ffmpeg: new input plugin using libavformat's "avio" library
2010-05-18 21:20:31 +02:00
Tim Phipps
0ac5b6e613
mixramp: Adjust MixRamp threshold to account for ReplayGain.
2010-05-08 00:19:44 -07:00
Max Kellermann
cf3ada3d04
Merge branch 'master' of git://github.com/mcfiredrill/mpd
2010-04-20 21:16:39 +02:00
Max Kellermann
a1a03deed2
decoder/mad: properly calculate ID3 size without libid3tag
...
Without libid3tag, we were trying to skip the ID3 frame (since
0.15.2). Its length however was not calculated at all, we were just
dropping everything from the current input buffer. This lead to the
first few seconds of the file being skipped. This patch attempts to
calculate the ID3v2 frame size with the formula from:
http://www.id3.org/id3v2.4.0-structure 3.1 and 6.2
2010-04-13 08:51:29 +02:00
Charles Kerr
6a95898038
decoder/ffmpeg: fix crash on startup in mpd_ffmpeg_log_callback()
...
What's happening is the `ptr' argument to that function is NULL for me
every time. `ptr' is unconditionally dereferenced to generate a log
message, and this is where mpd crashes.
Attached is a simple patch that tests for NULL and omits the log. With
this patch the crash disappeared and mpd went back to working well.
2010-04-11 19:18:30 +02:00
Tony Miller
9d55b16998
Decoder for game music emulation library.
...
Supports a number of videogame music formats, more info here:
http://www.fly.net/~ant/libs/audio.html
I wrote this plugin for the latest svn, get it here:
http://code.google.com/p/game-music-emu/source/checkout
2010-04-10 01:05:16 -07:00
Max Kellermann
8446b70ddc
decoder/ffmpeg: print item name in log callback
2010-03-28 19:48:57 +02:00
Max Kellermann
e9beea072d
Merge release 0.15.9 from branch 'v0.15.x'
...
Conflicts:
NEWS
configure.ac
src/cue/cue_tag.c
src/decoder/mpcdec_decoder_plugin.c
src/player_thread.c
2010-03-28 19:31:47 +02:00
Tim Phipps
e7a515c8b1
Add support for MixRamp tags
...
Adds mixrampdb and mixrampdelay commands. Reads MIXRAP_START and
MIXRAMP_END tags from FLAC files and overlaps instead of crossfading.
2010-03-21 18:21:47 +01:00
Aleksei Kaveshnikov
73ba4ea3da
decoder/mpcdec: fix replay gain formula with v8
...
"When playing musepack files with mpd v0.15.8, rg seems to have no effect.
Using sample file below, mpd says 'computing ReplayGain album scale with gain 122.879997, peak 0.549150'.
One thing though, if I build mpd against old libmpcdec-1.2.6, rg works
as expected: 'computing ReplayGain album scale with gain 16.820000,
peak 0.099765'"
2010-03-19 10:26:08 +01:00
Piotr Gozdur
96033e4b4e
decoder/mpcdec: fix negative shift on fixed-point samples
...
"There is a bug in fixed-point musepack (musepack_src_r435) playback.
In floating-point audio is OK but in fixed audio is distorted. I have
made a patch for this"
2010-03-17 17:54:21 +01:00
Max Kellermann
5842015b90
decoder/ffmpeg: fix indentation
2010-03-07 19:20:34 +01:00
Max Kellermann
ae56901863
decoder/ffmpeg: implement the libavutil log callback
...
Pass everything to the GLib logging library. No direct stderr access.
2010-02-27 19:32:59 +01:00
Max Kellermann
4e364854ab
decoder/ffmpeg: don't close the AVFormatContext after open failure
...
The pointer is invalid if av_open_input_file() fails.
2010-02-27 19:25:56 +01:00
Max Kellermann
35c5a371ea
decoder/mad: fix crash when seeking at end of song
...
Removed the decoder_command_finished() call at the end of
mp3_decode(). This is invalid, because decoder_command_finished() has
already been called in mp3_read().
2010-02-27 18:35:31 +01:00
Max Kellermann
5e0117b444
replay_gain_info: allocate the struct statically
...
Don't allocate each replay_gain_info object on the heap. Those
objects who held a pointer now store a full replay_gain_info object.
This reduces the number of allocations and heap fragmentation.
2010-02-17 07:22:44 +01:00
Anton Khirnov
766b9fd453
ffmpeg: read more metadata.
2010-02-02 17:55:58 +01:00
Tim Phipps
891dab7b91
decoder/flac: fix replay gain (short-circuiting "or")
2010-01-28 20:54:04 +01:00
Max Kellermann
acb0ff1ea8
decoder/wavpack: fixed WVC URI
...
Pass the current URI to wavpack_open_wvc().
2010-01-20 12:08:44 +01:00
Max Kellermann
2acad9fe1e
decoder/ffmpeg: call decoder_timestamp() once per packet
2010-01-18 13:11:04 +01:00
Max Kellermann
8914ebc964
decoder/ffmpeg: merged ffmpeg_helper() into ffmpeg_decode()
2010-01-18 11:06:09 +01:00
Max Kellermann
5477c31160
decoder/ffmpeg: optimized the stream_tag() method
...
Don't use the function ffmpeg_helper(), don't initialize the codec.
2010-01-18 11:06:04 +01:00
Max Kellermann
acd3f8cd91
decoder/ffmpeg: free AVFormatContext on error
...
Fix a memory leak in some code paths.
2010-01-18 11:05:15 +01:00
Max Kellermann
ca1fc13116
decoder_api: removed function decoder_get_uri()
...
Use input_stream.uri.
2010-01-18 10:21:57 +01:00
Max Kellermann
a0a26d3341
Merge release 0.15.8 from branch 'v0.15.x
...
Conflicts:
Makefile.am
NEWS
configure.ac
src/decoder/ffmpeg_decoder_plugin.c
src/decoder_thread.c
2010-01-18 07:52:58 +01:00
Max Kellermann
2579a2f924
decoder/ffmpeg: added more MIME types
...
Taken from the ffmpeg sources.
2010-01-17 16:00:14 +01:00
Max Kellermann
1b441837f1
decoder/ffmpeg: append file name suffix to virtual stream URL
...
To allow libavformat to detect the format of the input file, append
the suffix of the input file to the URL of the virtual stream. This
specifically enables the "shorten" codec, which is supported by
libavformat/raw.c, detected only by the suffix.
2010-01-17 02:36:07 +01:00
Max Kellermann
1abfcc56af
audio_format: support packed 24 bit samples
2010-01-16 23:44:54 +01:00
Max Kellermann
a942384fbf
decoder/flac: support streams without STREAMINFO block
2010-01-06 10:17:16 +01:00
Max Kellermann
de0cdee4aa
decoder/flac: pass bits_per_sample to flac_sample_format()
...
Easier to reuse the function.
2010-01-06 09:55:20 +01:00
Max Kellermann
550c9319e9
decoder/flac: moved decoder initialization to _flac_common.c
...
Invoke decoder_initialized() in the libFLAC metadata callback. This
merges code from the FLAC and the OggFLAC decoder plugin into the
common library.
2010-01-06 09:50:34 +01:00
Max Kellermann
ae9c02b3a8
decoder/flac: remember audio_format, not stream_info
2010-01-06 09:00:32 +01:00
Max Kellermann
6f6d47dd20
decoder/flac: removed CUE sheet support
...
This feature has been moved to the "flac" playlist plugin.
2010-01-06 08:52:35 +01:00
Max Kellermann
d6d5caae23
decoder/flac: moved flac_tag_load() to flac_metadata.c
...
Make this code is reusable.
2010-01-06 08:50:35 +01:00
Max Kellermann
9b9abff972
renamed decoder plugin sources
...
Make it X_decoder_plugin.c.
2010-01-04 21:45:32 +01:00
Max Kellermann
c69cc31de0
decoder/mad: fix build error without libid3tag
2010-01-04 21:45:32 +01:00
Max Kellermann
1330274ffc
replay_gain: moved code to replay_gain_info.c
2010-01-04 21:02:36 +01:00
Max Kellermann
cd8f92c928
decoder_api: added function decoder_replay_gain()
...
This function replaces the replay_gain_info parameter for
decoder_data(). This allows the decoder to announce replay gain
changes, instead of having to pass the same object over and over.
2010-01-04 20:42:49 +01:00
Max Kellermann
d3b763a48c
input_stream: return allocated input_stream objects
...
Major API redesign: don't let the caller allocate the input_stream
object. Let each input plugin allocate its own (derived/extended)
input_stream pointer. The "data" attribute can now be removed, and
all input plugins simply cast the input_stream pointer to their own
structure (with an "struct input_stream base" as the first attribute).
2010-01-01 17:25:07 +01:00
Avuton Olrich
9d3865cb95
Update copyright notices.
2009-12-31 20:58:43 -08:00
Max Kellermann
05cde5810a
decoder: switch a bunch of plugins to stream_tag()
...
This patch changes the following decoder plugins to implement
stream_tag() instead of tag_dup():
faad, ffmpeg, mad, modplug, mp4ff, mpcdec, oggflac
This simplifies their code, because they do not need to take care of
opening/closing the stream.
2009-12-31 18:32:09 +01:00
Max Kellermann
6b96f5d566
decoder_plugin: added method stream_tag()
...
This is like tag_dup(), but works with an input_stream object instead
of a file path.
2009-12-31 18:27:48 +01:00
Max Kellermann
efc885a9dc
Merge vorbis+icy fixes from branch 'v0.15.x'
...
Conflicts:
Makefile.am
NEWS
configure.ac
src/input/curl_input_plugin.c
src/input_stream.c
2009-12-30 23:24:11 +01:00
Max Kellermann
c7d099c757
decoder/{ffmpeg,flac,vorbis}: added more flac/vorbis MIME types
...
Support deprecated MIME types such as "audio/x-ogg". Support new
types such as "audio/flac".
2009-12-29 22:33:46 +01:00
Max Kellermann
333e11d0eb
Merged release 0.15.7 from branch 'v0.15.x'
...
Conflicts:
NEWS
configure.ac
src/decoder_api.c
2009-12-27 20:10:45 +01:00
Max Kellermann
bad350bc18
decoder_api: added function decoder_timestamp()
...
Remove the data_time parameter from decoder_data(). This patch
eliminates the timestamp counting in most decoder plugins, because the
MPD core will do it automatically by default.
2009-12-26 03:01:43 +01:00
Max Kellermann
8a6d448aaf
decoder/wavpack: allow fine-grained seeking
...
First multiply the floating point return value of
decoder_seek_where(), then cast to integer.
2009-12-26 02:58:30 +01:00
Alam Arias
b05ba0286e
updated mp4ff decoder about input_stream_seek
2009-12-16 06:47:15 +01:00
Max Kellermann
228b03edf8
input_stream: return errors with GError
2009-12-15 23:12:11 +01:00
Max Kellermann
849d7895dc
decoder/mikmod: fixed gcc uninitialized warning
...
Removed local variable "sample_rate".
2009-12-14 23:20:14 +01:00
Max Kellermann
c3085d7b61
Merge branch 'v0.15.x'
...
Conflicts:
src/decoder/ffmpeg_plugin.c
2009-12-14 17:40:50 +01:00
Max Kellermann
8f7bc70bf5
decoder/wavpack: don't use the nonstandard "uchar" type
...
Use the signed C99 type int8_t instead.
2009-12-11 12:45:57 +01:00
Max Kellermann
c412d6251e
audio_format: changed "bits" to "enum sample_format"
...
This patch prepares support for floating point samples (and probably
other formats). It changes the meaning of the "bits" attribute from a
bit count to a symbolic value.
2009-12-02 22:29:50 +01:00
Max Kellermann
16123f1b8e
ffmpeg: don't try to force stereo
...
The plugin code tried to force libavcodec to supply stereo samples.
That however has never actually worked. By removing this code, we are
able to play surround files for the first time.
2009-11-30 09:59:05 +01:00
Max Kellermann
3857bb9990
decoder/mpcdec: set 24 bit sample format
...
This fixes a regression due to a typo caused by "decoder: use
audio_format_init_checked()".
2009-11-25 08:59:13 +01:00
Max Kellermann
c33bbd947b
Merged release 0.15.6 from branch 'v0.15.x'
...
Conflicts:
NEWS
configure.ac
2009-11-19 19:59:34 +01:00
Max Kellermann
21fdf47b56
decoder/flac: fixed compiler warning
...
Removed the "vtrack" local variable (which triggered a gcc warning
because it was after the newly introduced NULL check), and run
strtol() on the original parameter.
2009-11-19 19:49:44 +01:00
Max Kellermann
97f8e017c4
decoder/flac: fixed NULL pointer dereference in CUE code
...
The function flac_vtrack_tnum() was missing a strrchr()==NULL check.
2009-11-18 19:55:38 +01:00
Max Kellermann
77b95d08a5
decoder/ffmpeg: align the output buffer
...
On some platforms, libavcodec wants the output buffer aligned to 16
bytes (because it uses SSE/Altivec internally). It will segfault when
you don't obey this rule.
2009-11-15 17:39:09 +01:00
Max Kellermann
141cbc60b9
decoder/audio: eliminate the "bits" variable
...
Pass the audiofile_setup_sample_format() result to
audio_format_init_checked().
2009-11-14 23:35:37 +01:00
Max Kellermann
2c1fb48318
decoder/audiofile: moved code to audiofile_setup_sample_format()
2009-11-14 23:22:14 +01:00
Max Kellermann
1dfadf4815
decoder/modplug: count frame position
...
Don't maintain the current time stamp in a floating point variable,
because this is subject to rounding errors.
2009-11-14 22:30:57 +01:00
Max Kellermann
f5b9e3c064
decoder/modplug: floating point division for song duration
...
More exact total time.
2009-11-14 22:27:27 +01:00
Max Kellermann
ff70dbd316
decoder/modplug: check ModPlug_Read() < 0
...
Negative return values are not documented here, but since the function
prototype is signed, let's be sure.
2009-11-14 22:27:04 +01:00
Max Kellermann
dd4625ce13
decoder/mikmod: count frame position
...
Don't maintain the current time stamp in a floating point variable,
because this is subject to rounding errors.
2009-11-14 02:24:42 +01:00
Max Kellermann
1648c7aa5b
decoder/mikmod: sample rate is configurable
...
The new option "sample_rate" sets the sample rate for libmikmod.
2009-11-14 02:24:42 +01:00
Max Kellermann
edaf017908
decoder/mikmod: set drv_name and drv_version from PACKAGE/VERSION
2009-11-14 02:24:42 +01:00
Max Kellermann
2c7bf61e68
decoder/mikmod: no CamelCase
2009-11-14 02:07:41 +01:00
Max Kellermann
7efb548921
decoder/mikmod: removed the struct mod_Data
2009-11-14 02:07:41 +01:00
Max Kellermann
0c5329aedc
decoder/mikmod: merged open()/close() into decode()
...
These functions are trivial, we don't need them separate.
2009-11-14 02:07:41 +01:00
Max Kellermann
2d236e281f
decoder/mikmod: static mod_Data object
...
Don't allocate this object, put it on the stack.
2009-11-14 02:07:41 +01:00
Max Kellermann
719990b1c5
decoder: use audio_format_init_checked()
...
Let the audio_check library verify the audio format in all (relevant,
i.e. non-hardcoded) plugins.
2009-11-14 00:47:22 +01:00
Max Kellermann
873025a495
decoder/sidplay: correctly calculate floating point time
...
Internally, use only the integer time. When needed, convert it to a
floating point seconds value.
2009-11-14 00:46:30 +01:00
Max Kellermann
9947b82cad
added .#* to .gitignore
...
Temporary editor files.
2009-11-12 18:39:40 +01:00
Max Kellermann
5b82ffc291
include config.h in all sources
...
After we've been hit by Large File Support problems several times in
the past week (which only occur on 32 bit platforms, which I don't
have), this is yet another attempt to fix the issue.
2009-11-12 09:17:03 +01:00
Max Kellermann
8068fd5228
decoder/vorbis: fixed gcc "signed" warning
2009-11-12 09:16:34 +01:00
Max Kellermann
59189160e3
decoder/wavpack: allow more than 2 channels
...
Remove the OPEN_2CH_MAX option. MPD's support for surround sound is
still clunky, but we're working on it.
2009-11-11 23:03:20 +01:00
Max Kellermann
ee5d3337a7
decoder/wavpack: activate 32 bit support
...
MPD has been supporting 32 bit samples since version 0.15. This patch
changes one check, and removes the 32->24 conversion code.
Note that WavPack floating point samples have 32 bits, and MPD doesn't
have a special check for floating point - therefore, this WavPack
plugin still returns 24 bit integer samples as before (until we have
float support in the MPD core).
2009-11-11 21:49:00 +01:00
Max Kellermann
4c6a8e3ca5
decoder/vorbis: initialize before entering the loop
...
Call decoder_initialize() before entering the loop. We don't need to
call ov_read() before ov_info(). When the stream number changes,
check if the audio format is still the same.
2009-11-11 21:34:55 +01:00
Max Kellermann
4f38cc9cae
decoder/vorbis: moved error strings to vorbis_strerror()
2009-11-11 21:12:10 +01:00
Max Kellermann
dfc09a37c9
decoder/vorbis: removed the OggCallbackData typedef
...
Use the struct name instead.
2009-11-11 21:09:08 +01:00
Max Kellermann
8588c21689
decoder/vorbis: fix typo in comment
2009-11-11 21:09:08 +01:00
Max Kellermann
2decc65b45
decoder/vorbis: removed redundant "bits" initialization
...
This is done by audio_format_init().
2009-11-11 21:03:04 +01:00
Max Kellermann
0fb877740b
decoder/flac: check "seekable" in libFLAC callbacks
...
Return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED if this input
stream does not support seeking.
2009-11-11 21:02:52 +01:00
Max Kellermann
37181c9181
decoder/flac: moved code to flac_data_get_audio_format()
...
Remove the audio_format attribute, add "frame_size" instead. The
audio_format initialization and check is moved both to
flac_data_get_audio_format().
2009-11-11 20:44:21 +01:00
Max Kellermann
08b139f37c
decoder/flac: use stream_info instead of audio_format
...
Use the sample rate stored in the stream_info struct instead of the
audio_format struct.
2009-11-11 20:36:53 +01:00
Max Kellermann
3973aeecd2
decoder/flac: use frame header instead of audio_format
...
When calculating the properties of the frame, use sample_rate and
other information from the frame header instead of the stored
audio_format object.
2009-11-11 20:36:46 +01:00
Max Kellermann
5b2d32b499
decoder/oggflac: moved stream_info check to oggflac_decode()
2009-11-11 20:36:21 +01:00
Max Kellermann
e0d5ee0045
decoder/flac: calculate time stamp from current frame
...
Don't update a float timestamp, this will make imprecisions add up
after a while. We already have the number of the current frame, let's
just calculate the float timestamp from that for every decoder_data()
command. For this, we need to add the attribute "first_frame", for
CUE sheet songs.
2009-11-11 20:18:39 +01:00
Max Kellermann
d35efddd65
decoder/flac: calculate bit rate in flac_common_write()
...
Removed the "bit_rate" attribute from the flac_data struct. Pass the
number of bytes since the last call to flac_common_write(), and let
it calculate the bit rate.
2009-11-11 19:52:14 +01:00
Max Kellermann
7b13776f2d
decoder/flac: store the whole stream info object, not duration
...
We don't want to work with floating point values if possible. Get the
integer number of frames from the FLAC__StreamMetadata_StreamInfo
object, and convert it into a float duration on demand. This patch
adds a check if the STREAMINFO packet has been received yet.
2009-11-11 19:25:15 +01:00
Max Kellermann
f937ec9a7c
decoder/flac: merge code into flac_decoder_initialize()
...
Wrapper for FLAC__stream_decoder_process_until_end_of_metadata(),
decoder_initialized().
2009-11-11 19:08:10 +01:00
Max Kellermann
a3f5284dc6
decoder/flac: merged code into flac_decoder_new()
...
Convenience wrapper for FLAC__stream_decoder_new() and
FLAC__stream_decoder_set_metadata_respond().
2009-11-11 19:07:30 +01:00
Max Kellermann
4a8cc87b4d
decoder/flac: free the "pathname" variable earlier
...
Free the pointer right after its last use, i.e. after the
FLAC__stream_decoder_init_file() call.
2009-11-11 19:05:24 +01:00
Max Kellermann
183725733a
decoder/flac: emulate FLAC__stream_decoder_init_stream()
...
Remove the wrapper flac_init().
2009-11-11 18:08:22 +01:00
Max Kellermann
3c1bacbdbc
decoder/flac: use the new API functions
...
Use the type and function names of the libFLAC 1.1.3 API. Map the new
API to the old one with macros.
2009-11-11 17:59:46 +01:00
Max Kellermann
d5ed23438a
decoder/flac: removed the fake flac_ogg_init() fallback
...
Don't even try to call it with an old libFLAC API.
2009-11-11 17:01:14 +01:00
Max Kellermann
5bbaf0c9f1
decoder/flac: moved code to flac_compat.h
2009-11-11 16:43:34 +01:00
Max Kellermann
f2f8290242
decoder/{flac,vorbis}: include config.h for LFS
...
Allow those plugins to open large files on 32 bit platforms.
2009-11-11 16:37:42 +01:00
Max Kellermann
c1186693b5
decoder/flac: merged code into flac_decoder_loop()
...
The decoder loop of flac_decode_internal(), flac_container_decode()
and flac_filedecode_internal() is merged into this one function. This
unifies the code, and uses the frame number to identify the end of a
CUE sub song.
2009-11-11 16:28:44 +01:00