ao_opensles: remove useless cfg_sample_rate

We should always use the ao-neutral --audio-samplerate option.
This commit is contained in:
Tom Yan 2018-03-13 03:30:54 +08:00 committed by Jan Ekström
parent 14b429de8d
commit e3b3e28deb
2 changed files with 1 additions and 5 deletions

View File

@ -20,6 +20,7 @@ Interface changes
::
--- mpv 0.29.0 ---
- drop --opensles-sample-rate, as --audio-samplerate should be used if desired
- drop deprecated --videotoolbox-format, --ff-aid, --ff-vid, --ff-sid,
--ad-spdif-dtshd, --softvol options
- fix --external-files: strictly never select any tracks from them, unless

View File

@ -41,7 +41,6 @@ struct priv {
double audio_latency;
int cfg_frames_per_buffer;
int cfg_sample_rate;
};
static const int fmtmap[][2] = {
@ -153,9 +152,6 @@ static int init(struct ao *ao)
pcm.channelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT;
pcm.endianness = SL_BYTEORDER_LITTLEENDIAN;
if (p->cfg_sample_rate)
ao->samplerate = p->cfg_sample_rate;
// samplesPerSec is misnamed, actually it's samples per ms
pcm.samplesPerSec = ao->samplerate * 1000;
@ -254,7 +250,6 @@ const struct ao_driver audio_out_opensles = {
.priv_size = sizeof(struct priv),
.options = (const struct m_option[]) {
OPT_INTRANGE("frames-per-buffer", cfg_frames_per_buffer, 0, 1, 10000),
OPT_INTRANGE("sample-rate", cfg_sample_rate, 0, 1000, 100000),
{0}
},
.options_prefix = "opensles",