mirror of
https://github.com/mpv-player/mpv
synced 2025-01-29 03:02:53 +00:00
Add PRINT to the samplerate property.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23414 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a3a73031d5
commit
4918b7bb5b
@ -499,6 +499,13 @@ static int mp_property_samplerate(m_option_t * prop, int action, void *arg,
|
||||
{
|
||||
if (!mpctx->sh_audio)
|
||||
return M_PROPERTY_UNAVAILABLE;
|
||||
switch(action) {
|
||||
case M_PROPERTY_PRINT:
|
||||
if(!arg) return M_PROPERTY_ERROR;
|
||||
*(char**)arg = malloc(16);
|
||||
sprintf(*(char**)arg,"%d kHz",mpctx->sh_audio->samplerate/1000);
|
||||
return M_PROPERTY_OK;
|
||||
}
|
||||
return m_property_int_ro(prop, action, arg, mpctx->sh_audio->samplerate);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user