changeset 23396:8412921b363c

Add PRINT to the samplerate property.
author albeu
date Wed, 30 May 2007 06:53:06 +0000
parents 0ff039835f0f
children 1d807885ce7b
files command.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }