M changelog.md => changelog.md +5 -1
@@ 2,10 2,14 @@
## current
-### Added:
+### Added
* `[gui]` Dynamic Windows building and handling implemented
+### Fixed
+
+* `[audio]` Fix parsing audio meta tags during playback
+
## [0.42.1 2020-10-12]
### Added
M module-audio/Audio/Audio.hpp => module-audio/Audio/Audio.hpp +1 -1
@@ 37,7 37,7 @@ namespace audio
return currentState;
}
- std::optional<Tags> GetFileTags(const char *filename);
+ static std::optional<Tags> GetFileTags(const char *filename);
// Range 0-1
audio::RetCode SetOutputVolume(Volume vol);
M module-services/service-audio/ServiceAudio.cpp => module-services/service-audio/ServiceAudio.cpp +3 -9
@@ 143,16 143,10 @@ void ServiceAudio::VibrationUpdate(const audio::PlaybackType &type, std::optiona
std::unique_ptr<AudioResponseMessage> ServiceAudio::HandleGetFileTags(const std::string &fileName)
{
- if (auto input = audioMux.GetAvailableInput()) {
- auto tag = (*input)->audio->GetFileTags(fileName.c_str());
- if (tag) {
- return std::make_unique<AudioResponseMessage>(RetCode::Success, tag.value());
- }
- else {
- return std::make_unique<AudioResponseMessage>(RetCode::FileDoesntExist);
- }
+ if (auto tag = Audio::GetFileTags(fileName.c_str())) {
+ return std::make_unique<AudioResponseMessage>(RetCode::Success, tag.value());
}
- return {};
+ return std::make_unique<AudioResponseMessage>(RetCode::FileDoesntExist);
}
std::unique_ptr<AudioResponseMessage> ServiceAudio::HandlePause(const Token &token)