Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
d790d3ba
Commit
d790d3ba
authored
8 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/sidplay: add GetInfoString()
parent
c3dbc927
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
SidplayDecoderPlugin.cxx
src/decoder/plugins/SidplayDecoderPlugin.cxx
+16
-7
No files found.
src/decoder/plugins/SidplayDecoderPlugin.cxx
View file @
d790d3ba
...
...
@@ -281,6 +281,16 @@ sidplay_file_decode(Decoder &decoder, Path path_fs)
}
while
(
cmd
!=
DecoderCommand
::
STOP
);
}
gcc_pure
static
const
char
*
GetInfoString
(
const
SidTuneInfo
&
info
,
unsigned
i
)
{
return
info
.
numberOfInfoStrings
>
i
?
info
.
infoString
[
i
]
:
nullptr
;
}
static
bool
sidplay_scan_file
(
Path
path_fs
,
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
...
...
@@ -297,11 +307,9 @@ sidplay_scan_file(Path path_fs,
const
SidTuneInfo
&
info
=
tune
.
getInfo
();
/* title */
const
char
*
title
;
if
(
info
.
numberOfInfoStrings
>
0
&&
info
.
infoString
[
0
]
!=
nullptr
)
title
=
info
.
infoString
[
0
];
else
title
=
""
;
const
char
*
title
=
GetInfoString
(
info
,
0
);
if
(
title
==
nullptr
)
title
=
""
;
if
(
info
.
songs
>
1
)
{
char
tag_title
[
1024
];
...
...
@@ -314,9 +322,10 @@ sidplay_scan_file(Path path_fs,
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
TAG_TITLE
,
title
);
/* artist */
if
(
info
.
numberOfInfoStrings
>
1
&&
info
.
infoString
[
1
]
!=
nullptr
)
const
char
*
artist
=
GetInfoString
(
info
,
1
);
if
(
artist
!=
nullptr
)
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
TAG_ARTIST
,
info
.
infoString
[
1
]
);
artist
);
/* track */
char
track
[
16
];
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment