forked from MusicPlayerDaemon/MPD
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from MusicPlayerDaemon:master #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer's GuideThis PR extends the configuration subsystem to support double-precision values, integrates the vgmstream library into the build system, and introduces a new Vgmstream decoder plugin with full implementation and registration. Sequence Diagram for Decoding a VGMStream FilesequenceDiagram
actor User
participant DecoderClient
participant MPD_Core
participant VgmstreamDecoderPlugin
participant libvgmstream
User->>MPD_Core: Play VGM file (path_fs)
MPD_Core->>VgmstreamDecoderPlugin: VgmstreamFileDecode(client, path_fs)
activate VgmstreamDecoderPlugin
VgmstreamDecoderPlugin->>VgmstreamDecoderPlugin: path, subsong = ParseContainerPath(path_fs)
VgmstreamDecoderPlugin->>libvgmstream: libstreamfile_open_from_stdio(path)
activate libvgmstream
libvgmstream-->>VgmstreamDecoderPlugin: file_handle
deactivate libvgmstream
VgmstreamDecoderPlugin->>libvgmstream: libvgmstream_create(file_handle, subsong, config)
activate libvgmstream
libvgmstream-->>VgmstreamDecoderPlugin: lib_handle
deactivate libvgmstream
VgmstreamDecoderPlugin->>VgmstreamDecoderPlugin: audio_format = VgmstreamGetFormat(lib_handle)
VgmstreamDecoderPlugin->>DecoderClient: Ready(audio_format, true, song_time)
VgmstreamDecoderPlugin->>VgmstreamDecoderPlugin: VgmstreamScanTags(path, lib_handle, tag_handler, rgi)
VgmstreamDecoderPlugin->>DecoderClient: SubmitReplayGain(rgi)
VgmstreamDecoderPlugin->>DecoderClient: SubmitTag(tag)
loop Decode Loop
VgmstreamDecoderPlugin->>libvgmstream: libvgmstream_render(lib_handle)
activate libvgmstream
libvgmstream-->>VgmstreamDecoderPlugin: rendered_data (or error/done)
deactivate libvgmstream
opt if error or done
VgmstreamDecoderPlugin-->> MPD_Core: break loop
end
alt PCM24 format
VgmstreamDecoderPlugin->>VgmstreamDecoderPlugin: pcm_unpack_24(data)
VgmstreamDecoderPlugin->>DecoderClient: SubmitAudio(unpacked_data)
else Other formats
VgmstreamDecoderPlugin->>DecoderClient: SubmitAudio(rendered_data)
end
alt Seek Requested by Client
DecoderClient->>VgmstreamDecoderPlugin: GetSeekFrame() (checks for command)
VgmstreamDecoderPlugin-->>DecoderClient: seek_frame
VgmstreamDecoderPlugin->>libvgmstream: libvgmstream_seek(lib_handle, seek_frame)
VgmstreamDecoderPlugin->>DecoderClient: CommandFinished()
VgmstreamDecoderPlugin->>DecoderClient: SubmitTimestamp(new_song_time)
end
end
VgmstreamDecoderPlugin->>libvgmstream: libvgmstream_free(lib_handle)
VgmstreamDecoderPlugin->>libvgmstream: libstreamfile_close(file_handle)
deactivate VgmstreamDecoderPlugin
Sequence Diagram for Retrieving a Double Configuration ValuesequenceDiagram
participant Component
participant ConfigBlock
participant BlockParam
participant Parser
Component->>ConfigBlock: GetBlockValue("setting_name", 1.0)
activate ConfigBlock
ConfigBlock->>ConfigBlock: bp = GetBlockParam("setting_name")
alt BlockParam found (bp != nullptr)
ConfigBlock->>BlockParam: GetDoubleValue()
activate BlockParam
BlockParam->>Parser: ParseDouble(value_string_from_bp)
activate Parser
Parser-->>BlockParam: parsed_double_value
deactivate Parser
BlockParam-->>ConfigBlock: parsed_double_value
deactivate BlockParam
ConfigBlock-->>Component: parsed_double_value
else BlockParam not found (bp == nullptr)
ConfigBlock-->>Component: default_value (1.0)
end
deactivate ConfigBlock
Class Diagram for Configuration System UpdatesclassDiagram
class BlockParam {
+GetBoolValue() bool
+GetDoubleValue() double
+GetDuration() duration
+GetStringValue() string
+GetPathValue() Path
+GetPositiveValue() unsigned
+GetUnsignedValue() unsigned
}
class ConfigBlock {
+GetBlockValue(name, default_value) bool
+GetBlockValue(name, default_value) double
+GetBlockValue(name, default_value) string
+GetBlockValue(name, default_value) Path
+GetBlockValue(name, default_value) unsigned
+GetDuration(name, min_value, default_value) duration
}
class Parser {
<<Utility>>
+ParseBool(s) bool
+ParseDouble(s) double
+ParseDuration(s, min_value) duration
+ParsePath(s) Path
+ParsePositive(s) unsigned
+ParseUnsigned(s) unsigned
}
ConfigBlock ..> BlockParam : uses
BlockParam ..> Parser : uses for parsing value
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
Summary by Sourcery
Enable double-typed configuration parameters and integrate a new vgmstream decoder plugin with corresponding build option and registration
New Features:
Build:
Documentation: