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
80a7e1ea
Commit
80a7e1ea
authored
Jan 21, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm/SoxrResampler: add a global soxr_runtime_spec_t variable
parent
0d3b26b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
SoxrResampler.cxx
src/pcm/SoxrResampler.cxx
+5
-1
No files found.
src/pcm/SoxrResampler.cxx
View file @
80a7e1ea
...
...
@@ -41,6 +41,7 @@ static constexpr unsigned long SOXR_DEFAULT_RECIPE = SOXR_HQ;
static
constexpr
unsigned
long
SOXR_INVALID_RECIPE
=
-
1
;
static
soxr_quality_spec_t
soxr_quality
;
static
soxr_runtime_spec_t
soxr_runtime
;
static
const
char
*
soxr_quality_name
(
unsigned
long
recipe
)
...
...
@@ -102,6 +103,9 @@ pcm_resample_soxr_global_init(const ConfigBlock &block, Error &error)
"soxr converter '%s'"
,
soxr_quality_name
(
recipe
));
const
unsigned
n_threads
=
1
;
soxr_runtime
=
soxr_runtime_spec
(
n_threads
);
return
true
;
}
...
...
@@ -115,7 +119,7 @@ SoxrPcmResampler::Open(AudioFormat &af, unsigned new_sample_rate,
soxr_error_t
e
;
soxr
=
soxr_create
(
af
.
sample_rate
,
new_sample_rate
,
af
.
channels
,
&
e
,
nullptr
,
&
soxr_quality
,
nullptr
);
nullptr
,
&
soxr_quality
,
&
soxr_runtime
);
if
(
soxr
==
nullptr
)
{
error
.
Format
(
soxr_domain
,
"soxr initialization has failed: %s"
,
e
);
...
...
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