-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support using Linamp as a Bluetooth audio receiver
- Loading branch information
Showing
18 changed files
with
1,054 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
linamp (1.3.0) bookworm; urgency=medium | ||
|
||
* Feature: Bluetooth Source, use Linamp as a Bluetooth audio receiver | ||
|
||
-- Rodrigo Méndez <[email protected]> Tue, 17 Dec 2024 22:37:00 -0600 | ||
|
||
linamp (1.2.1) bookworm; urgency=medium | ||
|
||
* Bugfix: Fixed glitches on spectrum analyzer for views that use audiospectrumcatpure class (CD player, Bluetooth player) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from .cdplayer import * | ||
from linamp.cdplayer import * | ||
from linamp.btplayer import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from linamp.baseplayer.baseplayer import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
from enum import Enum | ||
|
||
class PlayerStatus(Enum): | ||
Idle = 'idle' | ||
Playing = 'playing' | ||
Stopped = 'stopped' | ||
Paused = 'paused' | ||
Error = 'error' | ||
Loading = 'loading' | ||
|
||
|
||
# Base Player abstract class | ||
class BasePlayer: | ||
# Called when the source is selected in the UI or whenever the full track info needs to be refreshed | ||
def load(self) -> None: | ||
pass | ||
|
||
# Called when the source is deselected in the UI | ||
def unload(self) -> None: | ||
pass | ||
|
||
# Basic playback control funcions called on button press | ||
def play(self) -> None: | ||
pass | ||
|
||
def stop(self) -> None: | ||
pass | ||
|
||
def pause(self) -> None: | ||
pass | ||
|
||
def next(self) -> None: | ||
pass | ||
|
||
def prev(self) -> None: | ||
pass | ||
|
||
# Go to a specific time in a track while playing | ||
def seek(self, ms: int) -> None: | ||
pass | ||
|
||
# Playback mode toggles | ||
def set_shuffle(self, enabled: bool) -> None: | ||
pass | ||
|
||
def set_repeat(self, enabled: bool) -> None: | ||
pass | ||
|
||
# Eject button | ||
def eject(self) -> None: | ||
pass | ||
|
||
# -------- Status Functions -------- | ||
|
||
# Called constantly during playback to update the time progress | ||
def get_postition(self) -> int: | ||
return 0 | ||
|
||
def get_shuffle(self) -> bool: | ||
return False | ||
|
||
def get_repeat(self) -> bool: | ||
return False | ||
|
||
# Returns the str representation of PlayerStatus enum | ||
def get_status(self) -> str: | ||
status = PlayerStatus.Idle | ||
return status.value | ||
|
||
# tuple with format (tracknumber: int, artist, album, title, duration_ms: int, codec: str, bitrate_bps: int, samplerate_hz: int) | ||
def get_track_info(self) -> tuple[int, str, str, str, int, str, int, int]: | ||
return (1, '', '', '', 1, 'AAC', 256000, 44100) | ||
|
||
# Return any message you want to show to the user. tuple with format: (show_message: bool, message: str, message_timeout_ms: int) | ||
def get_message(self) -> tuple[bool, str, int]: | ||
return (False, '', 0) | ||
|
||
# Called whenever the UI wants to force clear the message | ||
def clear_message(self) -> None: | ||
pass | ||
|
||
# -------- Polling functions to be called by a timer -------- | ||
|
||
def poll_events(self) -> bool: | ||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from linamp.btplayer.btplayer import * |
Oops, something went wrong.