output: attach a filter chain to each audio_output

This patch adds initial filter support for audio outputs.  Each audio
output gets a "filter" attribute, which is used by ao_play_chunk().

The PCM conversion is now performed by convert_filter_plugin.
audio_output.convert_state has been removed.
This commit is contained in:
Max Kellermann
2009-07-06 10:01:47 +02:00
parent cd9c0a6b3e
commit e47bdfe8e6
6 changed files with 131 additions and 17 deletions

View File

@@ -22,6 +22,8 @@
#include "output_control.h"
#include "conf.h"
#include "audio_parser.h"
#include "filter_registry.h"
#include "pcm_convert.h"
#include <glib.h>
@@ -33,10 +35,31 @@ void pcm_convert_init(G_GNUC_UNUSED struct pcm_convert_state *state)
{
}
void pcm_convert_deinit(G_GNUC_UNUSED struct pcm_convert_state *state)
{
}
const void *
pcm_convert(G_GNUC_UNUSED struct pcm_convert_state *state,
G_GNUC_UNUSED const struct audio_format *src_format,
G_GNUC_UNUSED const void *src, G_GNUC_UNUSED size_t src_size,
G_GNUC_UNUSED const struct audio_format *dest_format,
G_GNUC_UNUSED size_t *dest_size_r)
{
return NULL;
}
void notify_init(G_GNUC_UNUSED struct notify *notify)
{
}
const struct filter_plugin *
filter_plugin_by_name(G_GNUC_UNUSED const char *name)
{
assert(false);
return NULL;
}
static const struct config_param *
find_named_config_block(const char *block, const char *name)
{