LibDriver WM8978
Loading...
Searching...
No Matches
wav_player.h File Reference

wav player header file More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for wav_player.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  wav_header_s
 wav header structure definition More...
struct  wav_handle_s
 wav handle structure definition More...

Macros

#define WAV_BUFFER_SIZE   (1024 * 32)
 wav buffer size definition
#define WAV_LINK_INIT(HANDLE, STRUCTURE)
 initialize wav_handle_t structure
#define WAV_LINK_AUDIO_INIT(HANDLE, FUC)
 link audio_init function
#define WAV_LINK_AUDIO_DEINIT(HANDLE, FUC)
 link audio_deinit function
#define WAV_LINK_AUDIO_READ(HANDLE, FUC)
 link audio_read function
#define WAV_LINK_AUDIO_WRITE(HANDLE, FUC)
 link audio_write function
#define WAV_LINK_IIS_INIT(HANDLE, FUC)
 link iis_init function
#define WAV_LINK_IIS_DEINIT(HANDLE, FUC)
 link iis_deinit function
#define WAV_LINK_IIS_STOP(HANDLE, FUC)
 link iis_stop function
#define WAV_LINK_IIS_PAUSE(HANDLE, FUC)
 link iis_pause function
#define WAV_LINK_IIS_RESUME(HANDLE, FUC)
 link iis_resume function
#define WAV_LINK_IIS_SET_FREQ(HANDLE, FUC)
 link iis_set_freq function
#define WAV_LINK_IIS_WRITE(HANDLE, FUC)
 link iis_write function
#define WAV_LINK_IIS_READ(HANDLE, FUC)
 link iis_read function
#define WAV_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define WAV_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function

Typedefs

typedef struct wav_header_s wav_header_t
 wav header structure definition
typedef struct wav_handle_s wav_handle_t
 wav handle structure definition

Enumerations

enum  wav_status_t { WAV_STATUS_STOP = 0x00 , WAV_STATUS_PLAY = 0x01 }
 wav status enumeration definition More...

Functions

uint8_t wav_init (wav_handle_t *handle)
 initialize the wav
uint8_t wav_deinit (wav_handle_t *handle)
 wav deinit
uint8_t wav_player_init (wav_handle_t *handle, char *path)
 initialize the wav player
uint8_t wav_player_buffer_fill (wav_handle_t *handle, uint8_t index)
 wav player buffer fill
uint8_t wav_record_file_fill (wav_handle_t *handle, uint8_t index)
 wav record file fill
uint8_t wav_player_get_status (wav_handle_t *handle, wav_status_t *status)
 wav get status
uint8_t wav_player_config (wav_handle_t *handle, uint32_t standard, uint32_t mode, uint32_t polarity, uint32_t format, uint32_t enable, uint32_t freq)
 wav player config
uint8_t wav_record_start (wav_handle_t *handle, uint32_t sample_rate, char *path)
 wav record start
uint8_t wav_record_stop (wav_handle_t *handle)
 wav record stop
uint8_t wav_player_start (wav_handle_t *handle)
 wav player start
uint8_t wav_player_stop (wav_handle_t *handle)
 wav player stop
uint8_t wav_player_pause (wav_handle_t *handle)
 wav player pause
uint8_t wav_player_resume (wav_handle_t *handle)
 wav player resume

Detailed Description

wav player header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.

Version
1.0.0
Author
Shifeng Li
Date
2023-07-31

history

Date Version Author Description
2023/07/31 1.0 Shifeng Li first upload

Definition in file wav_player.h.