Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
75a0062d
Commit
75a0062d
authored
9 years ago
by
Joshua Colp
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "codec_resample: Increase buffer for Opus Codec."
parents
385ac08d
b24f2f4c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
codecs/codec_resample.c
+4
-4
4 additions, 4 deletions
codecs/codec_resample.c
with
4 additions
and
4 deletions
codecs/codec_resample.c
+
4
−
4
View file @
75a0062d
...
...
@@ -38,7 +38,7 @@ ASTERISK_REGISTER_FILE()
#include
"asterisk/translate.h"
#include
"asterisk/slin.h"
#define OUTBUF_S
IZE 8096
#define OUTBUF_S
AMPLES 5760
static
struct
ast_translator
*
translators
;
static
int
trans_size
;
...
...
@@ -114,7 +114,7 @@ static void resamp_destroy(struct ast_trans_pvt *pvt)
static
int
resamp_framein
(
struct
ast_trans_pvt
*
pvt
,
struct
ast_frame
*
f
)
{
SpeexResamplerState
*
resamp_pvt
=
pvt
->
pvt
;
unsigned
int
out_samples
=
(
OUTBUF_S
IZE
/
sizeof
(
int16_t
))
-
pvt
->
samples
;
unsigned
int
out_samples
=
OUTBUF_S
AMPLES
-
pvt
->
samples
;
unsigned
int
in_samples
;
if
(
!
f
->
datalen
)
{
...
...
@@ -167,8 +167,8 @@ static int load_module(void)
translators
[
idx
].
destroy
=
resamp_destroy
;
translators
[
idx
].
framein
=
resamp_framein
;
translators
[
idx
].
desc_size
=
0
;
translators
[
idx
].
buffer_samples
=
(
OUTBUF_S
IZE
/
sizeof
(
int16_t
))
;
translators
[
idx
].
buf_size
=
OUTBUF_S
IZE
;
translators
[
idx
].
buffer_samples
=
OUTBUF_S
AMPLES
;
translators
[
idx
].
buf_size
=
(
OUTBUF_S
AMPLES
*
sizeof
(
int16_t
))
;
memcpy
(
&
translators
[
idx
].
src_codec
,
&
codec_list
[
x
],
sizeof
(
struct
ast_codec
));
memcpy
(
&
translators
[
idx
].
dst_codec
,
&
codec_list
[
y
],
sizeof
(
struct
ast_codec
));
snprintf
(
translators
[
idx
].
name
,
sizeof
(
translators
[
idx
].
name
),
"slin %ukhz -> %ukhz"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment