aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-19 15:09:01 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-19 15:09:01 +0000
commit1fd8d9a7900acbc0434ad16700af1406a54cfebb (patch)
tree27aed37f99b2fd1944bcbd5ccc43680d089ec64e
parenta809094bc350e8969ac734668fc983efba46ab94 (diff)
downloadmpd-1fd8d9a7900acbc0434ad16700af1406a54cfebb.tar.gz
mpd-1fd8d9a7900acbc0434ad16700af1406a54cfebb.tar.xz
mpd-1fd8d9a7900acbc0434ad16700af1406a54cfebb.zip
don't need to pass audioFormat to openDeviceFunc
git-svn-id: https://svn.musicpd.org/mpd/trunk@2708 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/audioOutput.c2
-rw-r--r--src/audioOutput.h3
-rw-r--r--src/audioOutputs/audioOutput_ao.c10
-rw-r--r--src/audioOutputs/audioOutput_shout.c4
4 files changed, 7 insertions, 12 deletions
diff --git a/src/audioOutput.c b/src/audioOutput.c
index 83616d37a..1968c4b39 100644
--- a/src/audioOutput.c
+++ b/src/audioOutput.c
@@ -126,7 +126,7 @@ int openAudioOutput(AudioOutput * audioOutput, AudioFormat * audioFormat) {
&audioOutput->inAudioFormat);
}
- return audioOutput->openDeviceFunc(audioOutput, audioFormat);
+ return audioOutput->openDeviceFunc(audioOutput);
}
static void convertAudioFormat(AudioOutput * audioOutput, char ** chunkArgPtr,
diff --git a/src/audioOutput.h b/src/audioOutput.h
index 9e6da5617..787891fbf 100644
--- a/src/audioOutput.h
+++ b/src/audioOutput.h
@@ -33,8 +33,7 @@ typedef int (* AudioOutputInitDriverFunc) (AudioOutput * audioOutput,
typedef void (* AudioOutputFinishDriverFunc) (AudioOutput * audioOutput);
-typedef int (* AudioOutputOpenDeviceFunc) (AudioOutput * audioOutput,
- AudioFormat * audioFormat);
+typedef int (* AudioOutputOpenDeviceFunc) (AudioOutput * audioOutput);
typedef int (* AudioOutputPlayFunc) (AudioOutput * audioOutput,
char * playChunk, int size);
diff --git a/src/audioOutputs/audioOutput_ao.c b/src/audioOutputs/audioOutput_ao.c
index 83cc176fe..db9c6d50c 100644
--- a/src/audioOutputs/audioOutput_ao.c
+++ b/src/audioOutputs/audioOutput_ao.c
@@ -179,9 +179,7 @@ static void audioOutputAo_closeDevice(AudioOutput * audioOutput) {
audioOutput->open = 0;
}
-static int audioOutputAo_openDevice(AudioOutput * audioOutput,
- AudioFormat * audioFormat)
-{
+static int audioOutputAo_openDevice(AudioOutput * audioOutput) {
ao_sample_format format;
AoData * ad = (AoData *)audioOutput->data;
@@ -189,10 +187,10 @@ static int audioOutputAo_openDevice(AudioOutput * audioOutput,
audioOutputAo_closeDevice(audioOutput);
}
- format.bits = audioFormat->bits;
- format.rate = audioFormat->sampleRate;
+ format.bits = audioOutput->outAudioFormat.bits;
+ format.rate = audioOutput->outAudioFormat.sampleRate;
format.byte_format = AO_FMT_NATIVE;
- format.channels = audioFormat->channels;
+ format.channels = audioOutput->outAudioFormat.channels;
ad->device = ao_open_live(ad->driverId, &format, ad->options);
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index 661acd07d..685b1cca2 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -484,9 +484,7 @@ static int myShout_openShoutConn(AudioOutput * audioOutput) {
return 0;
}
-static int myShout_openDevice(AudioOutput * audioOutput,
- AudioFormat * audioFormat)
-{
+static int myShout_openDevice(AudioOutput * audioOutput) {
ShoutData * sd = (ShoutData *)audioOutput->data;
audioOutput->open = 1;