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
656d5c9c
Commit
656d5c9c
authored
Feb 17, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm_convert: removed pcm_convert_size()
The function is unused, since we added the pcm_buffer library.
parent
ac3e2de2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
20 deletions
+0
-20
pcm_convert.c
src/pcm_convert.c
+0
-17
pcm_convert.h
src/pcm_convert.h
+0
-3
No files found.
src/pcm_convert.c
View file @
656d5c9c
...
...
@@ -146,20 +146,3 @@ pcm_convert(struct pcm_convert_state *state,
return
0
;
}
}
size_t
pcm_convert_size
(
const
struct
audio_format
*
inFormat
,
size_t
src_size
,
const
struct
audio_format
*
outFormat
)
{
const
double
ratio
=
(
double
)
outFormat
->
sample_rate
/
(
double
)
inFormat
->
sample_rate
;
size_t
dest_size
=
src_size
;
/* no partial frames allowed */
assert
((
src_size
%
audio_format_frame_size
(
inFormat
))
==
0
);
dest_size
/=
audio_format_frame_size
(
inFormat
);
dest_size
=
ceil
((
double
)
dest_size
*
ratio
);
dest_size
*=
audio_format_frame_size
(
outFormat
);
return
dest_size
;
}
src/pcm_convert.h
View file @
656d5c9c
...
...
@@ -48,7 +48,4 @@ pcm_convert(struct pcm_convert_state *state,
const
struct
audio_format
*
dest_format
,
size_t
*
dest_size_r
);
size_t
pcm_convert_size
(
const
struct
audio_format
*
inFormat
,
size_t
inSize
,
const
struct
audio_format
*
outFormat
);
#endif
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