Commit Graph

25 Commits

Author SHA1 Message Date
Max Kellermann
08879d2a20 DetachedSong: add move operator 2017-02-08 10:24:40 +01:00
Max Kellermann
1292af4768 Revert "DetachedSong: remove explicitly-defaulted copy/move constructors"
This reverts commit 67b7d46432.

Turns out I was wrong, and mentioning these does make a difference:
the implicit move constructor is not defined in the presence of a
user-declared destructor.
2017-02-08 10:21:35 +01:00
Max Kellermann
4f0fe66f69 DetachedSong: make the LightSong constructor public
Sometimes, it's useful to construct a DetachedSong from a LightSong
even without having real_uri initialized.
2017-02-08 09:45:37 +01:00
Max Kellermann
67b7d46432 DetachedSong: remove explicitly-defaulted copy/move constructors
Mentioning these doesn't make a difference.
2017-02-08 09:40:29 +01:00
Max Kellermann
97ae594375 DetachedSong: use C++11 initializers 2017-01-18 13:13:36 +01:00
Max Kellermann
e847ddf011 DetachedSong: compare start_time and end_time in IsSame()
This method is used by DecoderControl::IsCurrentSong(), which is used
by the player thread to check whether the current decoder instance can
be reused to seek.  When switching to another song in the same CUE
sheet, previously DetachedSong::IsSame() returned true, and thus the
old decoder instance was used for the new song, not considering the
new end_time.  This led to the old decoder quickly quitting.
2017-01-15 00:54:25 +01:00
Max Kellermann
5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann
1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann
6350089e51 release v0.19.13
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWzMnGAAoJECNuiljG20US5yYP/jL9A313aMgUO/R8eVGNc7uJ
 CwiKROtgd+M47si1qdduzdrPKrFK2tEGYT0El5uQsyDuIsmPB01c3ZqnlM8oO6ca
 5tXXJiEvyMkupCEzAajTHqvDCyPx0+o1ektYm9SouAULjOMztIpsVU3oKc8Z78Yc
 TkpaRwUjNaekGLf0kATesBYnWkKR7S/TLYKmaKUaPCcK/i2S8YhTC57a1yZjg3lE
 w57Kh+tFLZCSiZChk9A5D6w1kKzDgiyNGRYK4F2TRfiQ6hML4F45EFgzfCg+zHi8
 +OIE9C1ZQt/NQ6mib+OUWoGuHtfjR20F/OFnQEYvkyXQ32j1sbALe7IHCceX7IHl
 U88hcIh2yEr1x3TUaVyYPLze4FBq/Uxv/gFH8FVKTWmcb90MJgXCNFbO3sfO9kk0
 KYK0IDoHE9MSmWhblA1FFFHU8VmCMsTN0VhBan+XP2wgXnGX+UvjU7AWJm4Fkwx0
 H8uP0Si5wtI9DZ+2SRyGhMfW/+pHsqD+O6PoSSfUyU3ZnPy+cAVEC+67oKJ9pZkA
 najeYaMt0Kz88RvLEwNeLkiys62O8aTsBpfjeNfmUAISJzZZbIvC20tyroHrju30
 TgbXff2Hnx4q+NQ7nbQN5HMVZ2JLLPMYYw+N0dP41g/ULubHS6btGOVwgTWoFwBo
 i2L1uscoD1ONxIEOlIvl
 =X7s3
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.13'

release v0.19.13
2016-02-23 22:13:43 +01:00
Max Kellermann
e1d7a5cbf5 DetachedSong: add method MoveTagItemsFrom() 2016-02-23 20:59:44 +01:00
Max Kellermann
fc2154ee92 DetachedSong: move code from Update() to LoadFile()
Avoid duplicate AllocatedPath::FromUTF8() invocations in two callers.
2015-10-20 12:10:42 +02:00
Max Kellermann
ac7e0dfb77 DetachedSong: remove obsolete friend declaration 2015-01-12 20:56:07 +01:00
Max Kellermann
712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann
7c25d83f1c Tag: use SignedSongTime for the song duration 2014-08-29 13:20:58 +02:00
Max Kellermann
6ad933982f DetachedSong: use std::chrono::duration for start_ms and end_ms 2014-08-28 13:03:18 +02:00
Max Kellermann
c13810ebaa Mapper: move map_song_detach() to db/DatabaseSong.cxx
Use Storage::MapUTF8() internally, don't use global variables.
2014-02-07 00:42:14 +01:00
Max Kellermann
53a13e8bc6 DetachedSong: un-inline the destructor
Reduce bloat.
2014-01-23 21:22:52 +01:00
Max Kellermann
5d4b450c52 DetachedSong: add attribute "real_uri"
Prepare for UPnP songs that retain there database identity.
2014-01-21 21:06:56 +01:00
Max Kellermann
483b1f51c9 DetachedSong: remove parameter names from "defaulted" constructors
Suppresses gcc warnings.
2014-01-21 21:06:56 +01:00
Max Kellermann
21209ff46b DetachedSong: use "default" copy/move constructors
Remove unnecessary explicit code.
2014-01-21 20:38:13 +01:00
Max Kellermann
f5ae1ce00b LightSong: new class to be used by DatabasePlugin callbacks
Detach the Song class completely from the public API, only to be used
by SimpleDatabase and the update thread.
2014-01-19 17:04:51 +01:00
Max Kellermann
61b01f82ef Mapper: add function map_song_detach()
Make the DetachedSong(Song) conversion constructor private.  Everybody
should use map_song_detach() which will take over more
responsibilities soon.
2014-01-17 23:51:14 +01:00
Max Kellermann
9fb82f9687 DetachedSong: add method Update()
Don't create an intermediate Song instance when all we want is a
DetachedSong.
2014-01-15 12:05:44 +01:00
Max Kellermann
df80deb070 DetachedSong: remove misplaced std::move() 2014-01-15 11:52:17 +01:00
Max Kellermann
322b061632 DetachedSong: fork of struct Song
From now on, struct Song will be used by the database only, and
DetachedSong will be used by everybody else.  DetachedSong is easier
to use, but Song has lower overhead.
2014-01-09 09:05:58 +01:00