Commit Graph

74 Commits

Author SHA1 Message Date
Jonas Kvinge 6a51ee32b5 Spotify WIP 2024-04-04 22:36:38 +02:00
Jonas Kvinge 9bbffe150f GstEnginePipeline: Add back volume sync for auto
We need to remove the volume sync when the element is deleted on "deep-element-removed", then re-add it on the next "deep-element-added" that isn't a fakesink.

Fixes #1123
2024-03-24 19:36:32 +01:00
Jonas Kvinge f84ce3f1d1 Add exclusive mode option for WASAPI 2024-02-20 01:08:00 +01:00
Jonas Kvinge 33041ffa75 GstEnginePipeline: Delay seek when when resetting next URI
When seeking after the next URI is set, we set the state to READY to switch the URI back. The seek in after going to ready sometimes does not work, delay the seek to workaround this.

Fixes #1258
2023-10-10 23:00:11 +02:00
Jonas Kvinge fed5b6b695 GstEnginePipeline: Rename ebur128 volume variable 2023-08-06 13:36:25 +02:00
Jonas Kvinge 2e61235403 Application: Use shared pointers
Fixes #1239
2023-07-21 05:55:24 +02:00
Roman Lebedev 4bd993b1e3 GstEngine/GstEnginePipeline: support gap-less playback w/ loudness-normalizing gain
Ok, it does appear that it is that simple.

In principle this (even the non-update case) results in volume jumps,
so maybe we'll want gradual gain change...

Notably, i thought we'd always seek if the pipeline
was already operating on the same URL as the new one,
but apparently only for adjacent songs?
2023-07-12 14:34:04 +02:00
Roman Lebedev 94ab788032 GstEnginePipeline: actually perform (EBU R 128) loudness normalization
The magic: if EBU R 128 loudness normalization is enabled,
just insert `volume` GST element into the pipeline
(where ReplayGain would be inserted) and configure it.

We currently don't support changing said gain after the pipeline
was created. We might need to, though, for a number of reasons.
2023-07-12 14:34:04 +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 c96498758f Fix and improve gapless playback
If "about-to-finish" was emitted before the preload time was reached, we never set the next uri, so gapless playback was broken.
Make sure to always set the next uri, and increase preload gap from 5 to 8 seconds.
2023-04-22 03:54:11 +02:00
Jonas Kvinge bee6b7f946 Rename original_url to media_url 2023-04-21 16:20:00 +02:00
Jonas Kvinge aaa530e72b Add const/references to all signal parameters 2023-04-09 20:23:42 +02:00
Jonas Kvinge b59aa0827e GstEnginePipeline: Always set initial volume 2023-04-07 02:30:41 +02:00
Jonas Kvinge a1adc1a75a Add option for strict SSL mode in backend settings 2023-03-19 23:02:17 +01:00
Jonas Kvinge b16bec704a GstEnginePipeline: Use "source-setup" instead of "notify::source" signal
This works with both playbin 2 and 3.

Possible fix for #1148
2023-03-19 22:28:12 +01:00
Jonas Kvinge 1dfe07003f GstEnginePipeline: Set and notify volume only when changed
Another fix for #1089
2023-01-03 21:32:20 +01:00
Jonas Kvinge 4ec028e736 GstEnginePipeline: Change callback ID's to long 2023-01-03 19:51:23 +01:00
Jonas Kvinge 6d05bb2de5 GstEnginePipeline: Remove upstream events and buffer probes
Also rename some variables and callback functions

Possible fix for #1090
2023-01-02 00:06:18 +01:00
Jonas Kvinge b2073df3c3 GstEnginePipeline: Detect if autoaudiosink has volume
Fixes #1037
2022-12-04 08:37:33 +01:00
Jonas Kvinge b2d06f900b GstEnginePipeline: Correct parameter name for SetFaderVolume function 2022-12-03 04:47:41 +01:00
Jonas Kvinge b92ec71810 Use system volume when possible
Fixes #1037
2022-12-03 04:33:22 +01:00
Jonas Kvinge d97b0478a7 Fix typos 2022-08-28 02:44:37 +02:00
Jonas Kvinge c246b8f164 GstEngine: Show debug information in error dialog 2022-04-14 20:56:57 +02:00
Jonas Kvinge 5a35099043 Add support for bs2b
Improve headphone listening of stereo audio records
2022-03-05 01:30:49 +01:00
Jonas Kvinge 7caeb47637 GstEnginePipeline: Use std::shared_ptr with deleteLater() for fader timeline
Fixes #890
2022-02-05 19:33:21 +01:00
Jonas Kvinge 79ac53b2d9 Fix narrowing conversions 2021-10-30 02:21:29 +02:00
Jonas Kvinge c3ce6cff72 GstEngine: Move CreateElement() to GstEnginePipeline 2021-10-16 21:28:56 +02:00
Jonas Kvinge f3b70d1cb2 GstEnginePipeline: Rename variable 2021-10-12 18:36:13 +02:00
Jonas Kvinge fd74bbc868 Remove unused GstElementDeleter 2021-10-10 16:33:07 +02:00
Jonas Kvinge d0f1522f0d GstEnginePipeline: Use gst_bus_remove_watch to remove bus watch 2021-10-08 23:39:29 +02:00
Jonas Kvinge 8c2b907ff5 Make static 2021-06-22 14:04:42 +02:00
Jonas Kvinge e1bf4347ab Fix uninitialized variables 2021-06-20 23:53:28 +02:00
Jonas Kvinge 1295033fae Clang-Tidy and Clazy fixes 2021-06-20 19:04:08 +02:00
Jonas Kvinge f786a17014 Formatting 2021-06-12 20:53:23 +02:00
jonas@jkvinge.net 5d96ee5492 Add ALSA PCM devices and option to set channels
Fixes #262
2021-05-11 19:14:00 +02:00
Jonas Kvinge 9d3000498b Add setting for setting reply gain fallback gain 2021-04-22 21:55:26 +02:00
Jonas Kvinge 54f2aa5f77 Update copyrights 2021-03-20 21:14:47 +01:00
Jonas Kvinge 914dee8571 Pass network proxy settings to gstreamer
Fixes #558
2020-11-04 22:16:20 +01:00
Jonas Kvinge 95ac85f642 Move stream discoverer from pipeline to engine
Fixes #491
2020-10-21 00:07:58 +02:00
Jonas Kvinge b6693a71f9 Rename initialise to initialize 2020-10-17 17:29:09 +02:00
Jonas Kvinge 4a53d4f043 Ignore "IDirectSoundBuffer_GetStatus The operation completed successfully"
Fixes #557
2020-10-13 00:49:34 +02:00
Jonas Kvinge 74a5233b5d Replace use of deprecated gstreamer low-percent
- Add settings for low-watermark and high-watermark
- Add button to reset buffer settings to defaults
2020-10-07 20:29:26 +02:00
Jonas Kvinge 638998a861 Replace QTimeLine::CurveShape with QEasingCurve 2020-07-18 17:53:14 +02:00
Jonas Kvinge b22e8b4702 Convert S24LE and F32LE for analyzer
Fixes #155
2020-07-04 00:29:11 +02:00
Jonas Kvinge 651020388d Use override 2020-06-15 21:55:05 +02:00
Jonas Kvinge 082c9097e4 Fix parameter name mispatches 2020-06-14 18:58:24 +02:00
Jonas Kvinge c69fff52cc Remove useless using std 2020-04-20 17:49:06 +02:00
Jonas Kvinge 21b2193cd0 Add explicit 2020-04-07 16:49:15 +02:00
Jonas Kvinge 1851f26e3f Reduce includes 2020-02-09 02:29:35 +01:00