Commit 3f6fe915 authored by Max Kellermann's avatar Max Kellermann

output: const plugin structures

Since the plugin struct is never modified, we should store it in constant locations.
parent be046b25
......@@ -413,7 +413,7 @@ static int alsa_playAudio(struct audio_output *audioOutput,
return 0;
}
struct audio_output_plugin alsaPlugin = {
const struct audio_output_plugin alsaPlugin = {
"alsa",
alsa_testDefault,
alsa_initDriver,
......
......@@ -242,7 +242,7 @@ static int audioOutputAo_play(struct audio_output *audioOutput,
return 0;
}
struct audio_output_plugin aoPlugin = {
const struct audio_output_plugin aoPlugin = {
"ao",
NULL,
audioOutputAo_initDriver,
......
......@@ -272,7 +272,7 @@ static int fifo_playAudio(struct audio_output *audioOutput,
return 0;
}
struct audio_output_plugin fifoPlugin = {
const struct audio_output_plugin fifoPlugin = {
"fifo",
NULL, /* testDefaultDeviceFunc */
fifo_initDriver,
......
......@@ -430,7 +430,7 @@ static int jack_playAudio(struct audio_output *audioOutput,
return 0;
}
struct audio_output_plugin jackPlugin = {
const struct audio_output_plugin jackPlugin = {
"jack",
jack_testDefault,
jack_initDriver,
......
......@@ -257,7 +257,7 @@ static int mvp_playAudio(struct audio_output *audioOutput,
return 0;
}
struct audio_output_plugin mvpPlugin = {
const struct audio_output_plugin mvpPlugin = {
"mvp",
mvp_testDefault,
mvp_initDriver,
......
......@@ -63,7 +63,7 @@ static void null_dropBufferedAudio(struct audio_output *audioOutput)
timer_reset(audioOutput->data);
}
struct audio_output_plugin nullPlugin = {
const struct audio_output_plugin nullPlugin = {
"null",
NULL,
null_initDriver,
......
......@@ -549,7 +549,7 @@ static int oss_playAudio(struct audio_output *audioOutput,
return 0;
}
struct audio_output_plugin ossPlugin = {
const struct audio_output_plugin ossPlugin = {
"oss",
oss_testDefault,
oss_initDriver,
......
......@@ -355,7 +355,7 @@ static int osx_play(struct audio_output *audioOutput,
return 0;
}
struct audio_output_plugin osxPlugin = {
const struct audio_output_plugin osxPlugin = {
"osx",
osx_testDefault,
osx_initDriver,
......
......@@ -200,7 +200,7 @@ static int pulse_playAudio(struct audio_output *audioOutput,
return 0;
}
struct audio_output_plugin pulsePlugin = {
const struct audio_output_plugin pulsePlugin = {
"pulse",
pulse_testDefault,
pulse_initDriver,
......
......@@ -680,7 +680,7 @@ static void myShout_setTag(struct audio_output *audioOutput,
sd->tagToSend = 1;
}
struct audio_output_plugin shoutPlugin = {
const struct audio_output_plugin shoutPlugin = {
"shout",
NULL,
myShout_initDriver,
......
......@@ -28,7 +28,7 @@
#include "log.h"
#include "os_compat.h"
#define DISABLED_AUDIO_OUTPUT_PLUGIN(plugin) struct audio_output_plugin plugin;
#define DISABLED_AUDIO_OUTPUT_PLUGIN(plugin) const struct audio_output_plugin plugin;
struct audio_output;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment