Max Kellermann
b9c610ac87
directory: include config.h
...
*sigh* another Large File breakage. ino_t/dev_t this time. We need
to include config.h in directory.h to get this straight.
2009-11-11 23:36:36 +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
Max Kellermann
80b220a3a6
decoder/flac: keep track of current frame number
...
We need this for more exact end-of-subsong detection for CUE files.
2009-11-11 15:31:17 +01:00
Max Kellermann
5cc3c4f503
Merge remote branch 'origin/v0.15.x'
2009-11-11 15:14:20 +01:00
Max Kellermann
96204ea3dc
fd_util: don't call fd_set_nonblock() if open() has failed
...
This fixes an assertion failure.
2009-11-11 14:30:38 +01:00
Max Kellermann
9d1a34e30b
added missing config.h includes for extended LFS support
...
All sources which might work with large files must include config.h,
to get Large File Support on 32 bit platforms.
2009-11-11 14:15:34 +01:00
Max Kellermann
69d9716f8b
update: added missing config.h includes
...
This broke sticker and archive support.
2009-11-11 14:13:24 +01:00
Max Kellermann
dca4d9cf83
decoder/flac: fixed CUE seeking range check
...
If flac_container_decode() gets a seek destination which is out of
range, it ignores the SEEK command (never finishes it). This leads to
MPD lockup, because the player thread waits for completion.
2009-11-11 08:55:55 +01:00
Max Kellermann
707b9fea17
decoder/flac: removed redundant NULL checks
...
After the decoder loop, "flac_dec" is always set.
2009-11-11 08:37:21 +01:00
Max Kellermann
68f77e4163
oggflac: rewind stream after FLAC detection
...
The oggflac plugin has been completely broken for quite a while and
nobody has noticed - maybe we should remove it?
2009-11-11 08:14:37 +01:00
Max Kellermann
d605329f83
decoder/flac: moved code to flac_pcm.c
2009-11-11 07:59:22 +01:00
Max Kellermann
f6e7dffada
decoder/flac: moved code to flac_metadata.c
2009-11-11 07:50:40 +01:00
Max Kellermann
43549db718
decoder/flac: return replay_gain_info object from helper function
...
Make the function more generic by not passing "struct flac_data" to
it.
2009-11-11 07:35:16 +01:00
Max Kellermann
7c0c8ca8d7
Merge branch 'master' of git://git.musicpd.org/metyl/mpd
2009-11-11 06:45:23 +01:00
Max Kellermann
884be8e2b3
decoder/flac: merged some code into flac_tag_apply_metadata()
2009-11-11 00:05:14 +01:00
Max Kellermann
305de100a7
decoder/oggflac: initialize the "tag" variable
2009-11-10 23:56:59 +01:00
Viliam Mateicka
79035d7ed9
wave_encoder: new encoder for streaming PCM wave files.
...
When using wave encoder with httpd audio output mpd can input this stream via http and audiofile decoder.
This for example opens simple way to configure lossless audio streaming port(like jack or pulseaudio does but without overhead).
Another possibility can be using it for gathering raw data for visualization plugins (If sync issue will be resolved)
2009-11-10 22:29:54 +00:00
Max Kellermann
c1a999c492
decoder/flac: don't use float to calculate song duration
...
Simple (up-rounding) integer division is good enough. We're casting
the result back to an integer anyway.
2009-11-10 22:03:58 +01:00
Max Kellermann
e51d9fc6a9
decoder/flac: pass VorbisComment to comments_to_tag()
2009-11-10 21:58:19 +01:00
Max Kellermann
2f69831fb8
decoder/flac: use pcm_buffer instead of fixed buffer
...
This is a great simplification for flac_common_write(), because we can
convert and submit all of the buffer in one turn. No more partial
buffers with complicated formulas.
2009-11-10 21:46:10 +01:00
Max Kellermann
b6a2ffd3d7
decoder/flac: added function flac_data_deinit()
...
Clean up tag and replay_gain_info there.
2009-11-10 21:42:15 +01:00
Max Kellermann
6a5f4651a1
test: fixed the read_mixer program on !HAVE_PULSE
2009-11-10 21:38:20 +01:00
Max Kellermann
70106464d3
configure.ac: enable_audiofile defaults to "auto"
...
Since we're using MPD_AUTO_PKG, we can auto-detect this option. Also
fix the --enable-audiofile help string.
2009-11-10 21:27:55 +01:00
Max Kellermann
b722d3d7f3
configure.ac: require GLib 2.12
...
Drop the required GLib version from 2.16 to 2.12, because many current
systems still don't have GLib 2.16. This requires several new
compatibility functions in glib_compat.h.
2009-11-10 21:14:22 +01:00
Max Kellermann
de57c21a3b
Merge branch 'v0.15.x'
...
Conflicts:
src/input/lastfm_input_plugin.c
src/song_save.c
2009-11-10 21:13:03 +01:00
Max Kellermann
84917721c7
moved GLib compatibility code to glib_compat.h
2009-11-10 21:07:54 +01:00
Max Kellermann
93a13b42dd
zzip: require libzzip 0.13
...
We need the function zzip_file_stat().
2009-11-10 21:00:10 +01:00