Commit Graph

93 Commits

Author SHA1 Message Date
Jonas Kvinge 2e61235403 Application: Use shared pointers
Fixes #1239
2023-07-21 05:55:24 +02:00
Jonas Kvinge d6b53f78ab Cleanup includes 2023-07-21 05:25:57 +02:00
Roman Lebedev 13d6cf201f Engine: pipe-in the EBU R 128 loudness normalization gain stuff
The idea is that Integrated Loudness is an integral part
of the song, much like knowing it's beginning / ending
in the file, and we must handle it the exact same way,
and pipe it through all the way.

At the same time, `EngineBase` knows Target Level (from settings),
and these two combined tell us the Gain needed to normalize the
Loudness of the particular Song (`EngineBase::Load()` does that).
So the actual backend only needs to handle the Volume.

We don't currently support changing Target Level on the fly.
We don't currently support changing Loudness-normalizing Gain on the fly.

This does not handle the case when the song is loaded from URL
and thus the EBU R 128 measures, that exist, are not nessesairly correct.
2023-07-12 14:34:04 +02:00
Jonas Kvinge e9f3281694 Rename EngineBase 2023-04-22 19:13:42 +02:00
Jonas Kvinge bee6b7f946 Rename original_url to media_url 2023-04-21 16:20:00 +02:00
Jonas Kvinge dd72fb4ca5 Use C++11 enum class 2023-02-18 14:09:30 +01:00
Jonas Kvinge 205b7f2401 Split utilities functions into separate files 2022-12-28 22:53:59 +01:00
Jonas Kvinge 55e04dd520 Player: Fix volume adjustment 2022-12-03 05:29:39 +01:00
Jonas Kvinge b92ec71810 Use system volume when possible
Fixes #1037
2022-12-03 04:33:22 +01:00
Jonas Kvinge 52139fbaa0 Player: Reverse if 2022-10-18 20:09:38 +02:00
Jonas Kvinge 93f12baf51 Fix narrowing conversions in connects 2022-09-12 23:18:54 +02:00
Jonas Kvinge 2b24ac54a0 Remove unused includes 2022-08-28 03:09:33 +02:00
Jonas Kvinge d97b0478a7 Fix typos 2022-08-28 02:44:37 +02:00
Jonas Kvinge acb6c0fc83 Use PlaylistFilter directly 2022-08-09 17:23:46 +02:00
Jonas Kvinge 98682a2da9 Use C++17 fallthrough 2022-07-26 20:37:06 +02:00
Jonas Kvinge f6b70fda71 Formatting 2022-03-22 21:09:05 +01:00
Jonas Kvinge fd5970b647 Player: Don't set volume lower than 0 or higher than 100.
Fixes #884
2022-01-29 20:32:33 +01:00
Jonas Kvinge 79ac53b2d9 Fix narrowing conversions 2021-10-30 02:21:29 +02:00
Jonas Kvinge c946c1d1c4 Player: Don't preload next song while playing module music
Workaround bug in GStreamer

Fixes #787
Fixes #772
2021-10-12 22:59:23 +02:00
Jonas Kvinge ea2bfbda44 Formatting 2021-08-23 21:21:08 +02:00
Jonas Kvinge c6e42e1032 Reset play offset when switching song while paused
Fixes #735
2021-07-23 21:32:12 +02:00
Jonas Kvinge a6742d401c Formatting 2021-07-11 07:40:57 +02:00
Jonas Kvinge 0e8ae1a206 Change to std::shared_ptr 2021-07-01 02:02:02 +02:00
Jonas Kvinge 215057ce6f Remove unneeded get() 2021-06-22 14:04:42 +02:00
Jonas Kvinge ed09627fdb Use std::make_unique 2021-06-21 15:40:44 +02:00
Jonas Kvinge 3a3305c020 Uppercase literal suffix 2021-06-20 23:49:04 +02:00
Jonas Kvinge bee30e572f Fix incorrect use of return 2021-06-20 02:25:36 +02:00
Jonas Kvinge 8fd32aba4f Improve resume playback on startup, re-request stream URL when unpausing
Fixes #270
2021-06-10 23:14:05 +02:00
Jonas Kvinge 86c267eb89 Seconds is already qint64 2021-04-26 23:13:37 +02:00
Jonas Kvinge 59bffed47f Use static_cast 2021-03-21 18:53:02 +01:00
Jonas Kvinge 54f2aa5f77 Update copyrights 2021-03-20 21:14:47 +01:00
Jonas Kvinge 2695169514 Add type to metadata bundle to avoid updating previous song when it shouldn't 2021-03-13 03:14:30 +01:00
Jonas Kvinge bf7c8df353
Connection syntax migration (#637) 2021-01-26 16:48:04 +01:00
Jonas Kvinge c482e264f4 Rename variable 2020-12-04 19:13:21 +01:00
Nicolas Toussaint 3a9a1f0a94
add CLI play-playlist option, to play given playlist name. (#608)
* add CLI play-playlist option, to play given playlist name.

* Apply MR change requests
2020-12-04 19:08:41 +01:00
Jonas Kvinge b6693a71f9 Rename initialise to initialize 2020-10-17 17:29:09 +02:00
Jonas Kvinge c1eb20a20b Force inform in Player::NextItem 2020-10-02 20:38:14 +02:00
Jonas Kvinge 48ee471def Remove force inform in PreviousItem 2020-10-01 20:30:31 +02:00
Jonas Kvinge 872da05ff6 Inform of song change on play restart, add playlist auto sorting.
Fixes #511
2020-10-01 19:58:16 +02:00
Jonas Kvinge b81cfa8acb Update stream url to avoid requesting it twice 2020-09-29 23:03:50 +02:00
Jonas Kvinge 938ee20f1f Make sure song changed is only called once 2020-09-29 22:40:43 +02:00
Jonas Kvinge b63030d302 Don't send now playing twice
Fixes #548
2020-09-28 17:47:45 +02:00
Jonas Kvinge 82142751de Improve playlist autoscrolling
Fixes #420
2020-08-23 19:37:24 +02:00
Jonas Kvinge 4e5755f218 Refactor some functions 2020-08-23 19:17:50 +02:00
Jonas Kvinge 16a753bd95 Treat erors returned by the URL handler as non fatal
Fixes #505
2020-08-09 02:52:18 +02:00
Jonas Kvinge 07553476d4 Remove xine 2020-07-16 00:59:46 +02:00
Jonas Kvinge 5099aff5c3 Fix increasing play count when stop after track is enabled
Fixes #458
2020-06-18 22:18:49 +02:00
Jonas Kvinge 5d6b0fa329 Reset last played song when playlist is finished 2020-05-10 13:08:29 +02:00
Jonas Kvinge 6e061764ee Remove phonon 2020-04-25 01:42:29 +02:00
Jonas Kvinge 4abc650edf Make scrobbler handle streams 2020-04-25 00:07:42 +02:00