output/Shout: move ConfigureShoutAudioInfo() call to Open()
Configure the AudioFormat after opening the encoder, because only now we know the final format.
This commit is contained in:
@@ -224,8 +224,6 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block)
|
|||||||
if (value != nullptr && shout_set_url(shout_conn, value))
|
if (value != nullptr && shout_set_url(shout_conn, value))
|
||||||
throw std::runtime_error(shout_get_error(shout_conn));
|
throw std::runtime_error(shout_get_error(shout_conn));
|
||||||
|
|
||||||
ShoutSetAudioInfo(shout_conn, audio_format);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
char temp[11];
|
char temp[11];
|
||||||
if (quality >= -1.0) {
|
if (quality >= -1.0) {
|
||||||
@@ -357,6 +355,7 @@ ShoutOutput::Open(AudioFormat &audio_format)
|
|||||||
encoder = prepared_encoder->Open(audio_format);
|
encoder = prepared_encoder->Open(audio_format);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
ShoutSetAudioInfo(shout_conn, audio_format);
|
||||||
ShoutOpen(shout_conn);
|
ShoutOpen(shout_conn);
|
||||||
WritePage();
|
WritePage();
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
Reference in New Issue
Block a user