I'm trying to understand how to insert my own events into the audio event interface system of the ADF. As far as I can tell I need to call audio_event_iface_sendout() passing in the msg to send and the event interface to send it to. I think I need to send it to the event interface of the audio pipeline. I should be able to get this by calling audio_pipeline_get_event_iface(). However, audio_pipeline_get_event_iface does not seem to be implemented. It is declared in the header but no implementation is found at link time.
Linker reports "undefined reference to `audio_pipeline_get_event_iface'"
Some code fragments that show roughly what I'm doing.
Code: Select all
ESP_ERROR_CHECK(audio_pipeline_set_listener(my_pipeline_handle, my_audio_event_interface_handle));
my_pipeline_event_interface_handle = audio_pipeline_get_event_iface(my_pipeline_handle); // Where is this???
audio_event_iface_msg_t msg =
{
.source_type = MY_CUSTOM_SOURCE,
.cmd = MY_CUSTOM_COMMAND,
.data = (void *)some_data};
ESP_ERROR_CHECK(audio_event_iface_sendout(my_pipeline_event_interface_handle, &msg));
audio_event_iface_msg_t msg;
if (ESP_OK != audio_event_iface_listen(audio_event_interface_handle, &msg, portMAX_DELAY))
{
ESP_LOGE(TAG, "Failed getting message from music queue");
}
ESP_LOGI(TAG, "Got message: %s, In state: %s", message_name(msg.cmd), state_name(music_state));