Viet Phan X

[⚠️ JOURNEY] Building MP3 AI Manager for Music Hoarders (Day 16)

Author AvatarViet Phan
0
Jan 6, 2025
2 min read

Day 16

Hours worked/Total: 3/25.5

Avaloniaplaystop

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.

πŸ‘¨β€πŸ’» Software DevelopmentπŸš€ Journey

Got an Idea?

Let's Build It!

I can bring your ideas to life - FREE of charge

Book a free consultation and let’s identify opportunities to turn your vision into a successful business

15 min call

Get idea feedback

from 17+ consultations
?
Usually responds within 24h

If You Like what I do
You can buy me a coffee πŸ‘‡
Send β˜• via PayPalSend β˜• with Bitcoin

πŸ€™ Let's connect

Made by Viet Phan Β© 2018-2025Privacy Policy