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
08f77c2b
Commit
08f77c2b
authored
Oct 26, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/gme: add option "accuracy"
parent
6269abbc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
1 deletion
+47
-1
NEWS
NEWS
+1
-0
user.xml
doc/user.xml
+22
-0
GmeDecoderPlugin.cxx
src/decoder/plugins/GmeDecoderPlugin.cxx
+24
-1
No files found.
NEWS
View file @
08f77c2b
...
@@ -14,6 +14,7 @@ ver 0.20 (not yet released)
...
@@ -14,6 +14,7 @@ ver 0.20 (not yet released)
* decoder
* decoder
- ffmpeg: support ReplayGain and MixRamp
- ffmpeg: support ReplayGain and MixRamp
- ffmpeg: support stream tags
- ffmpeg: support stream tags
- gme: add option "accuracy"
- mad: reduce memory usage while scanning tags
- mad: reduce memory usage while scanning tags
- mpcdec: read the bit rate
- mpcdec: read the bit rate
* playlist
* playlist
...
...
doc/user.xml
View file @
08f77c2b
...
@@ -1749,6 +1749,28 @@ buffer_size: 16384</programlisting>
...
@@ -1749,6 +1749,28 @@ buffer_size: 16384</programlisting>
Video game music file emulator based on
<ulink
Video game music file emulator based on
<ulink
url=
"https://bitbucket.org/mpyne/game-music-emu/wiki/Home"
><application>
game-music-emu
</application></ulink>
.
url=
"https://bitbucket.org/mpyne/game-music-emu/wiki/Home"
><application>
game-music-emu
</application></ulink>
.
</para>
</para>
<informaltable>
<tgroup
cols=
"2"
>
<thead>
<row>
<entry>
Setting
</entry>
<entry>
Description
</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<varname>
accuracy
</varname>
<parameter>
yes|no
</parameter>
</entry>
<entry>
Enable more accurate sound emulation.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
</section>
<section>
<section>
...
...
src/decoder/plugins/GmeDecoderPlugin.cxx
View file @
08f77c2b
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include "config.h"
#include "config.h"
#include "GmeDecoderPlugin.hxx"
#include "GmeDecoderPlugin.hxx"
#include "../DecoderAPI.hxx"
#include "../DecoderAPI.hxx"
#include "config/Block.cxx"
#include "CheckAudioFormat.hxx"
#include "CheckAudioFormat.hxx"
#include "tag/TagHandler.hxx"
#include "tag/TagHandler.hxx"
#include "fs/Path.hxx"
#include "fs/Path.hxx"
...
@@ -52,6 +53,23 @@ struct GmeContainerPath {
...
@@ -52,6 +53,23 @@ struct GmeContainerPath {
unsigned
track
;
unsigned
track
;
};
};
#if GME_VERSION >= 0x000600
static
int
gme_accuracy
;
#endif
static
bool
gme_plugin_init
(
gcc_unused
const
ConfigBlock
&
block
)
{
#if GME_VERSION >= 0x000600
auto
accuracy
=
block
.
GetBlockParam
(
"accuracy"
);
gme_accuracy
=
accuracy
!=
nullptr
?
(
int
)
accuracy
->
GetBoolValue
()
:
-
1
;
#endif
return
true
;
}
gcc_pure
gcc_pure
static
unsigned
static
unsigned
ParseSubtuneName
(
const
char
*
base
)
ParseSubtuneName
(
const
char
*
base
)
...
@@ -123,6 +141,11 @@ gme_file_decode(Decoder &decoder, Path path_fs)
...
@@ -123,6 +141,11 @@ gme_file_decode(Decoder &decoder, Path path_fs)
return
;
return
;
}
}
#if GME_VERSION >= 0x000600
if
(
gme_accuracy
>=
0
)
gme_enable_accuracy
(
emu
,
gme_accuracy
);
#endif
gme_info_t
*
ti
;
gme_info_t
*
ti
;
gme_err
=
gme_track_info
(
emu
,
&
ti
,
container
.
track
);
gme_err
=
gme_track_info
(
emu
,
&
ti
,
container
.
track
);
if
(
gme_err
!=
nullptr
)
{
if
(
gme_err
!=
nullptr
)
{
...
@@ -274,7 +297,7 @@ static const char *const gme_suffixes[] = {
...
@@ -274,7 +297,7 @@ static const char *const gme_suffixes[] = {
extern
const
struct
DecoderPlugin
gme_decoder_plugin
;
extern
const
struct
DecoderPlugin
gme_decoder_plugin
;
const
struct
DecoderPlugin
gme_decoder_plugin
=
{
const
struct
DecoderPlugin
gme_decoder_plugin
=
{
"gme"
,
"gme"
,
nullptr
,
gme_plugin_init
,
nullptr
,
nullptr
,
nullptr
,
nullptr
,
gme_file_decode
,
gme_file_decode
,
...
...
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