diff options
author | Max Kellermann <max@duempel.org> | 2008-09-24 07:20:55 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-24 07:20:55 +0200 |
commit | acc4a0ba2dd0be3f28c4ca009e08d1cc1bbc534a (patch) | |
tree | 7d4ea0359c85f67d0366fb58ae80c8aa35f3a473 /src/output_control.c | |
parent | 63fb1efb5cd6665b73ced155ba89a5c7f094d9ab (diff) | |
download | mpd-acc4a0ba2dd0be3f28c4ca009e08d1cc1bbc534a.tar.gz mpd-acc4a0ba2dd0be3f28c4ca009e08d1cc1bbc534a.tar.xz mpd-acc4a0ba2dd0be3f28c4ca009e08d1cc1bbc534a.zip |
output: make "struct audio_output" opaque for output plugins
We have eliminated direct accesses to the audio_output struct from
the all output plugins. Make it opaque for them, and move its real
declaration to output_internal.h, similar to decoder_internal.h.
Pass the opaque structure to plugin.init() only, which will return the
plugin's data pointer on success, and NULL on failure. This data
pointer will be passed to all other methods instead of the
audio_output struct.
Diffstat (limited to 'src/output_control.c')
-rw-r--r-- | src/output_control.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output_control.c b/src/output_control.c index 2fc692d6b..34e51aa41 100644 --- a/src/output_control.c +++ b/src/output_control.c @@ -18,6 +18,7 @@ #include "output_control.h" #include "output_api.h" +#include "output_internal.h" #include "output_thread.h" #include "pcm_utils.h" @@ -107,7 +108,7 @@ void audio_output_finish(struct audio_output *audioOutput) if (audioOutput->thread != 0) ao_command(audioOutput, AO_COMMAND_KILL); if (audioOutput->plugin->finish) - audioOutput->plugin->finish(audioOutput); + audioOutput->plugin->finish(audioOutput->data); if (audioOutput->convBuffer) free(audioOutput->convBuffer); } |