output/Interface: convert to class, make attributes private

This commit is contained in:
Max Kellermann
2017-08-09 16:58:59 +02:00
parent 7381236de6
commit 9c9a9ccd5c
6 changed files with 36 additions and 27 deletions

View File

@@ -22,7 +22,7 @@
struct AudioOutputPlugin;
struct AudioOutput {
class AudioOutput {
/**
* The plugin which implements this output device.
*/
@@ -30,9 +30,18 @@ struct AudioOutput {
bool need_fully_defined_audio_format = false;
public:
AudioOutput(const AudioOutputPlugin &_plugin)
:plugin(_plugin) {}
const AudioOutputPlugin &GetPlugin() const {
return plugin;
}
bool GetNeedFullyDefinedAudioFormat() const {
return need_fully_defined_audio_format;
}
/**
* Plugins shall call this method if they require an
* "audio_format" setting which evaluates