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
8b19c74e
Commit
8b19c74e
authored
Jan 07, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm_format: pass struct pcm_dither_24 to pcm_convert_to_16()
The function does not need the full pcm_convert_state struct.
parent
df30a293
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
pcm_format.c
src/pcm_format.c
+3
-3
pcm_format.h
src/pcm_format.h
+2
-2
pcm_utils.c
src/pcm_utils.c
+1
-1
No files found.
src/pcm_format.c
View file @
8b19c74e
...
...
@@ -17,7 +17,7 @@
*/
#include "pcm_format.h"
#include "pcm_
utils
.h"
#include "pcm_
dither
.h"
#include <glib.h>
...
...
@@ -40,7 +40,7 @@ pcm_convert_24_to_16(struct pcm_dither_24 *dither,
}
const
int16_t
*
pcm_convert_to_16
(
struct
pcm_
convert_state
*
convert
,
pcm_convert_to_16
(
struct
pcm_
dither_24
*
dither
,
uint8_t
bits
,
const
void
*
src
,
size_t
src_size
,
size_t
*
dest_size_r
)
{
...
...
@@ -74,7 +74,7 @@ pcm_convert_to_16(struct pcm_convert_state *convert,
buf
=
g_realloc
(
buf
,
len
);
}
pcm_convert_24_to_16
(
&
convert
->
dither
,
pcm_convert_24_to_16
(
dither
,
(
int16_t
*
)
buf
,
(
const
int32_t
*
)
src
,
num_samples
);
...
...
src/pcm_format.h
View file @
8b19c74e
...
...
@@ -22,10 +22,10 @@
#include <stdint.h>
#include <stddef.h>
struct
pcm_
convert_state
;
struct
pcm_
dither_24
;
const
int16_t
*
pcm_convert_to_16
(
struct
pcm_
convert_state
*
convert
,
pcm_convert_to_16
(
struct
pcm_
dither_24
*
dither
,
uint8_t
bits
,
const
void
*
src
,
size_t
src_size
,
size_t
*
dest_size_r
);
...
...
src/pcm_utils.c
View file @
8b19c74e
...
...
@@ -51,7 +51,7 @@ pcm_convert_16(const struct audio_format *src_format,
assert
(
dest_format
->
bits
==
16
);
buf
=
pcm_convert_to_16
(
state
,
src_format
->
bits
,
buf
=
pcm_convert_to_16
(
&
state
->
dither
,
src_format
->
bits
,
src_buffer
,
src_size
,
&
len
);
if
(
!
buf
)
g_error
(
"pcm_convert_to_16() failed"
);
...
...
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