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
3dcb0820
Commit
3dcb0820
authored
Jan 11, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm/Resampler: add method Reset()
Hook for src_reset(), not yet used.
parent
bece0230
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
0 deletions
+24
-0
GlueResampler.cxx
src/pcm/GlueResampler.cxx
+6
-0
GlueResampler.hxx
src/pcm/GlueResampler.hxx
+5
-0
LibsamplerateResampler.cxx
src/pcm/LibsamplerateResampler.cxx
+6
-0
LibsamplerateResampler.hxx
src/pcm/LibsamplerateResampler.hxx
+1
-0
Resampler.hxx
src/pcm/Resampler.hxx
+6
-0
No files found.
src/pcm/GlueResampler.cxx
View file @
3dcb0820
...
...
@@ -65,6 +65,12 @@ GluePcmResampler::Close()
resampler
->
Close
();
}
void
GluePcmResampler
::
Reset
()
{
resampler
->
Reset
();
}
ConstBuffer
<
void
>
GluePcmResampler
::
Resample
(
ConstBuffer
<
void
>
src
)
{
...
...
src/pcm/GlueResampler.hxx
View file @
3dcb0820
...
...
@@ -55,6 +55,11 @@ public:
return
output_sample_format
;
}
/**
* @see PcmResampler::Reset()
*/
void
Reset
();
ConstBuffer
<
void
>
Resample
(
ConstBuffer
<
void
>
src
);
};
...
...
src/pcm/LibsamplerateResampler.cxx
View file @
3dcb0820
...
...
@@ -114,6 +114,12 @@ LibsampleratePcmResampler::Close()
state
=
src_delete
(
state
);
}
void
LibsampleratePcmResampler
::
Reset
()
{
src_reset
(
state
);
}
inline
ConstBuffer
<
float
>
LibsampleratePcmResampler
::
Resample2
(
ConstBuffer
<
float
>
src
)
{
...
...
src/pcm/LibsamplerateResampler.hxx
View file @
3dcb0820
...
...
@@ -44,6 +44,7 @@ class LibsampleratePcmResampler final : public PcmResampler {
public
:
AudioFormat
Open
(
AudioFormat
&
af
,
unsigned
new_sample_rate
)
override
;
void
Close
()
override
;
void
Reset
()
override
;
ConstBuffer
<
void
>
Resample
(
ConstBuffer
<
void
>
src
)
override
;
private
:
...
...
src/pcm/Resampler.hxx
View file @
3dcb0820
...
...
@@ -55,6 +55,12 @@ public:
virtual
void
Close
()
=
0
;
/**
* Reset the filter's state, e.g. drop/flush buffers.
*/
virtual
void
Reset
()
{
}
/**
* Resamples a block of PCM data.
*
* @param src the input buffer
...
...
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