audio/out: rip out old unused app/softvolume reporting

This was all dead code. Commit 995c47da9a (over 3 years ago) removed all
uses of the controls.

It would be nice if AOs could apply a linear gain volume, that only
affects the AO's audio stream for low-latency volume adjust and muting.
AOCONTROL_HAS_SOFT_VOLUME was supposed to signal this, but to use it,
we'd have to thoroughly check whether it really uses the expected
semantics, so there's really nothing useful left in this old code.
This commit is contained in:
wm4 2019-10-11 21:05:11 +02:00
parent d908fbd584
commit cde94e83a9
7 changed files with 0 additions and 21 deletions

View File

@ -35,10 +35,6 @@ enum aocontrol {
AOCONTROL_SET_MUTE,
// Has char* as argument, which contains the desired stream title.
AOCONTROL_UPDATE_STREAM_TITLE,
// the AO does the equivalent of af_volume (return CONTROL_TRUE if yes)
AOCONTROL_HAS_SOFT_VOLUME,
// like above, but volume persists (per app), mpv won't restore volume
AOCONTROL_HAS_PER_APP_VOLUME,
};
// If set, then the queued audio data is the last. Note that after a while, new

View File

@ -117,8 +117,6 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return get_volume(ao, arg);
case AOCONTROL_SET_VOLUME:
return set_volume(ao, arg);
case AOCONTROL_HAS_SOFT_VOLUME:
return CONTROL_TRUE;
}
return CONTROL_UNKNOWN;
}

View File

@ -93,8 +93,6 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return CONTROL_TRUE;
}
case AOCONTROL_HAS_SOFT_VOLUME:
return CONTROL_TRUE;
}
return CONTROL_UNKNOWN;
}

View File

@ -204,10 +204,6 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
}
return CONTROL_ERROR;
}
#ifdef SNDCTL_DSP_GETPLAYVOL
case AOCONTROL_HAS_SOFT_VOLUME:
return CONTROL_TRUE;
#endif
}
return CONTROL_UNKNOWN;
}

View File

@ -749,9 +749,6 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return CONTROL_OK;
}
case AOCONTROL_HAS_PER_APP_VOLUME:
return CONTROL_TRUE;
case AOCONTROL_UPDATE_STREAM_TITLE: {
char *title = (char *)arg;
pa_threaded_mainloop_lock(priv->mainloop);

View File

@ -61,8 +61,6 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return CONTROL_FALSE;
sio_setvol(p->hdl, vol->left * SIO_MAXVOL / 100);
break;
case AOCONTROL_HAS_SOFT_VOLUME:
return CONTROL_TRUE;
default:
return CONTROL_UNKNOWN;
}

View File

@ -340,8 +340,6 @@ static int thread_control_exclusive(struct ao *ao, enum aocontrol cmd, void *arg
if (!(state->vol_hw_support & ENDPOINT_HARDWARE_SUPPORT_MUTE))
return CONTROL_FALSE;
break;
case AOCONTROL_HAS_PER_APP_VOLUME:
return CONTROL_FALSE;
}
float volume;
@ -400,8 +398,6 @@ static int thread_control_shared(struct ao *ao, enum aocontrol cmd, void *arg)
mute = *(bool *)arg;
ISimpleAudioVolume_SetMute(state->pAudioVolume, mute, NULL);
return CONTROL_OK;
case AOCONTROL_HAS_PER_APP_VOLUME:
return CONTROL_TRUE;
}
return CONTROL_UNKNOWN;
}