don't need to pass audioFormat to openDeviceFunc
git-svn-id: https://svn.musicpd.org/mpd/trunk@2708 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
a809094bc3
commit
1fd8d9a790
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue