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
4d804199
Commit
4d804199
authored
Jul 17, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm/ConfiguredResampler: use struct ConfigData
parent
3983caa2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
11 deletions
+13
-11
Main.cxx
src/Main.cxx
+1
-1
ConfiguredResampler.cxx
src/pcm/ConfiguredResampler.cxx
+6
-6
ConfiguredResampler.hxx
src/pcm/ConfiguredResampler.hxx
+2
-1
PcmConvert.cxx
src/pcm/PcmConvert.cxx
+2
-2
PcmConvert.hxx
src/pcm/PcmConvert.hxx
+2
-1
No files found.
src/Main.cxx
View file @
4d804199
...
...
@@ -557,7 +557,7 @@ try {
archive_plugin_init_all
();
#endif
pcm_convert_global_init
();
pcm_convert_global_init
(
raw_config
);
decoder_plugin_init_all
(
raw_config
);
...
...
src/pcm/ConfiguredResampler.cxx
View file @
4d804199
...
...
@@ -20,7 +20,7 @@
#include "config.h"
#include "ConfiguredResampler.hxx"
#include "FallbackResampler.hxx"
#include "config/
Global
.hxx"
#include "config/
Data
.hxx"
#include "config/Option.hxx"
#include "config/Domain.hxx"
#include "config/Block.hxx"
...
...
@@ -113,11 +113,11 @@ MigrateResamplerConfig(const ConfigParam *param, ConfigBlock &buffer) noexcept
}
static
const
ConfigBlock
*
GetResamplerConfig
(
ConfigBlock
&
buffer
)
GetResamplerConfig
(
const
ConfigData
&
config
,
ConfigBlock
&
buffer
)
{
const
auto
*
old_param
=
config
_get_p
aram
(
ConfigOption
::
SAMPLERATE_CONVERTER
);
const
auto
*
block
=
config
_get_b
lock
(
ConfigBlockOption
::
RESAMPLER
);
config
.
GetP
aram
(
ConfigOption
::
SAMPLERATE_CONVERTER
);
const
auto
*
block
=
config
.
GetB
lock
(
ConfigBlockOption
::
RESAMPLER
);
if
(
block
==
nullptr
)
return
MigrateResamplerConfig
(
old_param
,
buffer
);
...
...
@@ -130,10 +130,10 @@ GetResamplerConfig(ConfigBlock &buffer)
}
void
pcm_resampler_global_init
()
pcm_resampler_global_init
(
const
ConfigData
&
config
)
{
ConfigBlock
buffer
;
const
auto
*
block
=
GetResamplerConfig
(
buffer
);
const
auto
*
block
=
GetResamplerConfig
(
config
,
buffer
);
const
char
*
plugin_name
=
block
->
GetBlockValue
(
"plugin"
);
if
(
plugin_name
==
nullptr
)
...
...
src/pcm/ConfiguredResampler.hxx
View file @
4d804199
...
...
@@ -22,10 +22,11 @@
#include "check.h"
struct
ConfigData
;
class
PcmResampler
;
void
pcm_resampler_global_init
();
pcm_resampler_global_init
(
const
ConfigData
&
config
);
/**
* Create a #PcmResampler instance from the implementation class
...
...
src/pcm/PcmConvert.cxx
View file @
4d804199
...
...
@@ -25,9 +25,9 @@
#include <assert.h>
void
pcm_convert_global_init
()
pcm_convert_global_init
(
const
ConfigData
&
config
)
{
pcm_resampler_global_init
();
pcm_resampler_global_init
(
config
);
}
PcmConvert
::
PcmConvert
()
noexcept
...
...
src/pcm/PcmConvert.hxx
View file @
4d804199
...
...
@@ -31,6 +31,7 @@
#endif
template
<
typename
T
>
struct
ConstBuffer
;
struct
ConfigData
;
/**
* This object is statically allocated (within another struct), and
...
...
@@ -90,6 +91,6 @@ public:
};
void
pcm_convert_global_init
();
pcm_convert_global_init
(
const
ConfigData
&
config
);
#endif
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