Skip to content

groth00/audio_player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

--- Quickstart
0. 	Install cc, CMake, rustup, sound libraries (such as asla-lib on Fedora)
	NOTES for Linux users:
		This program uses cpal version 0.17.3, which currently does not support pipewire or pulseaudio directly
		It supports ALSA and JACK (see feature flags) and uses ALSA by default

		However, audio should work if you are using pipewire
		If you are using a bluetooth device, then you should route ALSA/JACK through pipewire

		For ALSA, the simplest solution I could find is to modify ~/.asoundrc
		pcm.!default {
			type pipewire
		}

		For JACK, you may need to install a package such as pipewire-jack or pipewire-jack-client
		for clients to go through pipewire instead.

		See PipeWire README for suggestions on how to run JACK and PipeWire
		https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/README.md

1. 	Clone repository
2a. 	Check feature flags in Cargo.toml and build executable
		Do you want common codecs and formats or all of them?
		common codecs (DEFAULT)	-> symphonia-subset
		all codecs		-> symphonia-all

		Are you using Linux/BSD?
		- cpal supports JACK and audio thread priority elevation

		Run the cargo build command, which could look like:

		macOS
		cargo b --release -F symphonia-subset

		Linux/BSD
		cargo b --release -F audio_thread_priority
		OR cargo b --release -F symphonia-all,audio_thread_priority
		OR cargo b --release -F symphonia-all,jack,audio_thread_priority

3. 	Create $HOME/.aup/root_dir.txt
		It must contain 1 line - the root path to your music folder
		Example: mkdir ~/.aup && echo "/home/donkey_kong/Music" > ~/.aup/root_dir.txt
4. 	Run the program
		Move it to your path for easier access
		Example: mv target/release/audio_player /usr/local/bin/aup

		Clean the target directory to reclaim disk space
		cargo clean

		There is 1 optional argument, the start directory (begins playback immediately)
		Example: aup <START_DIR_ABSOLUTE_PATH>


--- Keybinds
While picking a song:
Quit				Esc
Select previous			k / Up
Select next			j / Down
Select first			g / Home
Select last			G / End
Switch to devices		l
Switch to directories		Tab
Pick song			Enter
Reconnect first output device	f
Randomize song order		r
Pause				p / Space / F8 / Pause
Skip				s / F9
Mute				m / F10
Decrease volume			v / F11
Increase volume			V / F12
Loop song			L
Seek backward 1 second		Left
Seek forward 1 second		Right


While picking a device:
Quit				Esc
Select previous			k / Up
Select next			j / Down
Select first			g / Home
Select last			G / End
Switch to song list		h
Switch to directories		Tab
Pick output device		Enter
Reconnect first output device	f
Refresh devices			r
Pause				p / Space / F8 / Pause
Skip				s / F9
Mute				m / F10
Decrease volume			v / F11
Increase volume			V / F12
Loop song			L
Seek backward 1 second		Left
Seek forward 1 second		Right


While picking a directory:
Quit				Esc
Switch to song list		Tab
Filter directories		/
Select previous			Up / k
Select next			Down / j
Select first			g / Home
Select last			G / End
Pick directory			Enter
Randomize songs			r
Pause				p / Space / F8 / Pause
Skip				s / F9
Mute				m / F10
Decrease volume			v / F11
Increase volume			V / F12
Loop song			L
Seek backward 1 second		Left
Seek forward 1 second		Right


While filtering directories:
Quit			Esc
Switch to directories	Tab
Filter directories	Any character, Backspace
Select previous		CTRL+k, Up
Select next		CTRL+j, Down
Select first		CTRL+f
Select last		CTRL+l
Select directory	Enter



--- Notes
If you pause playback and resume after a prolonged period of time,
the output stream for the output device will no longer be active.

You can try a few things:
	1. Choose a new device
		Press 'Tab' until you enter the song list view
		Press 'l' to enter the device view
		Use j/k/Up/Down to select a device and press 'Enter'
		If the program fails to connect to the device:
			Press 'r' to refresh devices
			Select a device again and press 'Enter'
	2. Connect to the first available output device
		Press 'f' in either the song list view or devices view
Prefer method 1, as method 2 cannot enumerate output devices in a specific order

About

Terminal audio player

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages