Display and control your Android device
Remove unused audio player fields
Romain Vimont2e7a15a99876
diff --git a/app/src/audio_player.c b/app/src/audio_player.cindex 274b6948..24144483 100644--- a/app/src/audio_player.c+++ b/app/src/audio_player.c@@ -351,8 +351,6 @@ sc_audio_player_frame_sink_open(struct sc_frame_sink *sink,assert(out_bytes_per_sample > 0);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/ SC_TICK_FREQ;@@ -413,7 +411,7 @@ sc_audio_player_frame_sink_open(struct sc_frame_sink *sink,// without locking.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);if (!ok) {goto error_free_swr_ctx;diff --git a/app/src/audio_player.h b/app/src/audio_player.hindex 3d468999..e638e601 100644--- a/app/src/audio_player.h+++ b/app/src/audio_player.h@@ -41,10 +41,6 @@ struct sc_audio_player {// The sample rate is the same for input and outputunsigned 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)uint8_t *swr_buf;