Initial project structure for Klangkiste

This commit is contained in:
2026-01-11 21:24:50 +00:00
commit 83bd89a25a
45 changed files with 695 additions and 0 deletions
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
"""Base player interface for audio playback."""
from __future__ import annotations
from typing import Protocol
class BasePlayer(Protocol):
def play(self, media_ref: str) -> None:
raise NotImplementedError
def pause(self) -> None:
raise NotImplementedError
def stop(self) -> None:
raise NotImplementedError
def set_volume(self, volume: int) -> None:
raise NotImplementedError
+23
View File
@@ -0,0 +1,23 @@
"""Mock player for Phase 1a (no real audio)."""
from __future__ import annotations
from player.base_player import BasePlayer
class MockPlayer(BasePlayer):
def __init__(self) -> None:
self._current: str | None = None
self._volume: int = 0
def play(self, media_ref: str) -> None:
self._current = media_ref
def pause(self) -> None:
return None
def stop(self) -> None:
self._current = None
def set_volume(self, volume: int) -> None:
self._volume = volume