diff --git a/include/pcm.h b/include/pcm.h index 2c7dce9b..f3618c3d 100644 --- a/include/pcm.h +++ b/include/pcm.h @@ -1020,7 +1020,8 @@ snd_pcm_uframes_t snd_pcm_meter_get_boundary(snd_pcm_t *pcm); int snd_pcm_meter_add_scope(snd_pcm_t *pcm, snd_pcm_scope_t *scope); snd_pcm_scope_t *snd_pcm_meter_search_scope(snd_pcm_t *pcm, const char *name); int snd_pcm_scope_malloc(snd_pcm_scope_t **ptr); -void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope, snd_pcm_scope_ops_t *val); +void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope, + const snd_pcm_scope_ops_t *val); void snd_pcm_scope_set_name(snd_pcm_scope_t *scope, const char *val); const char *snd_pcm_scope_get_name(snd_pcm_scope_t *scope); void *snd_pcm_scope_get_callback_private(snd_pcm_scope_t *scope); diff --git a/src/pcm/pcm_meter.c b/src/pcm/pcm_meter.c index 0357921b..5acc7bc8 100644 --- a/src/pcm/pcm_meter.c +++ b/src/pcm/pcm_meter.c @@ -46,7 +46,7 @@ const char *_snd_module_pcm_meter = ""; struct _snd_pcm_scope { int enabled; char *name; - snd_pcm_scope_ops_t *ops; + const snd_pcm_scope_ops_t *ops; void *private_data; struct list_head list; }; @@ -960,7 +960,7 @@ const char *snd_pcm_scope_get_name(snd_pcm_scope_t *scope) * \param scope PCM meter scope * \param val callbacks */ -void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope, snd_pcm_scope_ops_t *val) +void snd_pcm_scope_set_ops(snd_pcm_scope_t *scope, const snd_pcm_scope_ops_t *val) { scope->ops = val; }