Commit Graph

737 Commits

Author SHA1 Message Date
Max Kellermann 02cc77cd82 decoder/dsf: fix multi-channel files
The plugin was horribly bugged for files that were not stereo.
2014-08-22 07:30:32 +02:00
Max Kellermann d8782ce5fd decoder/dsf: simplify dsf_to_pcm_order()
Don't pass the buffer size to the function, as it's known at compile
time.  Use "restrict" on the pointer arguments, and merge the two
loops, which allows the compiler to optimize this loop with a few SSE2
instructions.
2014-08-22 06:58:08 +02:00
Max Kellermann dedc2986c6 decoder/dsf: fix noise at end of malformed file
Read one block at a time.  This discards the last partial block, which
cannot be interleaved anyway.  Previously, uninitialised memory was
used to interleave the last block, which generated some noise.
2014-08-21 17:46:25 +02:00
Max Kellermann 74cdc0005a decoder/dsf: eliminate temporary buffer
Convert into a second buffer that gets passed to decoder_data()
without copying back to the first buffer.
2014-08-21 17:15:29 +02:00
Max Kellermann a756cd9565 decoder/dsf: add constant DSF_BLOCK_SIZE 2014-08-21 17:12:43 +02:00
Max Kellermann ae27c3f4c5 decoder/dsf: use size_t loop variables when the limit is a size_t 2014-08-21 17:09:49 +02:00
Max Kellermann 6d41f36266 decoder/dsf: use memcpy() 2014-08-21 13:09:14 +02:00
Max Kellermann 57cbcdf2ec decoder/dsf: make the "scratch" buffer local
This allows the compiler to discard buffer contents between two
function calls.
2014-08-21 13:05:35 +02:00
Max Kellermann 455fd180b1 Merge branch 'v0.18.x' 2014-08-21 12:52:27 +02:00
Max Kellermann e6177c3349 decoder/dsf: remove unused attribute "id3_size" 2014-08-20 09:46:42 +02:00
Max Kellermann e2adb82e29 decoder/DsdLib: use offset_type instead of uint64_t 2014-08-19 22:39:44 +02:00
Max Kellermann bb472206de InputStream: move typedef offset_type to Offset.hxx
Reduce header dependencies.
2014-08-19 22:29:52 +02:00
Max Kellermann 181edf4b53 InputStream: make offset_type unsigned 2014-08-19 21:23:03 +02:00
Max Kellermann 9be90bd1c9 decoder/wavpack: add local reference variables 2014-08-19 20:58:08 +02:00
Max Kellermann 106e535577 decoder/sndfile: check InputStream::KnownSize() 2014-08-19 20:57:25 +02:00
Max Kellermann 194be51f05 decoder/pcm: check InputStream::KnownSize() 2014-08-19 20:57:00 +02:00
Max Kellermann a862e363ea decoder/mpcdec: check InputStream::KnownSize() 2014-08-19 20:55:51 +02:00
Max Kellermann 2e64afca27 decoder/modplug: check InputStream::KnownSize() 2014-08-19 20:53:02 +02:00
Max Kellermann 51cda0be2a decoder/mad: check InputStream::KnownSize() 2014-08-19 20:44:29 +02:00
Max Kellermann 4da3291157 decoder/ffmpeg: check InputStream::KnownSize() 2014-08-19 20:44:29 +02:00
Max Kellermann 52edabf2cb decoder/faad: remove unnecessary cast to size_t 2014-08-19 20:44:29 +02:00
Max Kellermann 43a1a0f3ab decoder/faad: remove size!=0 check
Since we already checked InputStream::KnownSize(), we can assume that
GetSize() returns a valid value, and this check is obsolete.
2014-08-19 20:44:29 +02:00
Max Kellermann e88524f274 decoder/faad: check InputStream::KnownSize()
Replace the bogus GetSize() check and call GetSize() only when
necessary.
2014-08-19 20:44:29 +02:00
Max Kellermann 7a929fcd27 decoder/faad: call GetSize() only when needed 2014-08-19 20:44:29 +02:00
Max Kellermann 7087fdf6c0 decoder/DsdLib: make variables more local 2014-08-19 20:44:29 +02:00
Max Kellermann 67093a5143 decoder/DsdLib: use fixed-length ID3 buffer
Variable-length arrays are not allowed in C++.
2014-08-19 20:42:40 +02:00
Max Kellermann 3f34016888 decoder/DsdLib: check InputStream::KnownSize() 2014-08-19 20:24:33 +02:00
Max Kellermann 1307633a84 decoder/dsf: check InputStream::KnownSize() 2014-08-19 20:24:09 +02:00
Max Kellermann 1a53f07d80 decoder/dsf: remove unnecessary ID3 offset check
If the offset is out of range, the seek will simply fail.  Not a
problem.
2014-08-19 20:23:36 +02:00
Max Kellermann b924568f79 decoder/audiofile: check InputStream::KnownSize()
The plugin assumes that the size is known, but does not verify it at
runtime.
2014-08-19 11:58:15 +02:00
Max Kellermann 636f5d4a1d {input,decoder}/ffmpeg: move ffmpeg_domain to lib/ffmpeg/Domain.cxx
Eliminate duplicate definition (in input plugin and decoder plugin).
2014-08-18 10:12:37 +02:00
Jurgen Kramer 9b9d189a33 decoder/dsf: Allow up to DSD512. Enable DSD rates based on Fs=48kHz 2014-08-16 18:40:53 +02:00
Jurgen Kramer 7c3af4f56f Report bitrate for DSF and DSDIFF DSD decoders 2014-08-16 18:38:44 +02:00
Max Kellermann 880ce080b7 decoder/dsf: fix indent 2014-08-16 18:38:15 +02:00
Max Kellermann a9f6556454 Merge branch 'v0.18.x' 2014-08-16 08:25:10 +02:00
Andrée Ekroth ec3568bd97 decoder/Mp4v2: fix crash with undefined error
When no track is found the error is now properly set.
Previously the calling function tried to log an undefined
error, which resulted in a crash. MPD falls back to
ffmpeg for unsupported tracks, such as ALAC.

This should fix issue 4051.
2014-08-08 23:24:26 +02:00
Andrée Ekroth 330b6a0482 decoder/Mp4v2: add MP4v2 decoder plugin
This plugin uses the MP4v2 library to play mp4/m4a files.
It is limited to file_decode.
2014-08-07 21:01:38 +02:00
Max Kellermann 96abd70c13 decoder/dsdiff: move artist/title/id3 offsets out of DsdiffMetaData
They are only used inside dsdiff_read_metadata_extra().
2014-07-12 20:51:25 +02:00
Max Kellermann 1f9d9c3176 Merge branch 'v0.18.x' 2014-07-12 20:51:22 +02:00
Max Kellermann b2b95cad20 DecoderBuffer: add method _need()
Move code from the FAAD decoder plugin.
2014-07-12 02:23:48 +02:00
Max Kellermann e42b152037 decoder/faad: eliminate the adts_find_frame() loop
This loop is completely unnecessary.  We just need to find the first
ADTS frame and feed it into NeAACDecInit().
2014-07-12 01:51:39 +02:00
Max Kellermann da599e3f1a decoder/faad: split faad_stream_decode()
Eliminate duplicate cleanup code.
2014-07-12 01:47:07 +02:00
Max Kellermann c400876df1 Merge branch 'v0.18.x' 2014-07-12 01:27:18 +02:00
Max Kellermann c4bea3dfe4 decoder/sndfile: implement scan_stream() instead of scan_file() 2014-07-11 22:09:35 +02:00
Max Kellermann eaa9a1e33b decoder/sndfile: make variables more local 2014-07-11 22:03:26 +02:00
Max Kellermann 3e19298c9e decoder/sndfile: support more tag types 2014-07-11 22:03:13 +02:00
Max Kellermann 2a96ce97ee decoder/sndfile: add str_type to TagType table 2014-07-11 21:57:41 +02:00
Max Kellermann 8cfe901391 decoder/sndfile: move code to sndfile_handle_tag() 2014-07-11 21:56:02 +02:00
Max Kellermann 30f1ee7a1f decoder/sndfile: log libsndfile version on startup 2014-07-11 21:53:03 +02:00
Max Kellermann 828cd6fd0b Merge branch 'v0.18.x' 2014-07-11 21:33:50 +02:00