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
14424281
Commit
14424281
authored
Oct 08, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm_resample: add internal function _lsr_init()
Let the libsamplerate code initialize itself.
parent
2b3fd0d4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
8 deletions
+26
-8
pcm_resample.c
src/pcm_resample.c
+4
-8
pcm_resample_fallback.c
src/pcm_resample_fallback.c
+6
-0
pcm_resample_internal.h
src/pcm_resample_internal.h
+6
-0
pcm_resample_libsamplerate.c
src/pcm_resample_libsamplerate.c
+10
-0
No files found.
src/pcm_resample.c
View file @
14424281
...
...
@@ -58,16 +58,12 @@ pcm_resample_global_init(GError **error_r)
void
pcm_resample_init
(
struct
pcm_resample_state
*
state
)
{
memset
(
state
,
0
,
sizeof
(
*
state
));
#ifdef HAVE_LIBSAMPLERATE
if
(
pcm_resample_lsr_enabled
())
{
pcm_buffer_init
(
&
state
->
in
);
pcm_buffer_init
(
&
state
->
out
);
}
if
(
pcm_resample_lsr_enabled
())
pcm_resample_lsr_init
(
state
);
else
#endif
pcm_buffer_init
(
&
state
->
buffer
);
pcm_resample_fallback_init
(
state
);
}
void
pcm_resample_deinit
(
struct
pcm_resample_state
*
state
)
...
...
src/pcm_resample_fallback.c
View file @
14424281
...
...
@@ -23,6 +23,12 @@
#include <assert.h>
void
pcm_resample_fallback_init
(
struct
pcm_resample_state
*
state
)
{
pcm_buffer_init
(
&
state
->
buffer
);
}
void
pcm_resample_fallback_deinit
(
struct
pcm_resample_state
*
state
)
{
pcm_buffer_deinit
(
&
state
->
buffer
);
...
...
src/pcm_resample_internal.h
View file @
14424281
...
...
@@ -36,6 +36,9 @@ bool
pcm_resample_lsr_global_init
(
const
char
*
converter
,
GError
**
error_r
);
void
pcm_resample_lsr_init
(
struct
pcm_resample_state
*
state
);
void
pcm_resample_lsr_deinit
(
struct
pcm_resample_state
*
state
);
const
int16_t
*
...
...
@@ -58,6 +61,9 @@ pcm_resample_lsr_32(struct pcm_resample_state *state,
#endif
void
pcm_resample_fallback_init
(
struct
pcm_resample_state
*
state
);
void
pcm_resample_fallback_deinit
(
struct
pcm_resample_state
*
state
);
const
int16_t
*
...
...
src/pcm_resample_libsamplerate.c
View file @
14424281
...
...
@@ -84,6 +84,16 @@ pcm_resample_lsr_global_init(const char *converter, GError **error_r)
}
void
pcm_resample_lsr_init
(
struct
pcm_resample_state
*
state
)
{
memset
(
state
,
0
,
sizeof
(
*
state
));
pcm_buffer_init
(
&
state
->
in
);
pcm_buffer_init
(
&
state
->
out
);
pcm_buffer_init
(
&
state
->
buffer
);
}
void
pcm_resample_lsr_deinit
(
struct
pcm_resample_state
*
state
)
{
if
(
state
->
state
!=
NULL
)
...
...
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