Commit Graph

1611 Commits

Author SHA1 Message Date
Max Kellermann
816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann
d7f770ce73 decoder/flac: move flac_sample_format() to FlacAudioFormat.hxx 2018-07-07 14:40:02 +02:00
Max Kellermann
24b14c5aa5 decoder/flac: rename FlacMetadata.cxx to FlacStreamMetadata.cxx 2018-07-07 14:29:49 +02:00
Max Kellermann
2e116c9e28 lib/xiph/FlacMetadataChain: un-inline Read(InputStream) 2018-07-07 14:22:22 +02:00
Max Kellermann
37897d1550 decoder/flac: move class FlacMetadataChain to separate source 2018-07-07 14:18:00 +02:00
Max Kellermann
b153591790 decoder/flac: move FlacIOHandle.?xx to lib/xiph/ 2018-07-07 14:17:03 +02:00
Max Kellermann
ee5653338d decoder/flac: fix comment typo 2018-07-07 14:11:28 +02:00
Max Kellermann
d43218ed16 lib/xiph/FlacMetadataIterator: proper CamelCase 2018-07-07 14:07:48 +02:00
Max Kellermann
3d43e4e954 decoder/flac: move class FLACMetadataIterator to separate source 2018-07-07 14:04:37 +02:00
Max Kellermann
b0d587ded7 decoder/flac: pass FLAC__Metadata_Chain* to FLACMetadataIterator ctor 2018-07-07 14:04:06 +02:00
Max Kellermann
1245b4a49f decoder/wavpack: merge duplicate code into Scan() 2018-07-07 13:54:02 +02:00
Max Kellermann
d4ce6049c9 decoder/wavpack: call TagHandler::OnAudioFormat() 2018-07-07 13:52:58 +02:00
Max Kellermann
c236a85c13 decoder/wavpack: add CheckAudioFormat(WavpackContext) 2018-07-07 13:48:49 +02:00
Max Kellermann
9cf43eef67 decoder/wildmidi: call TagHandler::OnAudioFormat() 2018-07-07 13:43:29 +02:00
Max Kellermann
ed6d0aa548 decoder/wildmidi: convert WILDMIDI_SAMPLE_RATE to AudioFormat 2018-07-07 13:36:18 +02:00
Max Kellermann
3d27fffc50 decoder/opus: call TagHandler::OnAudioFormat() 2018-07-07 13:34:32 +02:00
Max Kellermann
de0ee26432 decoder/sndfile: call TagHandler::OnAudioFormat() 2018-07-07 13:29:39 +02:00
Max Kellermann
45cccbce59 decoder/sndfile: use AtScopeExit()
Fixes memory leaks.
2018-07-07 13:27:26 +02:00
Max Kellermann
479de9c7cb decoder/sndfile: add CheckAudioFormat(SF_INFO) 2018-07-07 13:26:39 +02:00
Max Kellermann
60821232b9 decoder/audiofile: allocate AFvirtualfile with malloc()
afCloseFile() uses free(), so we need to use malloc().
2018-07-07 13:25:01 +02:00
Max Kellermann
9b4156a282 decoder/audiofile: add "noexcept" 2018-07-07 13:21:27 +02:00
Max Kellermann
89b1e27d2e decoder/audiofile: merge duplicate code into CheckAudioFormat(AFfilehandle) 2018-07-07 13:21:09 +02:00
Max Kellermann
1dcaf8f76a decoder/audiofile: call TagHandler::OnAudioFormat() 2018-07-07 13:18:06 +02:00
Max Kellermann
18508d1919 decoder/audiofile: merge audiofile_get_duration() into audiofile_scan_stream() 2018-07-07 13:16:38 +02:00
Max Kellermann
9f77d568e2 decoder/mad: call TagHandler::OnAudioFormat() 2018-07-07 13:10:39 +02:00
Max Kellermann
0d0569b9af decoder/mad: merge mad_decoder_total_file_time() into mad_decoder_scan_stream() 2018-07-07 13:09:23 +02:00
Max Kellermann
0f18e7baf9 decoder/mpg123: call TagHandler::OnAudioFormat() 2018-07-07 13:08:06 +02:00
Max Kellermann
d8b03d4927 decoder/ffmpeg: call TagHandler::OnAudioFormat() 2018-07-07 13:02:08 +02:00
Max Kellermann
86a02871fc decoder/vorbis: call TagHandler::OnAudioFormat() 2018-07-06 12:44:58 +02:00
Max Kellermann
3d3a1232b1 tag/Handler: convert to class with virtual methods 2018-07-05 19:07:05 +02:00
Max Kellermann
efb8a9bd2c player, decoder, output: wrap MusicPipe in std::shared_ptr/std::unique_ptr 2018-06-23 18:45:57 +02:00
Max Kellermann
2be905b2e2 MusicPipe: eliminate the unused MusicBuffer reference
This requires re-adding the reference to struct DecoderControl, which
was removed recently by commit
9f14e7a98d
2018-06-23 18:36:24 +02:00
Max Kellermann
54d295c247 MusicChunkPtr: managed MusicChunk pointer
Make all uses of MusicChunk safe.
2018-06-22 23:11:52 +02:00
Max Kellermann
9f14e7a98d MusicPipe: add MusicBuffer reference
This tiny amount of overhead allows omitting the MusicBuffer in
Clear().
2018-06-22 22:59:44 +02:00
Max Kellermann
d0fbf6db59 input/Stream: remove attribute "cond", replace with handler interface
This adds a bit of overhead, but also adds flexibility to the API,
because arbitrary triggers may be invoked from that virtual method
implementation, not just Cond::signal().

