diff options
Diffstat (limited to 'plugin/unicens-output/wrap_volume.c')
-rw-r--r-- | plugin/unicens-output/wrap_volume.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugin/unicens-output/wrap_volume.c b/plugin/unicens-output/wrap_volume.c index 9c3d7a1..3029a5a 100644 --- a/plugin/unicens-output/wrap_volume.c +++ b/plugin/unicens-output/wrap_volume.c @@ -47,7 +47,7 @@ static int wrap_volume_service_timeout_cb(sd_event_source* source, sd_event_source_unref(source); if((ret = lib_most_volume_service())) - AFB_ApiError(unicensHalApiHandle, "lib_most_volume_service returns %d", ret); + AFB_API_ERROR(unicensHalApiHandle, "lib_most_volume_service returns %d", ret); return 0; } @@ -56,9 +56,9 @@ static void wrap_volume_service_cb(uint16_t timeout) { uint64_t usec; - sd_event_now(AFB_GetEventLoop(unicensHalApiHandle), CLOCK_BOOTTIME, &usec); + sd_event_now(afb_api_get_event_loop(unicensHalApiHandle), CLOCK_BOOTTIME, &usec); - sd_event_add_time(AFB_GetEventLoop(unicensHalApiHandle), + sd_event_add_time(afb_api_get_event_loop(unicensHalApiHandle), NULL, CLOCK_MONOTONIC, usec + (timeout*1000), @@ -95,19 +95,19 @@ extern int wrap_volume_init(void) return -ret; } -extern int wrap_volume_master(AFB_ApiT apiHandle, int volume) +extern int wrap_volume_master(afb_api_t apiHandle, int volume) { int ret; if((ret = lib_most_volume_set(LIB_MOST_VOLUME_MASTER, (uint8_t) wrap_volume_calculate(volume, 100, 255)))) { - AFB_ApiError(apiHandle, "%s: volume library not ready.", __func__); + AFB_API_ERROR(apiHandle, "%s: volume library not ready.", __func__); } return -ret; } -extern int wrap_volume_pcm(AFB_ApiT apiHandle, int *volume_ptr, int volume_sz) +extern int wrap_volume_pcm(afb_api_t apiHandle, int *volume_ptr, int volume_sz) { int cnt, new_value, ret = 0; @@ -118,7 +118,7 @@ extern int wrap_volume_pcm(AFB_ApiT apiHandle, int *volume_ptr, int volume_sz) new_value = wrap_volume_calculate(volume_ptr[cnt], 100, 255); if((ret = lib_most_volume_set((enum lib_most_volume_channel_t) cnt, (uint8_t) new_value))) { - AFB_ApiError(apiHandle, "%s: volume library not ready.", __func__); + AFB_API_ERROR(apiHandle, "%s: volume library not ready.", __func__); break; } } @@ -126,12 +126,12 @@ extern int wrap_volume_pcm(AFB_ApiT apiHandle, int *volume_ptr, int volume_sz) return -ret; } -extern int wrap_volume_node_avail(AFB_ApiT apiHandle, int node, int available) +extern int wrap_volume_node_avail(afb_api_t apiHandle, int node, int available) { int ret; if((ret = lib_most_volume_node_available((uint16_t) node, (uint8_t) available))) - AFB_ApiError(apiHandle, "%s: volume library not ready.", __func__); + AFB_API_ERROR(apiHandle, "%s: volume library not ready.", __func__); return -ret; } |