decoder/Control: add attribute configured_audio_format
Obsoletes the same variable from AudioConfig.cxx.
This commit is contained in:
@@ -30,10 +30,12 @@ PlayerControl::PlayerControl(PlayerListener &_listener,
|
||||
MultipleOutputs &_outputs,
|
||||
unsigned _buffer_chunks,
|
||||
unsigned _buffered_before_play,
|
||||
AudioFormat _configured_audio_format,
|
||||
const ReplayGainConfig &_replay_gain_config)
|
||||
:listener(_listener), outputs(_outputs),
|
||||
buffer_chunks(_buffer_chunks),
|
||||
buffered_before_play(_buffered_before_play),
|
||||
configured_audio_format(_configured_audio_format),
|
||||
replay_gain_config(_replay_gain_config)
|
||||
{
|
||||
}
|
||||
|
@@ -105,6 +105,11 @@ struct PlayerControl {
|
||||
|
||||
const unsigned buffered_before_play;
|
||||
|
||||
/**
|
||||
* The "audio_output_format" setting.
|
||||
*/
|
||||
const AudioFormat configured_audio_format;
|
||||
|
||||
/**
|
||||
* The handle of the player thread.
|
||||
*/
|
||||
@@ -187,6 +192,7 @@ struct PlayerControl {
|
||||
MultipleOutputs &_outputs,
|
||||
unsigned buffer_chunks,
|
||||
unsigned buffered_before_play,
|
||||
AudioFormat _configured_audio_format,
|
||||
const ReplayGainConfig &_replay_gain_config);
|
||||
~PlayerControl();
|
||||
|
||||
|
@@ -1163,7 +1163,9 @@ player_task(void *arg)
|
||||
|
||||
SetThreadName("player");
|
||||
|
||||
DecoderControl dc(pc.mutex, pc.cond, pc.replay_gain_config);
|
||||
DecoderControl dc(pc.mutex, pc.cond,
|
||||
pc.configured_audio_format,
|
||||
pc.replay_gain_config);
|
||||
decoder_thread_start(dc);
|
||||
|
||||
MusicBuffer buffer(pc.buffer_chunks);
|
||||
|
Reference in New Issue
Block a user