Commit Graph

119 Commits

Author SHA1 Message Date
Jonas Kvinge
e6a0945dfa Call QObject::metaObject 2025-01-17 09:08:59 +01:00
Jonas Kvinge
218dd439b6 Player: Use shared pointer for engine 2024-11-10 01:21:25 +01:00
Jonas Kvinge
7f3293609b Player: Always use GStreamer 2024-11-10 01:11:43 +01:00
Jonas Kvinge
4b0b0aa989 Player: Simplify creating engine 2024-11-10 00:16:04 +01:00
Jonas Kvinge
975d0dff25 Move GstStartup 2024-11-09 23:39:31 +01:00
Jonas Kvinge
8da2b9cd94 Refactoring 2024-11-01 23:04:42 +01:00
Jonas Kvinge
e4a57aa768 Remove VLC 2024-09-28 16:38:23 +02:00
Jonas Kvinge
f2e28d18bc Player: Initialize variable 2024-09-28 12:27:51 +02:00
Jonas Kvinge
fa6ac4df41 Include fixes 2024-09-25 23:52:56 +02:00
Jonas Kvinge
4270b12cd1 Replace QLatin1String with operator _L1 2024-09-12 22:13:21 +02:00
Jonas Kvinge
2a9ccd7480 Set object names 2024-09-02 22:26:36 +02:00
Jonas Kvinge
8da616491d Replace emit with Q_EMIT 2024-08-25 01:06:30 +02:00
Jonas Kvinge
7ebcc73a49 More const detach fixes 2024-08-23 20:30:59 +02:00
Jonas Kvinge
8890a3dd0f Delay play until playlists have finished loading
Fixes #1465
2024-08-17 22:38:48 +02:00
Jonas Kvinge
548fa3f6ee Wait for set state to finish before deleting pipeline
Setting state to GST_STATE_NULL sometimes blocks, to fix this use the threadpool to set the state to NULL and wait with deleting the pipeline until the state is changed.
This fixes blocking the main thread when switching Spotify songs.
2024-08-10 18:22:56 +02:00
Jonas Kvinge
9f9c46e370 Update individual playlist columns, use enum class 2024-06-20 22:52:27 +02:00
jj
ef99f0ef36 Add volume increment setting 2024-06-06 21:53:16 +02:00
Jonas Kvinge
426de61525 Add const and std::as_const 2024-04-23 17:15:42 +02:00
Jonas Kvinge
d10eb4370e Player: Use chrono_literals 2024-04-23 16:53:12 +02:00
Jonas Kvinge
398db964b8 Use QDateTime::currentSecsSinceEpoch 2024-04-23 16:48:51 +02:00
Jonas Kvinge
0c6872b352 Disable automatic conversions from 8-bit strings 2024-04-13 05:05:33 +02:00
Jonas Kvinge
f5547f093e Player: Use timer for saving volume
Fixes #1272
2024-04-02 17:16:29 +02:00
Jonas Kvinge
5e725e0bbe Fix playlist shuffle
- Shuffle all indexes
- Use persistent indexes to store play history
- Update virtual items to keep original shuffle order when the playlist is reordered
- Make sure to always set virtual index on manual shuffle
- Ignore repeat and shuffle when dynamic playlist is activated

Fixes #707
Fixes #1381
Fixes #1366
Fixes #1353
2024-03-22 20:00:12 +01:00
BetterCallMolly
84c6e09c42 Player: Fix crossfade crash when decoding fails
When the decoding of a track fails, `current_item_` is set to an invalid address, if the Crossfade option is enabled, the `Player::TrackAboutToEnd` method does not check whether `current_item_` is a valid pointer or not, causing a segmentation fault.

Player: Removed extra space
2023-12-03 22:07:09 +01:00
Jonas Kvinge
f40f43861d EngineBase: Use enum class for TrackChangeType 2023-10-03 20:18:52 +02:00
Jonas Kvinge
e273d64be3 Player: Always stop after 100 errors
Fixes #1199
2023-08-01 16:59:43 +02:00
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