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
c26622cf
Commit
c26622cf
authored
Dec 01, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/gme: move code to ScanMusicEmu()
parent
9e918734
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
GmeDecoderPlugin.cxx
src/decoder/plugins/GmeDecoderPlugin.cxx
+22
-14
No files found.
src/decoder/plugins/GmeDecoderPlugin.cxx
View file @
c26622cf
...
...
@@ -250,6 +250,26 @@ ScanGmeInfo(const gme_info_t &info, int song_num, int track_count,
}
static
bool
ScanMusicEmu
(
Music_Emu
*
emu
,
int
song_num
,
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
{
gme_info_t
*
ti
;
const
char
*
gme_err
=
gme_track_info
(
emu
,
&
ti
,
song_num
);
if
(
gme_err
!=
nullptr
)
{
LogWarning
(
gme_domain
,
gme_err
);
return
false
;
}
assert
(
ti
!=
nullptr
);
ScanGmeInfo
(
*
ti
,
song_num
,
gme_track_count
(
emu
),
handler
,
handler_ctx
);
gme_free_info
(
ti
);
return
true
;
}
static
bool
gme_scan_file
(
Path
path_fs
,
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
{
...
...
@@ -266,23 +286,11 @@ gme_scan_file(Path path_fs,
const
int
song_num
=
get_song_num
(
path_fs
);
gme_info_t
*
ti
;
gme_err
=
gme_track_info
(
emu
,
&
ti
,
song_num
);
if
(
gme_err
!=
nullptr
)
{
LogWarning
(
gme_domain
,
gme_err
);
gme_delete
(
emu
);
return
false
;
}
const
bool
result
=
ScanMusicEmu
(
emu
,
song_num
,
handler
,
handler_ctx
);
assert
(
ti
!=
nullptr
);
ScanGmeInfo
(
*
ti
,
song_num
,
gme_track_count
(
emu
),
handler
,
handler_ctx
);
gme_free_info
(
ti
);
gme_delete
(
emu
);
return
true
;
return
result
;
}
static
const
char
*
const
gme_suffixes
[]
=
{
...
...
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