Commit Graph
37 Commits
Author SHA1 Message Date
yonlu bb3fd204f0 fix(09-05): emit VolumeChanged event and persist state in ChangeVolume and MuteToggle 2026-03-07 02:06:08 -05:00
logan 2f9d9f8508 fix: recover from go-mp3 seek panic on startup (#86)
The go-mp3 library (v0.3.4) has a bug where Seek panics with a slice
bounds error for certain byte positions. This crashes the app when
restoring a saved playback position on startup.

Add bounds clamping and a recover wrapper around the seek call in
seekLocked to convert the panic into a graceful error. When the seek
fails, playback starts from the beginning instead of crashing.
2026-03-06 00:08:11 -06:00
yonlu 8a0b16a4ec feat(quick-15): insert BufferedStreamer into player pipeline and increase speaker buffer
- BufferedStreamer wraps resampled streamer with 2s read-ahead buffer
- Speaker buffer increased from 100ms to 200ms for secondary protection
- Close old BufferedStreamer on track change and unload to prevent goroutine leaks
- Streamer chain: decode -> resample -> BufferedStreamer -> ctrl -> volume -> speaker
2026-03-05 15:28:28 -05:00
yonlu 85b23acb24 feat(quick-15): add BufferedStreamer with goroutine read-ahead
- Ring-buffer streamer decouples source I/O from speaker callback
- Read-ahead goroutine pre-fills buffer in 512-sample chunks
- Returns silence when buffer temporarily empty (prevents glitches)
- Close() signals goroutine shutdown via channel
- 5 unit tests: basic stream, small reads, drain, silence, close
2026-03-05 15:27:24 -05:00
yonlu e1a95e65a9 fix(quick-13): resolve lint issues in main source files
- Fix errcheck for db.Close() in testhelper.go
- Fix errcheck, nlreturn, wsl, gofumpt issues in genevents/main.go
- Fix gofumpt and wsl issues in library.go
2026-03-05 14:07:50 -05:00
yonlu 294b629877 test(04-02): add player volume conversion and state mapping tests
- ToVolume/ToUserVolume at all boundary values (0, 25, 50, 75, 100)
- Out-of-range behavior for both conversion directions
- Full roundtrip characterization (0-100) with ±1 tolerance
- clampVolume at and beyond both boundaries
- stateToMediaControls for all states including unknown fallback
2026-03-03 17:01:40 -05:00
yonlu 3abaeba3af fix(01-01): collapse Player.SetContext double-lock into single acquisition
- Replaced two separate Lock/Unlock pairs with single Lock/defer Unlock
- Both p.ctx assignment and p.restoreStateLocked() now run under same lock hold
- Prevents observing partially-initialized state between the two operations
2026-02-28 12:09:34 -05:00
yonlu 51da5cfb07 no longer using forked beep 2026-02-25 21:16:29 -05:00
yonlu 4f3244c992 added mpris (linux media player controls) support 2026-02-25 20:51:29 -05:00
yonlu d5010e6fa8 default user volume is 50 now 2026-02-25 19:32:44 -05:00
yonlu cf144bf0dd refactored many events to use wails bindings, reducing boilerplate 2026-02-25 18:51:07 -05:00
yonlu baa4644ece extracted cover art handling from library package 2026-02-25 15:31:05 -05:00
yonlu 768a8cf1f2 replaced track info string map with a struct 2026-02-24 15:39:54 -05:00
yonlu 153cd0eae0 added refactoring catalog, fixed context menu freezing tracklist 2026-02-23 20:54:50 -05:00
yonlu d925e3d659 added mutex to player to prevent simultaneous access 2026-02-23 20:06:41 -05:00
logan 2a3a79652c add dev-only profiling with pprof, runtime/trace, and operation timing
Wire up Go's standard profiling toolkit so it's automatically available
in dev builds and completely absent from production. The profiling
package uses build tags (dev/!dev) to eliminate all pprof, trace, and
timing code from release binaries with zero new dependencies.

- backend/profiling: pprof HTTP server on :6060, /debug/trace endpoint,
  block/mutex profiling, and TimeOp helper for structured operation timing
- scripts/profile.sh: interactive menu-driven script that auto-selects
  free ports (8080-8089) so multiple profiles can be open simultaneously
- Instrumented key operations: app init, database init, player load/restore,
  queue set/restore
- Makefile targets: profile, profile-cpu, profile-heap, profile-trace
- .gitignore: exclude trace-*.out and *.pprof artifacts
2026-02-20 18:27:25 -06:00
yonlu c9e78c491c cover-grid album dropdown behavior fixes 2026-02-18 11:34:10 -05:00
yonlu f97e8c4840 fixed some state persistence issues. player state now saves on changes. next track button doesn't autoplay when paused. 2026-02-16 03:22:13 -05:00
yonlu 419fec1672 fixed repeatOne/ same track twice in a row issues 2026-02-16 02:45:51 -05:00
yonlu 86204e1b7a stopped player plays queue on play button click if queue is not empty. seek bar bigger. 2026-02-15 18:19:10 -05:00
yonlu 67cea5cfb0 fixed player behavior after final queue track completes, added click to play from queue window 2026-02-15 16:20:56 -05:00
yonlu 38f3abbd3e Cover art thumbnails
library scan creates thumbnails, cover grid component defaults to
thumbnail if available.
2026-02-14 15:25:12 -05:00
logan 30b2480df4 fix: resolve all lint errors and make linting a required CI check (#62)
- Fix 10 err113 violations: extract dynamic errors to package-level sentinels
- Fix 12 errcheck violations: handle unchecked error returns in player,
  metadata, and config packages
- Fix 4 revive stutter warnings: rename player.PlayerState to player.State,
  player.PlayerVolume to player.Volume, queue.QueueTrack to queue.Track,
  queue.QueueState to queue.State
- Fix 2 staticcheck SA4001: simplify *&x to x in assets handler
- Fix 5 unused constants: remove dead AudioFileType iota block in models
- Fix gci/gofumpt/wsl formatting issues across multiple files
- Add gofumpt module-path setting to .golangci.yml for correct import grouping
- Fix player test: gate integration test behind YELLOWJACKET_INTEGRATION env var
  instead of only skipping in CI, and replace t.Errorf+t.Failed with t.Fatalf
- Remove continue-on-error from golangci-lint CI step so linting is now required
2026-02-14 01:52:27 -06:00
logan 7317e093a7 fix(ci): fix golangci-lint version, skip player test in CI, remove standalone frontend build
- Use specific golangci-lint version (v2.5.0) instead of 'v2' which
  the action cannot parse
- Use --build-tags flag (v2 syntax) instead of -tags
- Skip player test in CI: requires Wails runtime context and audio
  device which are unavailable in GitHub Actions
- Remove standalone 'pnpm build' from frontend job since Vite cannot
  resolve Wails path aliases alone; the build-check job validates the
  full build via Wails
2026-02-13 22:18:25 -06:00
logan d78c0584e2 Squash merge audio-player-component into main 2026-02-13 20:39:23 -06:00
yonlu be2fad3190 slowly adding seek bar, now it can increment over time. 2025-04-10 19:08:57 -04:00
yonlu 42d5eb94ff audio player basics complete 2025-04-09 14:03:33 -04:00
yonlu 4902093b0c fixed player test relative file paths 2025-03-28 17:08:05 -04:00
yonlu e3d9fcec6f fixed volume silent check 2025-03-28 15:27:24 -04:00
yonlu 653842117f minor player refactor/ delete wails logo image 2025-03-28 15:23:27 -04:00
yonlu 2ca2b50e83 got bulk of player api 2025-03-26 19:56:07 -04:00
yonlu d47301dbaf wip player 2025-03-26 14:38:58 -04:00
yonlu 53c6bce3dd fixed newplayer func 2025-03-25 14:55:03 -04:00
yonlu 20f739be89 added player stuff 2025-03-25 14:40:49 -04:00
yonlu 5ac30d6809 current state of player 2025-03-24 18:20:00 -04:00
logan 1458f99c3d removed app, reorganized logic into modules 2025-03-24 15:09:27 -05:00
yonlu fe177ef788 starting audio player 2025-03-22 19:40:11 -04:00