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
dc5b9d98
Commit
dc5b9d98
authored
3 years ago
by
GrimReaperFloof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backwards compatibility with older libopenmpt versions than 0.5
parent
9e407f59
sisyphus
0.23.15-alt1
0.23.14-alt1
0.23.13-alt1
0.23.12-alt1
0.23.11-alt1
0.23.8-alt3
0.23.8-alt2
0.23.8-alt1
gb-sisyphus-task339776.6100
gb-sisyphus-task337393.100
gb-sisyphus-task337176.300
gb-sisyphus-task334590.100
gb-sisyphus-task333607.100
gb-sisyphus-task331543.2500
gb-sisyphus-task328663.4700
gb-sisyphus-task325064.100
gb-sisyphus-task319111.4000
gb-sisyphus-task313704.100
gb-sisyphus-task312885.100
gb-sisyphus-task308905.3200
gb-sisyphus-task305294.500
gb-sisyphus-task304007.100
gb-sisyphus-task303674.1700
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
OpenmptDecoderPlugin.cxx
src/decoder/plugins/OpenmptDecoderPlugin.cxx
+10
-0
meson.build
src/decoder/plugins/meson.build
+1
-0
No files found.
src/decoder/plugins/OpenmptDecoderPlugin.cxx
View file @
dc5b9d98
...
...
@@ -18,6 +18,7 @@
*/
#include "OpenmptDecoderPlugin.hxx"
#include "decoder/Features.h"
#include "ModCommon.hxx"
#include "../DecoderAPI.hxx"
#include "input/InputStream.hxx"
...
...
@@ -43,7 +44,9 @@ static bool openmpt_override_mptm_interp_filter;
static
int
openmpt_volume_ramping
;
static
bool
openmpt_sync_samples
;
static
bool
openmpt_emulate_amiga
;
#ifdef HAVE_LIBOPENMPT_VERSION_0_5
static
std
::
string_view
openmpt_emulate_amiga_type
;
#endif
static
bool
openmpt_decoder_init
(
const
ConfigBlock
&
block
)
...
...
@@ -54,7 +57,9 @@ openmpt_decoder_init(const ConfigBlock &block)
openmpt_volume_ramping
=
block
.
GetBlockValue
(
"volume_ramping"
,
-
1
);
openmpt_sync_samples
=
block
.
GetBlockValue
(
"sync_samples"
,
true
);
openmpt_emulate_amiga
=
block
.
GetBlockValue
(
"emulate_amiga"
,
true
);
#ifdef HAVE_LIBOPENMPT_VERSION_0_5
openmpt_emulate_amiga_type
=
block
.
GetBlockValue
(
"emulate_amiga_type"
,
"auto"
);
#endif
return
true
;
}
...
...
@@ -83,9 +88,14 @@ mod_decode(DecoderClient &client, InputStream &is)
mod
.
set_render_param
(
mod
.
RENDER_INTERPOLATIONFILTER_LENGTH
,
0
);
}
mod
.
set_render_param
(
mod
.
RENDER_VOLUMERAMPING_STRENGTH
,
openmpt_volume_ramping
);
#ifdef HAVE_LIBOPENMPT_VERSION_0_5
mod
.
ctl_set_boolean
(
"seek.sync_samples"
,
openmpt_sync_samples
);
mod
.
ctl_set_boolean
(
"render.resampler.emulate_amiga"
,
openmpt_emulate_amiga
);
mod
.
ctl_set_text
(
"render.resampler.emulate_amiga_type"
,
openmpt_emulate_amiga_type
);
#else
mod
.
ctl_set
(
"seek.sync_samples"
,
std
::
to_string
(
openmpt_sync_samples
));
mod
.
ctl_set
(
"render.resampler.emulate_amiga"
,
std
::
to_string
(
openmpt_emulate_amiga
));
#endif
static
constexpr
AudioFormat
audio_format
(
OPENMPT_SAMPLE_RATE
,
SampleFormat
::
FLOAT
,
2
);
assert
(
audio_format
.
IsValid
());
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/meson.build
View file @
dc5b9d98
...
...
@@ -110,6 +110,7 @@ endif
libopenmpt_dep = dependency('libopenmpt', required: get_option('openmpt'))
decoder_features.set('ENABLE_OPENMPT', libopenmpt_dep.found())
decoder_features.set('HAVE_LIBOPENMPT_VERSION_0_5', libopenmpt_dep.version().version_compare('>= 0.5'))
if libopenmpt_dep.found()
decoder_plugins_sources += [
'OpenmptDecoderPlugin.cxx',
...
...
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