Anna Schumaker
8efb752614
audio: Add support for gapless playback
...
By responding to the about-to-finish signal. If it looks like we're
about to pause, then we let the EOS handler handle it instead.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-08 10:07:46 -04:00
Anna Schumaker
ba1a444bdf
audio: Have the player handle Autopause adjustments
...
Putting this in the playlist layer was an experiment, but it's easier to
do from the Player now that we've abstracted out all the Gstreamer stuff
into the BassClass
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-08 10:07:46 -04:00
Anna Schumaker
3a50235c38
audio: Rework the Artwork widget
...
It now sets artwork based on the signals sent by the player, allowing us
to move it out of the Player class and create instances based on the
global Player instead.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-08 10:07:45 -04:00
Anna Schumaker
f55377cc69
audio: Remove the Player get_state() function
...
We can just check the playing property from the BasePlayer instead
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-07 15:55:11 -04:00
Anna Schumaker
8e509345bf
audio: Clean up loading tracks
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-07 15:55:07 -04:00
Anna Schumaker
39794c0830
audio: Move play_track() out of the Player
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-07 15:55:03 -04:00
Anna Schumaker
b95ad55c9a
audio: Give the BassPlayer an artwork signal
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-07 14:46:29 -04:00
Anna Schumaker
08696dd17a
audio: Give the BassPlayer signals for eos and about-to-finish
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-07 14:46:00 -04:00
Anna Schumaker
e467b784e4
audio: Give the BassPlayer a play_percent property
...
For calculating what percentage of a song has been played, which is used
to determine if a track can be marked as played or not
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-07 14:46:00 -04:00
Anna Schumaker
51e8bc295d
audio: Give the BassPlayer a volume property
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-07 14:46:00 -04:00
Anna Schumaker
fa2cbcc261
audio: Give the BassPlayer a position property
...
I use the state change callbacks to send a position-changed signal on a
regular interval when playback is going. Seeking is handled by setting
the position property to a new value.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-07 14:45:42 -04:00
Anna Schumaker
a4595eab93
audio: Give the BassPlayer a duration property
...
I also add a duration-changed signal so the seek scale can update its
range.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-07 14:45:42 -04:00
Anna Schumaker
a4464cd7d9
audio: Give the BassPlayer a playing property
...
To set either Gst.State.PLAYING or Gst.State.PAUSED on the playbin. I
also add two signals for playback-start and playback-paused that the
PlayPause button can use.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-07 14:45:34 -04:00
Anna Schumaker
c2c6ac7890
audio: Give the BassPlayer a uri property
...
With both setter and getter to change the playbin uri
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-06 10:48:03 -04:00
Anna Schumaker
574e49ef09
audio: Give the BassPlayer a bus property
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-04 08:33:15 -04:00
Anna Schumaker
990a8047d9
audio: Create a new BassPlayer class
...
My intention is to use this to handle GStreamer stuff so I can separate
out the higher level functions like next(), previous(), and load_track()
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-04 08:32:14 -04:00
Anna Schumaker
94235b1ce8
Emmental 2.4
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:33:18 -04:00
Anna Schumaker
76bf68f484
audio: Replace the old Controls widget with AudioControls
...
And grab the global Player instance during construction.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:58 -04:00
Anna Schumaker
ef1d3f0985
audio: Create a custom AudioControls widget
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:58 -04:00
Anna Schumaker
ca47bd052f
audio: Create a custom MenuButton and MenuIcon
...
This mimics the behavior of the Gtk.MenuButton(), except it allows
updating the ToggleButton child widget with the current autopause count.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:58 -04:00
Anna Schumaker
bd49396210
audio: Create a custom ControlsPopover widget
...
For displaying our menu controls
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:58 -04:00
Anna Schumaker
68f0541079
audio: Create a custom AutoPauseControlBox
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:58 -04:00
Anna Schumaker
d551e0ea13
audio: Create a custom VolumeControlBox
...
I also create a shared base class at the same time so autopause controls
can use it as well.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:57 -04:00
Anna Schumaker
da1211f595
audio: Add a custom AutoPauseScale widget
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:23:38 -04:00
Anna Schumaker
edc3e7f876
audio: Add a custom VolumeScale widget
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:23:37 -04:00
Anna Schumaker
33c7bdf517
audio: Add a custom PlayPause button
...
And update the image based on the current playback state
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker
ec9ed14474
audio: Create custom PreviousButton and NextButton buttons
...
Along with a shared base class for these buttons, and soon the
PlayPause button
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker
e4f6018195
audio: Replace the old Seeker widget with a ScaleButtonbox
...
And make the widget separate from the audio Player
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker
e4236b0bf4
audio: Create a custom ScaleButtonBox
...
This configures the buttons for a scale and places them into a GtkBox
widget for us to use.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker
644706ef50
audio: Add custom ScaleButtons
...
Thes buttons handle Increment and Decrement operations
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker
1c53886152
audio: Add a custom SeekScale widget
...
For handling seeks to the audio player
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker
753f6477a7
audio: Create a custom ScalePlus widget
...
For giving GtkScales increment() and decrement() functionality that
triggers the "change-value" signal
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:41 -04:00
Anna Schumaker
e884dc5a6e
audio: Clean up the NowPlaying widget
...
It now uses the TrackTitle and TrackArtist labels. Additonally, I move
it out of the Player class and create a shortcut function for
instantiating one using the global Player instance
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-31 15:13:18 -04:00
Anna Schumaker
ae7c2010e9
audio: Add a custom TrackArtist label
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-31 10:09:18 -04:00
Anna Schumaker
4ab66ef7ab
audio: Add a custom TrackTitle label
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-31 10:04:27 -04:00
Anna Schumaker
5c2e4bb016
audio: Convert the Player into a GObject
...
And give it "state-changed" and "track-changed" signals.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 17:30:55 -04:00
Anna Schumaker
596b34eb5a
Emmental 2.3 AUR commit
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 15:17:48 -04:00
Anna Schumaker
cf912cc9f5
Emmental 2.3
...
Implemented new code for scanning files using idle tasks. I keep the
thread-based approach for now, since we're still using the tagdb and not
sqlite yet.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 15:00:25 -04:00
Anna Schumaker
98ef8bf3f3
scanner: Add shortcuts for creating widgets
...
These use the global queue instance to create appropriate widgets with
the same name.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 11:34:19 -04:00
Anna Schumaker
5f6f3f9f42
scanner: Create a global Queue instance
...
And some convenience functions for using it
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 11:13:49 -04:00
Anna Schumaker
e09d892a46
scanner: Create a custom AddFolderButton widget
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 11:13:49 -04:00
Anna Schumaker
0157b1d4c0
scanner: Create a custom DirectoryChooser widget
...
It is set up to view and select directories only, with a shortcut added
for the user's Music directory.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 11:13:49 -04:00
Anna Schumaker
7535b71724
scanner: Create a custom UpdateAllButton widget
...
For updating all libraries in the database.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 11:13:49 -04:00
Anna Schumaker
8f837b40c1
scanner: Create a custom RemoveButton widget
...
For removing a specific library from the database.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 11:13:49 -04:00
Anna Schumaker
5e08088462
scanner: Create a custom UpdateButton widget
...
When clicked, it updates a specific Library instance
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 11:13:49 -04:00
Anna Schumaker
94b53aff5f
scanner: Create a custom ProgressBar widget
...
For use tracking the progress we make through the TaskQueue
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 11:13:49 -04:00
Anna Schumaker
a102087ece
scanner: Create a TaskQueue
...
For running tasks with a GLib idle callback
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 11:13:48 -04:00
Anna Schumaker
da78887783
scanner: Add a RemoveLibraryScheduler task
...
For breaking the tracklist into chunks, and then following up their
removal with a library table removal
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-26 17:11:12 -04:00
Anna Schumaker
88ebde085b
scanner: Add a RemoveLibraryTask
...
For removing a library's database entry
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-26 17:11:08 -04:00
Anna Schumaker
0f57b10500
scanner: Add a RemoveTask
...
For unconditionally removing a list of tracks
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-26 17:11:05 -04:00