mirror of
https://review.haiku-os.org/haiku
synced 2025-01-20 13:31:28 +01:00
media-add-ons/mixer: Fix -Werror=class-memaccess
Fix -Werror=class-memaccess, pointed by gcc8. * AudioMixer.cpp: replace memset() with media_format.Clear(). * MixerAddOn.cpp: remove unneed memset(), since constractor of media_format already runs memset(). Change-Id: Idfb68c4d3190aeed725d905e46b0f85354962bc9 Reviewed-on: https://review.haiku-os.org/c/1112 Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
This commit is contained in:
parent
9cd8943940
commit
5b88998b2d
@ -275,7 +275,7 @@ AudioMixer::GetNextInput(int32 *cookie, media_input *out_input)
|
||||
out_input->source = media_source::null;
|
||||
out_input->destination.port = ControlPort();
|
||||
out_input->destination.id = 0;
|
||||
memset(&out_input->format, 0, sizeof(out_input->format));
|
||||
out_input->format.Clear();
|
||||
out_input->format.type = B_MEDIA_RAW_AUDIO;
|
||||
strcpy(out_input->name, "Free Input");
|
||||
*cookie += 1;
|
||||
@ -532,7 +532,7 @@ AudioMixer::FormatSuggestionRequested(media_type type, int32 quality,
|
||||
return B_MEDIA_BAD_FORMAT;
|
||||
|
||||
// we can produce any (wildcard) raw audio format
|
||||
memset(format, 0, sizeof(*format));
|
||||
format->Clear();
|
||||
format->type = B_MEDIA_RAW_AUDIO;
|
||||
return B_OK;
|
||||
}
|
||||
@ -686,7 +686,7 @@ AudioMixer::GetNextOutput(int32 *cookie, media_output *out_output)
|
||||
out_output->source.port = ControlPort();
|
||||
out_output->source.id = 0;
|
||||
out_output->destination = media_destination::null;
|
||||
memset(&out_output->format, 0, sizeof(out_output->format));
|
||||
out_output->format.Clear();
|
||||
out_output->format.type = B_MEDIA_RAW_AUDIO;
|
||||
strcpy(out_output->name, "Mixer Output");
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ AudioMixerAddon::AudioMixerAddon(image_id image)
|
||||
fFormat(new media_format),
|
||||
fInfo(new flavor_info)
|
||||
{
|
||||
memset(fFormat, 0, sizeof(*fFormat));
|
||||
fFormat->type = B_MEDIA_RAW_AUDIO;
|
||||
fFormat->u.raw_audio = media_raw_audio_format::wildcard;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user