Remove unused audio player fields
They are only used locally.
This commit is contained in:
parent
a7e61fb871
commit
2e7a15a998
@ -351,8 +351,6 @@ sc_audio_player_frame_sink_open(struct sc_frame_sink *sink,
|
|||||||
assert(out_bytes_per_sample > 0);
|
assert(out_bytes_per_sample > 0);
|
||||||
|
|
||||||
ap->sample_rate = ctx->sample_rate;
|
ap->sample_rate = ctx->sample_rate;
|
||||||
ap->nb_channels = nb_channels;
|
|
||||||
ap->out_bytes_per_sample = out_bytes_per_sample;
|
|
||||||
|
|
||||||
ap->target_buffering = ap->target_buffering_delay * ap->sample_rate
|
ap->target_buffering = ap->target_buffering_delay * ap->sample_rate
|
||||||
/ SC_TICK_FREQ;
|
/ SC_TICK_FREQ;
|
||||||
@ -413,7 +411,7 @@ sc_audio_player_frame_sink_open(struct sc_frame_sink *sink,
|
|||||||
// without locking.
|
// without locking.
|
||||||
uint32_t audiobuf_samples = ap->target_buffering + ap->sample_rate;
|
uint32_t audiobuf_samples = ap->target_buffering + ap->sample_rate;
|
||||||
|
|
||||||
size_t sample_size = ap->nb_channels * ap->out_bytes_per_sample;
|
size_t sample_size = nb_channels * out_bytes_per_sample;
|
||||||
bool ok = sc_audiobuf_init(&ap->buf, sample_size, audiobuf_samples);
|
bool ok = sc_audiobuf_init(&ap->buf, sample_size, audiobuf_samples);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
goto error_free_swr_ctx;
|
goto error_free_swr_ctx;
|
||||||
|
@ -41,10 +41,6 @@ struct sc_audio_player {
|
|||||||
|
|
||||||
// The sample rate is the same for input and output
|
// The sample rate is the same for input and output
|
||||||
unsigned sample_rate;
|
unsigned sample_rate;
|
||||||
// The number of channels is the same for input and output
|
|
||||||
unsigned nb_channels;
|
|
||||||
// The number of bytes per sample for a single channel
|
|
||||||
size_t out_bytes_per_sample;
|
|
||||||
|
|
||||||
// Target buffer for resampling (only used by the receiver thread)
|
// Target buffer for resampling (only used by the receiver thread)
|
||||||
uint8_t *swr_buf;
|
uint8_t *swr_buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user