audio_format: convert to C++
This commit is contained in:
@@ -19,18 +19,19 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "AudioConfig.hxx"
|
||||
#include "audio_format.h"
|
||||
#include "AudioFormat.hxx"
|
||||
#include "AudioParser.hxx"
|
||||
#include "conf.h"
|
||||
#include "mpd_error.h"
|
||||
|
||||
static struct audio_format configured_audio_format;
|
||||
static AudioFormat configured_audio_format;
|
||||
|
||||
void getOutputAudioFormat(const struct audio_format *inAudioFormat,
|
||||
struct audio_format *outAudioFormat)
|
||||
AudioFormat
|
||||
getOutputAudioFormat(AudioFormat inAudioFormat)
|
||||
{
|
||||
*outAudioFormat = *inAudioFormat;
|
||||
audio_format_mask_apply(outAudioFormat, &configured_audio_format);
|
||||
AudioFormat out_audio_format = inAudioFormat;
|
||||
out_audio_format.ApplyMask(configured_audio_format);
|
||||
return out_audio_format;
|
||||
}
|
||||
|
||||
void initAudioConfig(void)
|
||||
@@ -42,7 +43,7 @@ void initAudioConfig(void)
|
||||
if (param == NULL)
|
||||
return;
|
||||
|
||||
ret = audio_format_parse(&configured_audio_format, param->value,
|
||||
ret = audio_format_parse(configured_audio_format, param->value,
|
||||
true, &error);
|
||||
if (!ret)
|
||||
MPD_ERROR("error parsing line %i: %s",
|
||||
|
Reference in New Issue
Block a user