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
Jul 29, 2016
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)
...
@@ -281,6 +281,16 @@ sidplay_file_decode(Decoder &decoder, Path path_fs)
}
while
(
cmd
!=
DecoderCommand
::
STOP
);
}
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
static
bool
sidplay_scan_file
(
Path
path_fs
,
sidplay_scan_file
(
Path
path_fs
,
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
...
@@ -297,11 +307,9 @@ sidplay_scan_file(Path path_fs,
...
@@ -297,11 +307,9 @@ sidplay_scan_file(Path path_fs,
const
SidTuneInfo
&
info
=
tune
.
getInfo
();
const
SidTuneInfo
&
info
=
tune
.
getInfo
();
/* title */
/* title */
const
char
*
title
;
const
char
*
title
=
GetInfoString
(
info
,
0
);
if
(
info
.
numberOfInfoStrings
>
0
&&
info
.
infoString
[
0
]
!=
nullptr
)
if
(
title
==
nullptr
)
title
=
info
.
infoString
[
0
];
title
=
""
;
else
title
=
""
;
if
(
info
.
songs
>
1
)
{
if
(
info
.
songs
>
1
)
{
char
tag_title
[
1024
];
char
tag_title
[
1024
];
...
@@ -314,9 +322,10 @@ sidplay_scan_file(Path path_fs,
...
@@ -314,9 +322,10 @@ sidplay_scan_file(Path path_fs,
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
TAG_TITLE
,
title
);
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
TAG_TITLE
,
title
);
/* artist */
/* 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
,
tag_handler_invoke_tag
(
handler
,
handler_ctx
,
TAG_ARTIST
,
info
.
infoString
[
1
]
);
artist
);
/* track */
/* track */
char
track
[
16
];
char
track
[
16
];
...
...
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