/*
 * Espressif Modified MIT License
 *
 * Copyright (c) 2025 Espressif Systems (Shanghai) Co., LTD
 *
 * Permission is hereby granted for use **exclusively** with Espressif Systems products.
 * This includes the right to use, copy, modify, merge, publish, distribute, and sublicense
 * the Software, subject to the following conditions:
 *
 * 1. This Software **must be used in conjunction with Espressif Systems products**.
 * 2. The above copyright notice and this permission notice shall be included in all copies
 *    or substantial portions of the Software.
 * 3. Redistribution of the Software in source or binary form **for use with non-Espressif products**
 *    is strictly prohibited.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
 * FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 * SPDX-License-Identifier: MIT-ESPRESSIF
 */

 #pragma once

typedef struct audio_player_s    *audio_player_handle_t;
typedef struct audio_recorder_s  *audio_recorder_handle_t;

audio_recorder_handle_t recorder_pipeline_open();
esp_err_t recorder_pipeline_run(audio_recorder_handle_t recorder);
esp_err_t recorder_pipeline_read(audio_recorder_handle_t recorder, char *buffer, int  len);
esp_err_t recorder_pipeline_stop(audio_recorder_handle_t recorder);
esp_err_t recorder_pipeline_close(audio_recorder_handle_t recorder);


audio_player_handle_t player_pipeline_open();
esp_err_t player_pipeline_run(audio_player_handle_t player);
esp_err_t player_pipeline_stop(audio_player_handle_t player);
esp_err_t player_pipeline_write(audio_player_handle_t player, char *buffer, int  len);
esp_err_t player_pipeline_close(audio_player_handle_t player);
