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
44ac8476
Commit
44ac8476
authored
Nov 11, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PcmResampleFallback: use PcmBuffer instead of PcmResampler
Lighter API.
parent
a40d7ae4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
PcmResample.cxx
src/pcm/PcmResample.cxx
+3
-3
PcmResampleFallback.cxx
src/pcm/PcmResampleFallback.cxx
+4
-4
PcmResampleInternal.hxx
src/pcm/PcmResampleInternal.hxx
+2
-2
No files found.
src/pcm/PcmResample.cxx
View file @
44ac8476
...
...
@@ -101,7 +101,7 @@ PcmResampler::ResampleFloat(unsigned channels, unsigned src_rate,
not do any math on the sample values, so this hack is
possible: */
return
(
const
float
*
)
pcm_resample_fallback_32
(
this
,
channels
,
pcm_resample_fallback_32
(
buffer
,
channels
,
src_rate
,
(
const
int32_t
*
)
src_buffer
,
src_size
,
dest_rate
,
dest_size_r
);
...
...
@@ -123,7 +123,7 @@ PcmResampler::Resample16(unsigned channels,
(
void
)
error_r
;
#endif
return
pcm_resample_fallback_16
(
this
,
channels
,
return
pcm_resample_fallback_16
(
buffer
,
channels
,
src_rate
,
src_buffer
,
src_size
,
dest_rate
,
dest_size_r
);
}
...
...
@@ -144,7 +144,7 @@ PcmResampler::Resample32(unsigned channels, unsigned src_rate,
(
void
)
error_r
;
#endif
return
pcm_resample_fallback_32
(
this
,
channels
,
return
pcm_resample_fallback_32
(
buffer
,
channels
,
src_rate
,
src_buffer
,
src_size
,
dest_rate
,
dest_size_r
);
}
src/pcm/PcmResampleFallback.cxx
View file @
44ac8476
...
...
@@ -24,7 +24,7 @@
/* resampling code blatantly ripped from ESD */
const
int16_t
*
pcm_resample_fallback_16
(
Pcm
Resampler
*
state
,
pcm_resample_fallback_16
(
Pcm
Buffer
&
buffer
,
unsigned
channels
,
unsigned
src_rate
,
const
int16_t
*
src_buffer
,
size_t
src_size
,
...
...
@@ -37,7 +37,7 @@ pcm_resample_fallback_16(PcmResampler *state,
(
src_frames
*
dest_rate
+
src_rate
-
1
)
/
src_rate
;
unsigned
dest_samples
=
dest_frames
*
channels
;
size_t
dest_size
=
dest_samples
*
sizeof
(
*
src_buffer
);
int16_t
*
dest_buffer
=
(
int16_t
*
)
state
->
buffer
.
Get
(
dest_size
);
int16_t
*
dest_buffer
=
(
int16_t
*
)
buffer
.
Get
(
dest_size
);
assert
((
src_size
%
(
sizeof
(
*
src_buffer
)
*
channels
))
==
0
);
...
...
@@ -65,7 +65,7 @@ pcm_resample_fallback_16(PcmResampler *state,
}
const
int32_t
*
pcm_resample_fallback_32
(
Pcm
Resampler
*
state
,
pcm_resample_fallback_32
(
Pcm
Buffer
&
buffer
,
unsigned
channels
,
unsigned
src_rate
,
const
int32_t
*
src_buffer
,
size_t
src_size
,
...
...
@@ -78,7 +78,7 @@ pcm_resample_fallback_32(PcmResampler *state,
(
src_frames
*
dest_rate
+
src_rate
-
1
)
/
src_rate
;
unsigned
dest_samples
=
dest_frames
*
channels
;
size_t
dest_size
=
dest_samples
*
sizeof
(
*
src_buffer
);
int32_t
*
dest_buffer
=
(
int32_t
*
)
state
->
buffer
.
Get
(
dest_size
);
int32_t
*
dest_buffer
=
(
int32_t
*
)
buffer
.
Get
(
dest_size
);
assert
((
src_size
%
(
sizeof
(
*
src_buffer
)
*
channels
))
==
0
);
...
...
src/pcm/PcmResampleInternal.hxx
View file @
44ac8476
...
...
@@ -72,7 +72,7 @@ pcm_resample_lsr_32(PcmResampler *state,
#endif
const
int16_t
*
pcm_resample_fallback_16
(
Pcm
Resampler
*
state
,
pcm_resample_fallback_16
(
Pcm
Buffer
&
buffer
,
unsigned
channels
,
unsigned
src_rate
,
const
int16_t
*
src_buffer
,
size_t
src_size
,
...
...
@@ -80,7 +80,7 @@ pcm_resample_fallback_16(PcmResampler *state,
size_t
*
dest_size_r
);
const
int32_t
*
pcm_resample_fallback_32
(
Pcm
Resampler
*
state
,
pcm_resample_fallback_32
(
Pcm
Buffer
&
buffer
,
unsigned
channels
,
unsigned
src_rate
,
const
int32_t
*
src_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