# HG changeset patch # User albeu # Date 1180507986 0 # Node ID 8412921b363c48e7235bca2c93e15c7fb2e8e38e # Parent 0ff039835f0f239a598a101cef3772f3e6dffcb3 Add PRINT to the samplerate property. diff -r 0ff039835f0f -r 8412921b363c command.c --- a/command.c Wed May 30 06:39:21 2007 +0000 +++ b/command.c Wed May 30 06:53:06 2007 +0000 @@ -499,6 +499,13 @@ { 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); }