diff command.c @ 23396:8412921b363c

Add PRINT to the samplerate property.
author albeu
date Wed, 30 May 2007 06:53:06 +0000
parents d4e8613ddc95
children 07741c30e64c
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);
 }