Files
luban-lite-t3e-pro/bsp/examples_bare/test-audio/sound.h
刘可亮 aaa66c7b20 V1.0.1
2023-11-09 20:19:51 +08:00

24 lines
756 B
C

#ifndef __SOUND_H__
#define __SOUND_H__
#include <stdio.h>
struct wav_header
{
char riff_id[4]; /* "RIFF" */
int riff_datasize;
char riff_type[4]; /* "WAVE" */
char fmt_id[4]; /* "fmt " */
int fmt_datasize; /* fmt chunk data size,16 for pcm */
short fmt_compression_code; /* 1 for PCM */
short fmt_channels; /* 1(mono) or 2(stereo) */
int fmt_sample_rate; /* samples per second */
int fmt_avg_bytes_per_sec;
short fmt_block_align;
short fmt_bit_per_sample; /* bits of each sample(8,16,32). */
char data_id[4]; /* "data" */
int data_datasize; /* data chunk size,pcm_size - 44 */
};
#endif