diff --git a/src/decoder/plugins/AudiofileDecoderPlugin.cxx b/src/decoder/plugins/AudiofileDecoderPlugin.cxx index 1bda4faa9..eff898c3b 100644 --- a/src/decoder/plugins/AudiofileDecoderPlugin.cxx +++ b/src/decoder/plugins/AudiofileDecoderPlugin.cxx @@ -129,7 +129,7 @@ audiofile_file_seek(AFvirtualfile *vfile, AFfileoffset _offset, static AFvirtualfile * setup_virtual_fops(AudioFileInputStream &afis) noexcept { - AFvirtualfile *vf = (AFvirtualfile *)malloc(sizeof(*vf)); + auto vf = (AFvirtualfile *)malloc(sizeof(AFvirtualfile)); vf->closure = &afis; vf->write = nullptr; vf->read = audiofile_file_read; diff --git a/src/mixer/plugins/PulseMixerPlugin.cxx b/src/mixer/plugins/PulseMixerPlugin.cxx index d4d2d3767..9aa53f107 100644 --- a/src/mixer/plugins/PulseMixerPlugin.cxx +++ b/src/mixer/plugins/PulseMixerPlugin.cxx @@ -214,7 +214,7 @@ PulseMixer::GetVolume() int PulseMixer::GetVolumeInternal() { - pa_volume_t max_pa_volume = pa_volume_t(volume_scale_factor * PA_VOLUME_NORM); + auto max_pa_volume = pa_volume_t(volume_scale_factor * PA_VOLUME_NORM); return online ? (int)((100 * (pa_cvolume_avg(&volume) + 1)) / max_pa_volume) : -1; @@ -228,7 +228,7 @@ PulseMixer::SetVolume(unsigned new_volume) if (!online) throw std::runtime_error("disconnected"); - pa_volume_t max_pa_volume = pa_volume_t(volume_scale_factor * PA_VOLUME_NORM); + auto max_pa_volume = pa_volume_t(volume_scale_factor * PA_VOLUME_NORM); struct pa_cvolume cvolume; pa_cvolume_set(&cvolume, volume.channels,