Skip to content

Commit

Permalink
Avoiding get_demixing_matrix() symbol clash on unified build
Browse files Browse the repository at this point in the history
  • Loading branch information
jmvalin committed Sep 10, 2018
1 parent eb55ebf commit 5cbd7d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/opus_projection_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static void opus_projection_copy_channel_out_short(
src_stride, short_dst, dst_stride, frame_size);
}

static MappingMatrix *get_demixing_matrix(OpusProjectionDecoder *st)
static MappingMatrix *get_dec_demixing_matrix(OpusProjectionDecoder *st)
{
/* void* cast avoids clang -Wcast-align warning */
return (MappingMatrix*)(void*)((char*)st +
Expand Down Expand Up @@ -160,7 +160,7 @@ int opus_projection_decoder_init(OpusProjectionDecoder *st, opus_int32 Fs,
return OPUS_BAD_ARG;
}

mapping_matrix_init(get_demixing_matrix(st), channels, nb_input_streams, 0,
mapping_matrix_init(get_dec_demixing_matrix(st), channels, nb_input_streams, 0,
buf, demixing_matrix_size);

/* Set trivial mapping so each input channel pairs with a matrix column. */
Expand Down Expand Up @@ -216,7 +216,7 @@ int opus_projection_decode(OpusProjectionDecoder *st, const unsigned char *data,
{
return opus_multistream_decode_native(get_multistream_decoder(st), data, len,
pcm, opus_projection_copy_channel_out_short, frame_size, decode_fec, 0,
get_demixing_matrix(st));
get_dec_demixing_matrix(st));
}
#else
int opus_projection_decode(OpusProjectionDecoder *st, const unsigned char *data,
Expand All @@ -225,7 +225,7 @@ int opus_projection_decode(OpusProjectionDecoder *st, const unsigned char *data,
{
return opus_multistream_decode_native(get_multistream_decoder(st), data, len,
pcm, opus_projection_copy_channel_out_short, frame_size, decode_fec, 1,
get_demixing_matrix(st));
get_dec_demixing_matrix(st));
}
#endif

Expand All @@ -235,7 +235,7 @@ int opus_projection_decode_float(OpusProjectionDecoder *st, const unsigned char
{
return opus_multistream_decode_native(get_multistream_decoder(st), data, len,
pcm, opus_projection_copy_channel_out_float, frame_size, decode_fec, 0,
get_demixing_matrix(st));
get_dec_demixing_matrix(st));
}
#endif

Expand Down
6 changes: 3 additions & 3 deletions src/opus_projection_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static MappingMatrix *get_mixing_matrix(OpusProjectionEncoder *st)
align(sizeof(OpusProjectionEncoder)));
}

static MappingMatrix *get_demixing_matrix(OpusProjectionEncoder *st)
static MappingMatrix *get_enc_demixing_matrix(OpusProjectionEncoder *st)
{
/* void* cast avoids clang -Wcast-align warning */
return (MappingMatrix *)(void*)((char*)st +
Expand Down Expand Up @@ -254,7 +254,7 @@ int opus_projection_ambisonics_encoder_init(OpusProjectionEncoder *st, opus_int3
return OPUS_BAD_ARG;

/* Assign demixing matrix based on available pre-computed matrices. */
demixing_matrix = get_demixing_matrix(st);
demixing_matrix = get_enc_demixing_matrix(st);
if (order_plus_one == 2)
{
mapping_matrix_init(demixing_matrix, mapping_matrix_foa_demixing.rows,
Expand Down Expand Up @@ -385,7 +385,7 @@ int opus_projection_encoder_ctl(OpusProjectionEncoder *st, int request, ...)
int ret = OPUS_OK;

ms_encoder = get_multistream_encoder(st);
demixing_matrix = get_demixing_matrix(st);
demixing_matrix = get_enc_demixing_matrix(st);

va_start(ap, request);
switch(request)
Expand Down

0 comments on commit 5cbd7d5

Please sign in to comment.