aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio.c10
-rw-r--r--src/audio.h11
2 files changed, 11 insertions, 10 deletions
diff --git a/src/audio.c b/src/audio.c
index 1e4c70cbc..3c5ef4478 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -64,7 +64,7 @@ unsigned int audio_device_count(void)
return nr;
}
-void copyAudioFormat(AudioFormat * dest, AudioFormat * src)
+void copyAudioFormat(AudioFormat * dest, const AudioFormat * src)
{
if (!src)
return;
@@ -72,7 +72,7 @@ void copyAudioFormat(AudioFormat * dest, AudioFormat * src)
memcpy(dest, src, sizeof(AudioFormat));
}
-int cmpAudioFormat(AudioFormat * f1, AudioFormat * f2)
+int cmpAudioFormat(const AudioFormat * f1, const AudioFormat * f2)
{
if (f1 && f2 && (f1->sampleRate == f2->sampleRate) &&
(f1->bits == f2->bits) && (f1->channels == f2->channels))
@@ -141,7 +141,7 @@ void initAudioDriver(void)
}
}
-void getOutputAudioFormat(AudioFormat * inAudioFormat,
+void getOutputAudioFormat(const AudioFormat * inAudioFormat,
AudioFormat * outAudioFormat)
{
if (audio_configFormat) {
@@ -251,7 +251,7 @@ void finishAudioDriver(void)
audioOutputArraySize = 0;
}
-int isCurrentAudioFormat(AudioFormat * audioFormat)
+int isCurrentAudioFormat(const AudioFormat * audioFormat)
{
if (!audioFormat)
return 1;
@@ -319,7 +319,7 @@ static int flushAudioBuffer(void)
return ret;
}
-int openAudioDevice(AudioFormat * audioFormat)
+int openAudioDevice(const AudioFormat * audioFormat)
{
int ret = -1;
unsigned int i;
diff --git a/src/audio.h b/src/audio.h
index f8b28d0d0..71d79ec84 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -38,11 +38,12 @@ static inline double audioFormatSizeToTime(const AudioFormat * af)
return 8.0 / af->bits / af->channels / af->sampleRate;
}
-void copyAudioFormat(AudioFormat * dest, AudioFormat * src);
+void copyAudioFormat(AudioFormat * dest, const AudioFormat * src);
-int cmpAudioFormat(AudioFormat * dest, AudioFormat * src);
+int cmpAudioFormat(const AudioFormat * dest, const AudioFormat * src);
-void getOutputAudioFormat(AudioFormat * inFormat, AudioFormat * outFormat);
+void getOutputAudioFormat(const AudioFormat * inFormat,
+ AudioFormat * outFormat);
int parseAudioConfig(AudioFormat * audioFormat, char *conf);
@@ -55,7 +56,7 @@ void initAudioDriver(void);
void finishAudioDriver(void);
-int openAudioDevice(AudioFormat * audioFormat);
+int openAudioDevice(const AudioFormat * audioFormat);
int playAudio(const char *playChunk, size_t size);
@@ -65,7 +66,7 @@ void closeAudioDevice(void);
int isAudioDeviceOpen(void);
-int isCurrentAudioFormat(AudioFormat * audioFormat);
+int isCurrentAudioFormat(const AudioFormat * audioFormat);
void sendMetadataToAudioDevice(MpdTag * tag);