Draft: Replaygain
Hi all :-)
This is the tiny bit of code I could write to implement ReplayGain support at this time. This is far from functional, but I hope someone of you will have a look at this and can possibly help me a bit ;-)
I added caching the ReplayGain information provided by KFileMetadata (sadly, at this point, Opus files aren't supported yet by KFileMetadata, cf. my feature request in Bug #447531). This looks okay, the qDebug() call in filescanner.cpp:239 displays stuff like Found ReplayGainAlbumGain -11.51 for "Black Stone Cherry" - "Drive"
when scanning the collection.
Later on, I tried to get the ReplayGain information for the currently playing song by hooking up on MediaPlayListProxyModel::currentTrackChanged
. But in the (dummy/draft) ElisaApplication::setReplayGainVolume() function I added, I always get QVariant(int, 0)
as the ReplayGain level.
All this is a bit hard to grasp (I'm not that fit with C++/Qt ;-), esp. the QML stuff (I never used QML before). Maybe you can give me a hint on how to access the ReplayGain information read earlier correctly?
Thanks for all help!
Cheers, Tobias