Media nodes: Add missing "const" around usages of media format wildcards.

This commit is contained in:
Augustin Cavalier 2021-09-06 20:34:38 -04:00
parent 1640b4de64
commit 7ba8de3cac
5 changed files with 17 additions and 17 deletions

View File

@ -569,7 +569,7 @@ EqualizerNode::ValidateFormat(const media_format &preferred_format,
return B_MEDIA_BAD_FORMAT;
}
media_raw_audio_format &wild = media_raw_audio_format::wildcard;
const media_raw_audio_format &wild = media_raw_audio_format::wildcard;
media_raw_audio_format &f = proposed_format.u.raw_audio;
const media_raw_audio_format &pref = preferred_format.u.raw_audio;
@ -614,7 +614,7 @@ void
EqualizerNode::SetOutputFormat(media_format &format)
{
media_raw_audio_format &f = format.u.raw_audio;
media_raw_audio_format &w = media_raw_audio_format::wildcard;
const media_raw_audio_format &w = media_raw_audio_format::wildcard;
if (f.frame_rate == w.frame_rate) {
f.frame_rate = 44100.0;

View File

@ -552,7 +552,7 @@ VSTNode::ValidateFormat(const media_format &preferredFormat,
return B_MEDIA_BAD_FORMAT;
}
media_raw_audio_format &wild = media_raw_audio_format::wildcard;
const media_raw_audio_format &wild = media_raw_audio_format::wildcard;
media_raw_audio_format &f = proposedFormat.u.raw_audio;
const media_raw_audio_format &pref = preferredFormat.u.raw_audio;
@ -597,7 +597,7 @@ void
VSTNode::SetOutputFormat(media_format &format)
{
media_raw_audio_format &f = format.u.raw_audio;
media_raw_audio_format &w = media_raw_audio_format::wildcard;
const media_raw_audio_format &w = media_raw_audio_format::wildcard;
if (f.frame_rate == w.frame_rate)
f.frame_rate = 44100.0;

View File

@ -545,7 +545,7 @@ void export_raw_audio_attr(
const media_raw_audio_format& f,
ExportContext& context) {
media_raw_audio_format& w = media_raw_audio_format::wildcard;
const media_raw_audio_format& w = media_raw_audio_format::wildcard;
if(f.frame_rate != w.frame_rate)
context.writeAttr(gKey_frame_rate, f.frame_rate);
@ -587,7 +587,7 @@ void export_multi_audio_info_attr(
const media_multi_audio_info& f,
ExportContext& context) {
media_multi_audio_format& w = media_multi_audio_format::wildcard;
const media_multi_audio_format& w = media_multi_audio_format::wildcard;
if(f.channel_mask != w.channel_mask)
context.writeAttr(gKey_channel_mask, f.channel_mask);
@ -603,7 +603,7 @@ void export_video_display_info_attr(
const media_video_display_info& d,
ExportContext& context) {
media_video_display_info& w = media_video_display_info::wildcard;
const media_video_display_info& w = media_video_display_info::wildcard;
if(d.line_width != w.line_width)
context.writeAttr(gKey_line_width, d.line_width);
@ -625,7 +625,7 @@ void export_raw_video_attr(
const media_raw_video_format& f,
ExportContext& context) {
media_raw_video_format& w = media_raw_video_format::wildcard;
const media_raw_video_format& w = media_raw_video_format::wildcard;
// attributes
if(f.field_rate != w.field_rate)
@ -743,7 +743,7 @@ void export_multistream_attr(
const media_multistream_format& f,
ExportContext& context) {
media_multistream_format& w = media_multistream_format::wildcard;
const media_multistream_format& w = media_multistream_format::wildcard;
// attributes
switch(f.format) {
@ -813,7 +813,7 @@ void export_encoded_audio_attr(
const media_encoded_audio_format& f,
ExportContext& context) {
media_encoded_audio_format& w = media_encoded_audio_format::wildcard;
const media_encoded_audio_format& w = media_encoded_audio_format::wildcard;
switch(f.encoding) {
case media_encoded_audio_format::B_ANY:
@ -848,7 +848,7 @@ void export_encoded_video_attr(
const media_encoded_video_format& f,
ExportContext& context) {
media_encoded_video_format& w = media_encoded_video_format::wildcard;
const media_encoded_video_format& w = media_encoded_video_format::wildcard;
switch(f.encoding) {
case media_encoded_video_format::B_ANY:

View File

@ -109,7 +109,7 @@ status_t _AudioAdapterNode::getPreferredInputFormat(
ASSERT(p);
media_raw_audio_format& f = ioFormat.u.raw_audio;
media_raw_audio_format& w = media_raw_audio_format::wildcard;
const media_raw_audio_format& w = media_raw_audio_format::wildcard;
// copy user preferences
if(p->inputFormat.format != w.format)
@ -182,7 +182,7 @@ status_t _AudioAdapterNode::getPreferredOutputFormat(
_AudioAdapterParams* p = dynamic_cast<_AudioAdapterParams*>(parameterSet());
ASSERT(p);
media_raw_audio_format& w = media_raw_audio_format::wildcard;
const media_raw_audio_format& w = media_raw_audio_format::wildcard;
// copy user preferences
if(p->outputFormat.format != w.format)
@ -223,7 +223,7 @@ status_t _AudioAdapterNode::validateProposedInputFormat(
status_t err = _inherited::validateProposedInputFormat(
preferredFormat, ioProposedFormat);
media_raw_audio_format& w = media_raw_audio_format::wildcard;
const media_raw_audio_format& w = media_raw_audio_format::wildcard;
if(output().destination != media_destination::null) {
@ -270,7 +270,7 @@ status_t _AudioAdapterNode::validateProposedOutputFormat(
status_t err = _inherited::validateProposedOutputFormat(
preferredFormat, ioProposedFormat);
media_raw_audio_format& w = media_raw_audio_format::wildcard;
const media_raw_audio_format& w = media_raw_audio_format::wildcard;
if(input().source != media_source::null) {

View File

@ -1143,7 +1143,7 @@ status_t FlangerNode::validateProposedFormat(
}
// wildcard format
media_raw_audio_format& wild = media_raw_audio_format::wildcard;
const media_raw_audio_format& wild = media_raw_audio_format::wildcard;
// proposed format
media_raw_audio_format& f = ioProposedFormat.u.raw_audio;
// template format
@ -1212,7 +1212,7 @@ void FlangerNode::specializeOutputFormat(
// carpal_tunnel_paranoia
media_raw_audio_format& f = ioFormat.u.raw_audio;
media_raw_audio_format& w = media_raw_audio_format::wildcard;
const media_raw_audio_format& w = media_raw_audio_format::wildcard;
if (f.frame_rate == w.frame_rate)
f.frame_rate = 44100.0;