static void task_audio_mixer_handle_upload_ogg(void *task_data, void *user_data, const char *err) { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; if (!img) return; params.volume = 1.0f; params.type = AUDIO_MIXER_TYPE_OGG; params.state = AUDIO_STREAM_STATE_PLAYING; params.buf = img->buf; params.bufsize = img->bufsize; params.cb = NULL; audio_driver_mixer_add_stream(¶ms); free(img); free(user_data); }
static void task_audio_mixer_handle_upload_ogg(void *task_data, void *user_data, const char *err) { audio_mixer_stream_params_t params; nbio_buf_t *img = (nbio_buf_t*)task_data; if (!img) return; params.volume = 1.0f; params.type = AUDIO_MIXER_TYPE_OGG; params.state = AUDIO_STREAM_STATE_STOPPED; params.buf = img->buf; params.bufsize = img->bufsize; params.cb = NULL; params.basename = !string_is_empty(img->path) ? strdup(path_basename(img->path)) : NULL; audio_driver_mixer_add_stream(¶ms); if (params.basename != NULL) free(params.basename); free(img); free(user_data); }