[β οΈ JOURNEY] Building MP3 AI Manager for Music Hoarders (Day 16)
Day 16
Hours worked/Total: 3/25.5
Day Recap
Took the first steps toward adding audio playback functionality. Installed NAudio for handling MP3 playback and successfully set up a basic system to play and stop songs. Faced some challenges integrating a new View with the existing Main View Model but resolved them by correctly binding the DataContext.
What I Did
- Researched libraries for audio playback and selected NAudio via NuGet Package Manager
- Updated the file picker function:
- Modified it to save the selected file path into a variable for later use with audio playback.
- Added Play and Stop buttons to the UI:
- The Play button now successfully starts the audio.
- Faced challenges integrating a new ViewModel for audio playback:
- Struggled to connect the new ViewModel with the existing MainWindowViewModel.
Remarks
Getting audio playback to work feels like a significant milestone. NAudio simplifies a lot of the heavy lifting, but understanding how to organize and bind multiple ViewModels was a headache. It’s clear that Avalonia demands a solid grasp of MVVM principles to make most basic thing work.
Next Goals
Add Stop functionality to work alongside Play.