aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/run_output.c')
-rw-r--r--test/run_output.c41
1 files changed, 35 insertions, 6 deletions
diff --git a/test/run_output.c b/test/run_output.c
index 1a171198d..5ab9625e8 100644
--- a/test/run_output.c
+++ b/test/run_output.c
@@ -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,34 @@ 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,
+ GError **error_r)
+{
+ g_set_error(error_r, pcm_convert_quark(), 0,
+ "Not implemented");
+ 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)
{
@@ -77,11 +103,7 @@ load_audio_output(struct audio_output *ao, const char *name)
int main(int argc, char **argv)
{
struct audio_output ao;
- struct audio_format audio_format = {
- .sample_rate = 44100,
- .bits = 16,
- .channels = 2,
- };
+ struct audio_format audio_format;
bool success;
GError *error = NULL;
char buffer[4096];
@@ -93,12 +115,19 @@ int main(int argc, char **argv)
return 1;
}
+ audio_format_init(&audio_format, 44100, 16, 2);
+
g_thread_init(NULL);
/* read configuration file (mpd.conf) */
config_global_init();
- config_read_file(argv[1]);
+ success = config_read_file(argv[1], &error);
+ if (!success) {
+ g_printerr("%s:", error->message);
+ g_error_free(error);
+ return 1;
+ }
/* initialize the audio output */