The motivation for this is to make the handlers more dynamic, for the
upcoming buffering class utilizing ProxyInputStream.
2018-06-22 19:37:18 +02:00
Max Kellermann
66a1e8b737 release v0.20.20
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlsD85IQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEm5xD/oCagsybi2L60r0trtjE7DJ+SnmgbjVmn3z
 aieaIA78KFK2QWUettevYkVwtwqEqyw5DwSDmxRRpm9sMKsdDBL+gLCf5hjIFNQY
 dZjyBIABgE+aAT+iYeXVmWgJI24s8znEGhZjUG5P/gf+CoLKvN5OQiZoBKOaurjX
 YwJUyLV1SXiMLV/4HtOFw4xORuRPflhZ5MnA+cO7BmpV0XQoq82XgBi3XqAB8dv4
 cIpDs0MU7DFHNUYHeHEWXVh1PgAcr2madWwQTiscuy8KRAR0GzkCsG5UrSyJs0xH
 c0yQ1vVt7X0nyxV35Yemmlfe4DwMwNK9avsTr3Mmr4tNDbxxhiddDYZzy6UJHKis
 vaVLhePLjXCOfPRivCY8zVZHwGTO5ArxQqftkGDnM1Gq8PwpTWLimZkvUW35d/xf
 SJ+ixpkA1O2DzmkyUam41phhXli+lt0hF1P/7dKsuV/fzmAkJlmRpgxJJhLH8mwq
 NNfHk8y8kdGoVy65e/u2asJe8PPB2y9NK2JmbBR9g6Dn+6puP4gkhok3a9cvUZ6q
 5GHJF9yRYswVkr/Y6q8UtESeEUczqrQTasVvq0fkxV0f17BKDbOxClb+ItrnPTWV
 WMfsyF3TYrHi4piB810q/nBY6pY7R2vQNCPMZwfjGlqn5amR2fm8QWecJVIPpkv3
 rEPv+4r8nQ==
 =DEYg
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.20'

