diff --git a/Makefile.am b/Makefile.am index 1b7236b1e..543e53a5c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2261,7 +2261,9 @@ developer_DATA = $(wildcard doc/developer/*.html) DOCBOOK_HTML = $(patsubst %.xml,%/index.html,$(DOCBOOK_FILES)) -$(DOCBOOK_HTML): %/index.html: %.xml +DOCBOOK_INCLUDES = $(wildcard $(srcdir)/doc/include/*.xml) + +$(DOCBOOK_HTML): %/index.html: %.xml $(DOCBOOK_INCLUDES) $(XMLTO) -o $(@D) --stringparam chunker.output.encoding=utf-8 html --stringparam use.id.as.filename=1 $< doc/api/html/index.html: doc/doxygen.conf diff --git a/NEWS b/NEWS index cbf689761..99e0e5db6 100644 --- a/NEWS +++ b/NEWS @@ -52,11 +52,14 @@ ver 0.20 (not yet released) * update - apply .mpdignore matches to subdirectories -ver 0.19.15 (not yet released) +ver 0.19.15 (2016/04/30) * decoder - ffmpeg: support FFmpeg 3.0 - ffmpeg: use as fallback instead of "mad" if no plugin matches + - opus: support bigger OpusTags packets * fix more build failures on non-glibc builds due to constexpr Mutex +* fix build failure due to missing include +* fix unit test on Alpha ver 0.19.14 (2016/03/18) * decoder diff --git a/doc/developer.xml b/doc/developer.xml index aa3cc62c0..074c7f36d 100644 --- a/doc/developer.xml +++ b/doc/developer.xml @@ -1,6 +1,7 @@ - + + The Music Player Daemon - Developer's Manual diff --git a/doc/include/tags.xml b/doc/include/tags.xml new file mode 100644 index 000000000..554b43a82 --- /dev/null +++ b/doc/include/tags.xml @@ -0,0 +1,154 @@ + + + + + + + artist: the artist name. Its meaning is not + well-defined; see composer and + performer for more specific tags. + + + + + + artistsort: same as + artist, but for sorting. This usually omits + prefixes such as "The". + + + + + + album: the album name. + + + + + + albumsort: same as album, + but for sorting. + + + + + + albumartist: on multi-artist albums, this is + the artist name which shall be used for the whole album. The + exact meaning of this tag is not well-defined. + + + + + + albumartistsort: same as + albumartist, but for sorting. + + + + + + title: the song title. + + + + + + track: the track number within the album. + + + + + + name: a name for this song. This is not the + song title. The exact meaning of this tag is not well-defined. + It is often used by badly configured internet radio stations + with broken tags to squeeze both the artist name and the song + title in one tag. + + + + + + genre: the music genre. + + + + + + date: the song's release date. This is + usually a 4-digit year. + + + + + + composer: the artist who composed the song. + + + + + + performer: the artist who performed the song. + + + + + + comment: a human-readable comment about this + song. The exact meaning of this tag is not well-defined. + + + + + + disc: the disc number in a multi-disc album. + + + + + + musicbrainz_artistid: the artist id in the + MusicBrainz + database. + + + + + + musicbrainz_albumid: the album id in the + MusicBrainz + database. + + + + + + musicbrainz_albumartistid: the album artist + id in the MusicBrainz + database. + + + + + + musicbrainz_trackid: the track id in the + MusicBrainz + database. + + + + + + musicbrainz_releasetrackid: the release track + id in the MusicBrainz + database. + + + diff --git a/doc/mpd.conf.5 b/doc/mpd.conf.5 index a3a366895..bfec4cd1a 100644 --- a/doc/mpd.conf.5 +++ b/doc/mpd.conf.5 @@ -168,18 +168,6 @@ MP3 playback. This specifies whether relative or absolute paths for song filenames are used when saving playlists. The default is "no". .TP -.B metadata_to_use -This specifies the tag types that will be scanned for and made available to -clients. Note that you must recreate (not update) your database for changes to -this parameter to take effect. Possible values are artist, album, title, -track, name, genre, date, composer, performer, comment, disc, -musicbrainz_artistid, musicbrainz_albumid, musicbrainz_albumartistid, -musicbrainz_releasetrackid, musicbrainz_trackid. Multiple tags may be specified -as a comma separated list. -An example value is "artist,album,title,track". The special value "none" may -be used alone to disable all metadata. The default is to use all known tag -types except for comments and those starting with "musicbrainz". -.TP .B auto_update This specifies the whether to support automatic update of music database when files are changed in music_directory. The default is to disable autoupdate diff --git a/doc/mpdconf.example b/doc/mpdconf.example index 87d3021fb..4c5d6796a 100644 --- a/doc/mpdconf.example +++ b/doc/mpdconf.example @@ -116,7 +116,7 @@ # # This setting defines a list of tag types that will be extracted during the # audio file discovery process. The complete list of possible values can be -# found in the mpd.conf man page. +# found in the user manual. #metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" # # This setting enables automatic update of MPD's database when files in diff --git a/doc/protocol.xml b/doc/protocol.xml index db9f47e3f..7959acd36 100644 --- a/doc/protocol.xml +++ b/doc/protocol.xml @@ -1,6 +1,7 @@ - + + The Music Player Daemon protocol @@ -201,6 +202,25 @@ omitted, then the maximum possible value is assumed. + +
+ Tags + + + The following tags are supported by + MPD: + + + + + + There can be multiple values for some of these tags. For + example, MPD may return multiple + lines with a performer tag. A tag value is + a UTF-8 string. + +
diff --git a/doc/user.xml b/doc/user.xml index 1e308c5d8..2556f6c2d 100644 --- a/doc/user.xml +++ b/doc/user.xml @@ -1,6 +1,7 @@ - + + The Music Player Daemon - User's Manual @@ -779,6 +780,33 @@ systemctl start mpd.socket
Other Settings + + + + + Setting + Description + + + + + + metadata_to_use + TAG1,TAG2,... + + + Use only the specified tags, and ignore the others. + This setting can reduce the database size and + MPD's memory usage by + omitting unused tags. By default, all tags but + comment are enabled. The special + value "none" disables all tags. + + + + + +
The State File @@ -1134,6 +1162,19 @@ database {
+
+ Metadata + + + When scanning or playing a song, + MPD parses its metadata. The + following tags are supported: + + + +
+
The queue diff --git a/src/decoder/DecoderBuffer.hxx b/src/decoder/DecoderBuffer.hxx index fd6191acb..1ff4f8387 100644 --- a/src/decoder/DecoderBuffer.hxx +++ b/src/decoder/DecoderBuffer.hxx @@ -25,6 +25,7 @@ #include "util/ConstBuffer.hxx" #include +#include struct Decoder; class InputStream; diff --git a/src/decoder/plugins/OpusDecoderPlugin.cxx b/src/decoder/plugins/OpusDecoderPlugin.cxx index 7d91cf72e..df16eae37 100644 --- a/src/decoder/plugins/OpusDecoderPlugin.cxx +++ b/src/decoder/plugins/OpusDecoderPlugin.cxx @@ -440,13 +440,15 @@ mpd_opus_scan_stream(InputStream &is, if (!oy.ExpectFirstPage(os)) return false; - /* read at most two more pages */ - unsigned remaining_pages = 2; + /* read at most 64 more pages */ + unsigned remaining_pages = 64; + + unsigned remaining_packets = 4; bool result = false; ogg_packet packet; - while (true) { + while (remaining_packets > 0) { int r = ogg_stream_packetout(&os, &packet); if (r < 0) { result = false; @@ -465,6 +467,8 @@ mpd_opus_scan_stream(InputStream &is, continue; } + --remaining_packets; + if (packet.b_o_s) { if (!IsOpusHead(packet)) break; diff --git a/src/encoder/plugins/WaveEncoderPlugin.cxx b/src/encoder/plugins/WaveEncoderPlugin.cxx index cf6cd3c54..4311bf96c 100644 --- a/src/encoder/plugins/WaveEncoderPlugin.cxx +++ b/src/encoder/plugins/WaveEncoderPlugin.cxx @@ -27,6 +27,8 @@ #include #include +static constexpr uint16_t WAVE_FORMAT_PCM = 1; + struct WaveEncoder { Encoder encoder; unsigned bits; @@ -64,15 +66,15 @@ fill_wave_header(struct wave_header *header, int channels, int bits, header->id_fmt = ToLE32(0x20746d66); header->id_data = ToLE32(0x61746164); - /* wave format */ - header->format = ToLE16(1); // PCM_FORMAT + /* wave format */ + header->format = ToLE16(WAVE_FORMAT_PCM); header->channels = ToLE16(channels); header->bits = ToLE16(bits); header->freq = ToLE32(freq); header->blocksize = ToLE16(block_size); header->byterate = ToLE32(freq * block_size); - /* chunk sizes (fake data length) */ + /* chunk sizes (fake data length) */ header->fmt_size = ToLE32(16); header->data_size = ToLE32(data_size); header->riff_size = ToLE32(4 + (8 + 16) + (8 + data_size)); diff --git a/test/test_byte_reverse.cxx b/test/test_byte_reverse.cxx index 86d29c32d..ca4380fc8 100644 --- a/test/test_byte_reverse.cxx +++ b/test/test_byte_reverse.cxx @@ -49,9 +49,9 @@ CPPUNIT_TEST_SUITE_REGISTRATION(ByteReverseTest); void ByteReverseTest::TestByteReverse2() { - static const char src[] = "123456"; + static const char src[] gcc_alignas(uint16_t, 2) = "123456"; static const char result[] = "214365"; - static uint8_t dest[ARRAY_SIZE(src)]; + static uint8_t dest[ARRAY_SIZE(src)] gcc_alignas(uint16_t, 2); reverse_bytes(dest, (const uint8_t *)src, (const uint8_t *)(src + ARRAY_SIZE(src) - 1), 2); @@ -73,9 +73,9 @@ ByteReverseTest::TestByteReverse3() void ByteReverseTest::TestByteReverse4() { - static const char src[] = "12345678"; + static const char src[] gcc_alignas(uint32_t, 4) = "12345678"; static const char result[] = "43218765"; - static uint8_t dest[ARRAY_SIZE(src)]; + static uint8_t dest[ARRAY_SIZE(src)] gcc_alignas(uint32_t, 4); reverse_bytes(dest, (const uint8_t *)src, (const uint8_t *)(src + ARRAY_SIZE(src) - 1), 4);