Skip to content

Commit

Permalink
plugins: add missing 'static' to function
Browse files Browse the repository at this point in the history
add missing `static` to internal functions to avoid duplicate symbol
error

Signed-off-by: Inho Oh <[email protected]>
  • Loading branch information
webispy authored and kimhyungrok committed May 20, 2024
1 parent 75efcef commit 6deb905
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
15 changes: 8 additions & 7 deletions plugins/opus_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ static void flush_stream(struct opus_data *od)
}
}

int _encoder_create(NuguEncoderDriver *driver, NuguEncoder *enc,
NuguAudioProperty property)
static int _encoder_create(NuguEncoderDriver *driver, NuguEncoder *enc,
NuguAudioProperty property)
{
struct opus_data *od;
int err;
Expand Down Expand Up @@ -209,8 +209,8 @@ int _encoder_create(NuguEncoderDriver *driver, NuguEncoder *enc,
return 0;
}

int do_encode(struct opus_data *od, int is_last, const unsigned char *buf,
size_t buf_len)
static int do_encode(struct opus_data *od, int is_last,
const unsigned char *buf, size_t buf_len)
{
int enc_len;
size_t samples = buf_len / 2;
Expand Down Expand Up @@ -251,8 +251,9 @@ int do_encode(struct opus_data *od, int is_last, const unsigned char *buf,
return enc_len;
}

int _encoder_encode(NuguEncoderDriver *driver, NuguEncoder *enc, int is_last,
const void *data, size_t data_len, NuguBuffer *out_buf)
static int _encoder_encode(NuguEncoderDriver *driver, NuguEncoder *enc,
int is_last, const void *data, size_t data_len,
NuguBuffer *out_buf)
{
struct opus_data *od;
const unsigned char *buf = data;
Expand Down Expand Up @@ -293,7 +294,7 @@ int _encoder_encode(NuguEncoderDriver *driver, NuguEncoder *enc, int is_last,
return 0;
}

int _encoder_destroy(NuguEncoderDriver *driver, NuguEncoder *enc)
static int _encoder_destroy(NuguEncoderDriver *driver, NuguEncoder *enc)
{
struct opus_data *od;

Expand Down
11 changes: 6 additions & 5 deletions plugins/speex.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ static int _dumpfile_open(const char *path, const char *prefix)
}
#endif

int _encoder_create(NuguEncoderDriver *driver, NuguEncoder *enc,
NuguAudioProperty property)
static int _encoder_create(NuguEncoderDriver *driver, NuguEncoder *enc,
NuguAudioProperty property)
{
int sample_rate;
struct encoder_data *ed;
Expand Down Expand Up @@ -139,8 +139,9 @@ int _encoder_create(NuguEncoderDriver *driver, NuguEncoder *enc,
return 0;
}

int _encoder_encode(NuguEncoderDriver *driver, NuguEncoder *enc, int is_end,
const void *data, size_t data_len, NuguBuffer *out_buf)
static int _encoder_encode(NuguEncoderDriver *driver, NuguEncoder *enc,
int is_end, const void *data, size_t data_len,
NuguBuffer *out_buf)
{
struct encoder_data *ed;
int encoded_size;
Expand Down Expand Up @@ -188,7 +189,7 @@ int _encoder_encode(NuguEncoderDriver *driver, NuguEncoder *enc, int is_end,
return 0;
}

int _encoder_destroy(NuguEncoderDriver *driver, NuguEncoder *enc)
static int _encoder_destroy(NuguEncoderDriver *driver, NuguEncoder *enc)
{
struct encoder_data *ed;

Expand Down

0 comments on commit 6deb905

Please sign in to comment.