From: Steve B. <sb...@us...> - 2001-11-29 20:43:51
|
Update of /cvsroot/gstreamer/gstreamer/plugins/synthesis/sinesrc In directory usw-pr-cvs1:/tmp/cvs-serv13449 Modified Files: gstsinesrc.c Log Message: start for exposing dparams as args Index: gstsinesrc.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/plugins/synthesis/sinesrc/gstsinesrc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gstsinesrc.c 2001/10/14 19:14:58 1.3 +++ gstsinesrc.c 2001/11/29 20:43:48 1.4 @@ -51,6 +51,8 @@ ARG_SAMPLERATE, ARG_TABLESIZE, ARG_BUFFER_SIZE, + ARG_FREQ, + ARG_VOLUME, }; // FIXME: this is not core business... @@ -129,17 +131,23 @@ g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_FORMAT, g_param_spec_int("format","format","format", - G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME + G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SAMPLERATE, g_param_spec_int("samplerate","samplerate","samplerate", - G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME + G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_TABLESIZE, g_param_spec_int("tablesize","tablesize","tablesize", - G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME + G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_BUFFER_SIZE, g_param_spec_int("buffersize","buffersize","buffersize", 0, G_MAXINT, 1024, G_PARAM_READWRITE)); - + g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_FREQ, + g_param_spec_float("freq","freq","freq", + 0.0, 20000.0, 440.0, G_PARAM_READWRITE)); + g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_FREQ, + g_param_spec_float("volume","volume","volume", + 0.0, 1.0, 0.8, G_PARAM_READWRITE)); + gobject_class->set_property = gst_sinesrc_set_property; gobject_class->get_property = gst_sinesrc_get_property; @@ -292,6 +300,12 @@ case ARG_BUFFER_SIZE: src->buffer_size = g_value_get_int (value); break; + case ARG_FREQ: + //gst_dpman_handle_set_prop(src->dpman, "freq", value); + break; + case ARG_VOLUME: + //gst_dpman_handle_set_prop(src->dpman, "volume", value); + break; default: break; } @@ -319,6 +333,12 @@ case ARG_BUFFER_SIZE: g_value_set_int (value, src->buffer_size); break; + case ARG_FREQ: + g_value_set_float (value, src->freq); + break; + case ARG_VOLUME: + g_value_set_float (value, src->volume); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; |