Control Audacious, play last 30 seconds of music - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Utilities (https://staging.qb64phoenix.com/forumdisplay.php?fid=8) +---- Thread: Control Audacious, play last 30 seconds of music (/showthread.php?tid=1341) |
Control Audacious, play last 30 seconds of music - mnrvovrfc - 12-29-2022 If you're on Linux, using Audacious music player and have loads of music that you don't have time to listen to entirely, I have written a tool to make your life a bit easier. Press escape key at any time in the run to quit the program. This program expects Audacious started with a playlist ready to go. It prints on the screen the filename of the song that it's currently on. If you don't like this then press escape to get away from this QB64 user program, then change the current track in Audacious and try again to run this program. Each song is first played for its first five seconds, then a seek is performed to about 30 seconds before the end to play that portion. These values could be adjusted in the program. It's easier to seek from the beginning of a song, but to seek from the end, first the playback length of the media file must be acquired. While the 30 seconds of playback go down, the user could press escape to leave the program, or spacebar or enter to advance to the next track in the playlist. This program makes use of an utility called "audtool" that should have been installed with Audacious. At the moment it works with one instance of Audacious that was ever opened. Code: (Select All) ''by mnrvovrfc 2022-dec-28 |