output: const plugin structures

Since the plugin struct is never modified, we should store it in
constant locations.
This commit is contained in:
Max Kellermann 2008-09-08 11:43:38 +02:00
parent be046b25a4
commit 3f6fe915eb
11 changed files with 11 additions and 11 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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;