output/Internal: add attribute request.audio_format

Make in_audio_format accessible only from within the OutputThread, and
add a new one for inter-thread communication.
This commit is contained in:
Max Kellermann
2016-12-21 17:00:29 +01:00
parent 176dc11748
commit e5c9f6c1fe
3 changed files with 17 additions and 3 deletions

View File

@@ -134,7 +134,7 @@ inline void
AudioOutput::Open()
{
assert(!open);
assert(in_audio_format.IsValid());
assert(request.audio_format.IsValid());
fail_timer.Reset();
@@ -144,6 +144,8 @@ AudioOutput::Open()
/* still no luck */
return;
in_audio_format = request.audio_format;
bool success;
{