output: const plugin structures
Since the plugin struct is never modified, we should store it in constant locations.
This commit is contained in:
parent
be046b25a4
commit
3f6fe915eb
@ -413,7 +413,7 @@ static int alsa_playAudio(struct audio_output *audioOutput,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct audio_output_plugin alsaPlugin = {
|
const struct audio_output_plugin alsaPlugin = {
|
||||||
"alsa",
|
"alsa",
|
||||||
alsa_testDefault,
|
alsa_testDefault,
|
||||||
alsa_initDriver,
|
alsa_initDriver,
|
||||||
|
@ -242,7 +242,7 @@ static int audioOutputAo_play(struct audio_output *audioOutput,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct audio_output_plugin aoPlugin = {
|
const struct audio_output_plugin aoPlugin = {
|
||||||
"ao",
|
"ao",
|
||||||
NULL,
|
NULL,
|
||||||
audioOutputAo_initDriver,
|
audioOutputAo_initDriver,
|
||||||
|
@ -272,7 +272,7 @@ static int fifo_playAudio(struct audio_output *audioOutput,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct audio_output_plugin fifoPlugin = {
|
const struct audio_output_plugin fifoPlugin = {
|
||||||
"fifo",
|
"fifo",
|
||||||
NULL, /* testDefaultDeviceFunc */
|
NULL, /* testDefaultDeviceFunc */
|
||||||
fifo_initDriver,
|
fifo_initDriver,
|
||||||
|
@ -430,7 +430,7 @@ static int jack_playAudio(struct audio_output *audioOutput,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct audio_output_plugin jackPlugin = {
|
const struct audio_output_plugin jackPlugin = {
|
||||||
"jack",
|
"jack",
|
||||||
jack_testDefault,
|
jack_testDefault,
|
||||||
jack_initDriver,
|
jack_initDriver,
|
||||||
|
@ -257,7 +257,7 @@ static int mvp_playAudio(struct audio_output *audioOutput,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct audio_output_plugin mvpPlugin = {
|
const struct audio_output_plugin mvpPlugin = {
|
||||||
"mvp",
|
"mvp",
|
||||||
mvp_testDefault,
|
mvp_testDefault,
|
||||||
mvp_initDriver,
|
mvp_initDriver,
|
||||||
|
@ -63,7 +63,7 @@ static void null_dropBufferedAudio(struct audio_output *audioOutput)
|
|||||||
timer_reset(audioOutput->data);
|
timer_reset(audioOutput->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct audio_output_plugin nullPlugin = {
|
const struct audio_output_plugin nullPlugin = {
|
||||||
"null",
|
"null",
|
||||||
NULL,
|
NULL,
|
||||||
null_initDriver,
|
null_initDriver,
|
||||||
|
@ -549,7 +549,7 @@ static int oss_playAudio(struct audio_output *audioOutput,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct audio_output_plugin ossPlugin = {
|
const struct audio_output_plugin ossPlugin = {
|
||||||
"oss",
|
"oss",
|
||||||
oss_testDefault,
|
oss_testDefault,
|
||||||
oss_initDriver,
|
oss_initDriver,
|
||||||
|
@ -355,7 +355,7 @@ static int osx_play(struct audio_output *audioOutput,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct audio_output_plugin osxPlugin = {
|
const struct audio_output_plugin osxPlugin = {
|
||||||
"osx",
|
"osx",
|
||||||
osx_testDefault,
|
osx_testDefault,
|
||||||
osx_initDriver,
|
osx_initDriver,
|
||||||
|
@ -200,7 +200,7 @@ static int pulse_playAudio(struct audio_output *audioOutput,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct audio_output_plugin pulsePlugin = {
|
const struct audio_output_plugin pulsePlugin = {
|
||||||
"pulse",
|
"pulse",
|
||||||
pulse_testDefault,
|
pulse_testDefault,
|
||||||
pulse_initDriver,
|
pulse_initDriver,
|
||||||
|
@ -680,7 +680,7 @@ static void myShout_setTag(struct audio_output *audioOutput,
|
|||||||
sd->tagToSend = 1;
|
sd->tagToSend = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct audio_output_plugin shoutPlugin = {
|
const struct audio_output_plugin shoutPlugin = {
|
||||||
"shout",
|
"shout",
|
||||||
NULL,
|
NULL,
|
||||||
myShout_initDriver,
|
myShout_initDriver,
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "os_compat.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;
|
struct audio_output;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user