release v0.20.20
2018-05-22 12:47:11 +02:00
Michal Koutenský
d495ec71a8 decoder/opus: add support for R128_ALBUM_GAIN tag 2018-05-07 10:57:03 +02:00
Max Kellermann
b763852f57 decoder/dsd: allow 4 MB ID3 tags
Closes #277
2018-05-07 10:53:48 +02:00
Max Kellermann
a8568d7246 Merge branch 'v0.20.x' 2018-05-03 20:15:11 +02:00
Max Kellermann
6522d2f722 decoder/{dsdiff,dsf}: support more MIME types
These are used by DSD-streaming servers.  For example, MiniDLNA uses
"audio/x-dsd".
2018-05-03 12:02:11 +02:00
Max Kellermann
43a43c1e2b release v0.20.19
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlriEvAQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEnEpD/4+yH4ydc9l1/j5AD08jFyUUe6YSnC8gLsG
 DRrSOU1BQltYAPhlRGxA/HlKxboaT7v5qcXBdIV+HwKs6149j8qxip8g8PYoUBmB
 mn6YckjEPCLpLe4WSvfGdm5a1aI7nMC76wHBvTPCAMTZk9FAmUED4DqgNYmWycOd
 MpXZbzZdvb2Ti4dQARrK8AbMjTD44LXDOhBgWYnZLpo1ovYhnGvTPAElCQN23tbT
 VMcJPYe86lzgs1vWwgURzkn7Y3CaSMF3G+aKw/oLEK3giZmE0y7Kov9Ycy4IC6+3
 aXuEP9drMIltAyZ2hmeH6JFigbgQbDhwuAu1biYLLukwa0oEOEFTP1+yxAVbi/vx
 58rD6uWJeFbqPna6146TAYVi8QeymJWfhFWxkcol2u7etrIxXpX//qo8Mv+AiLor
 wOrTerKgRFYmtSH14wIoSfKsn2wmsXOhDE38h621PAzqvQXDzrBLMo4HMJ4y+G+q
 Y6LZWatweL6I2qMsOKWvECOJNxQJrkDFOLq8Mj+O4v6iiLQWhiul1hi2g8EOcRMI
 SkdWTakla3LbmuUN1dKQJwoojNevnP5yPXI15rM6JMZkXJcWxi4mvnzoAFnBTmov
 57GxpShueo2yy9yrFgS7hBuRsBXzYxze/xY0LSYSO4SjCjNCnWXse6O9pI7JqFbI
 m5JJW96Nqg==
 =1wwq
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.19'

release v0.20.19
2018-04-26 20:06:41 +02:00
Max Kellermann
44b200240f player/Thread: never reuse decoder when switching radio streams
When switching to another song manually, the player checks if the
decoder is already decoding that song; if so, it will attempt to reuse
it by seeking it to the new position.  That however fails if the
decoder is not seekable (e.g. a radio stream) which leaves the user
unable to switch to that song with the bogus error message "Not
seekable".
2018-04-25 21:19:26 +02:00
Max Kellermann
60efdce5ff Merge branch 'v0.20.x' 2018-02-17 13:37:03 +01:00
Max Kellermann
026aef7465 decoder/flac: move the SubmitData() call out of the callback
This addresses two problems:

1. the libFLAC write callback had to send an error status to its
caller when SubmitData() returned a command; this disrupted libFLAC
and the resulting command could not be used for anything;

2. the libFLAC function FLAC__stream_decoder_seek_absolute() also
calls the write callback, but its result cannot be used, because
seeking is still in progress, so we lose all data from one FLAC frame.
By moving the SubmitData() call until after CommandFinished(), we
avoid losing this data.  This fixes another part of #113
2018-02-17 13:33:53 +01:00
Max Kellermann
b53a23b51b decoder/flac: call FlacSubmitToClient() again after seeking
See code comment.
2018-02-17 13:33:51 +01:00
Max Kellermann
2aad015392 decoder/flac: move code to FlacSubmitToClient() 2018-02-17 13:33:48 +01:00
Max Kellermann
986ec877b0 decoder/Bridge: truncate last chunk at the exact end_time
Instead of passing whole chunks to the MusicPipe and checking the
end_time after each chunk, truncate the last chunk if it would exceed
the end_time.  This requires keeping track of the absolute PCM frame
number.

This fixes a problem with gapless CUE song transitions: a small part
of the following song was always played twice.

Closes #113
2018-02-17 13:10:00 +01:00
Max Kellermann
bfc886cd54 decoder/Client: update API documentation 2018-02-17 08:20:07 +01:00
Max Kellermann
61f2ce67dd decoder/HybridDSD: implement seeking 2018-02-13 09:53:05 +01:00
Max Kellermann
60dbf1bea0 decoder/HybridDSD: calculate bit rate 2018-02-13 09:41:07 +01:00