From 39384e722d9fd7d162012b682aed41b35d16d003 Mon Sep 17 00:00:00 2001 From: fulup Date: Sun, 30 Jul 2017 21:36:54 +0200 Subject: Fix HTML5 demo with Volume Ramping --- HAL-afb/HAL-interface/hal-interface.c | 3 +- htdocs/alsa-hal.html | 6 ++ nbproject/configurations.xml | 111 ++++++++++++++-------------------- 3 files changed, 53 insertions(+), 67 deletions(-) diff --git a/HAL-afb/HAL-interface/hal-interface.c b/HAL-afb/HAL-interface/hal-interface.c index 76cdbd8..cba10d7 100644 --- a/HAL-afb/HAL-interface/hal-interface.c +++ b/HAL-afb/HAL-interface/hal-interface.c @@ -39,6 +39,7 @@ STATIC const char *halCtlsLabels[] = { [Vol_Ramp_Set_Delay] = "Volume_Ramp_Delay", [Vol_Ramp_Set_Down] = "Volume_Ramp_Down", [Vol_Ramp_Set_Up] = "Volume_Ramp_Up", + [Vol_Ramp_Set_Slave] = "Volume_Ramp_Slave", [EndHalCrlTag] = NULL }; @@ -70,7 +71,7 @@ STATIC int halCtlStringToIndex (const char* label) { alsaHalMapT *halCtls= halSndCard->ctls; for (int idx = 0; halCtls[idx].tag != EndHalCrlTag; idx++) { - if (!strcmp (halCtls[idx].label, label)) return idx; + if (halCtls[idx].label && !strcmp (halCtls[idx].label, label)) return idx; } // not found diff --git a/htdocs/alsa-hal.html b/htdocs/alsa-hal.html index 7377bd4..f1d5aaf 100644 --- a/htdocs/alsa-hal.html +++ b/htdocs/alsa-hal.html @@ -37,6 +37,12 @@

  • + +
  • + + +
  • +