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:
@@ -166,6 +166,8 @@ struct AudioOutput {
|
||||
/**
|
||||
* The audio_format in which audio data is received from the
|
||||
* player thread (which in turn receives it from the decoder).
|
||||
*
|
||||
* Only accessible from within the OutputThread.
|
||||
*/
|
||||
AudioFormat in_audio_format;
|
||||
|
||||
@@ -246,6 +248,16 @@ struct AudioOutput {
|
||||
*/
|
||||
Command command = Command::NONE;
|
||||
|
||||
/**
|
||||
* Additional data for #command. Protected by #mutex.
|
||||
*/
|
||||
struct Request {
|
||||
/**
|
||||
* The #AudioFormat requested by #Command::OPEN.
|
||||
*/
|
||||
AudioFormat audio_format;
|
||||
} request;
|
||||
|
||||
/**
|
||||
* This mutex protects #open, #fail_timer, #pipe.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user