提示音工程使用说明

1. 提示音打包脚本使用

2. playback.dat头部格式说明

3. oss/lib/resample.h接口调用示例

void sound_init(void);

int8_t sound_action(uint16_t id, uint32_t SampleRate, uint32_t BitsPerSample, uint32_t Channels, uint32_t frame_byte_length, uint8_t option);
void user_init(void){
	denoise_init();
	power_control_init();
	i2c_init();
	key_init();
	led_init();
	sound_init();
}
void deal_key(void)
{
    uint8_t key_value = 0;
    key_value = key_scan();
    if (key_value == KEY_NULL)
    {
        return;
    }
    debug("key_value = %d\r\n", key_value);
    switch (key_value)
    {
        case KEY_UP:
            (void)sound_action(1, 16000, 16, 1, 256 << 1, ENABLE);
            break;

        case KEY_DOWN:
            (void)sound_action(2, 16000, 16, 1, 256 << 1, ENABLE);
            break;

        case KEY_LEFT:
            (void)sound_action(3, 16000, 16, 1, 256 << 1, ENABLE);
            break;

        case KEY_RIGHT:
            (void)sound_action(4, 16000, 16, 1, 256 << 1, ENABLE);
            break;

        case KEY_OK:
            (void)sound_action(5, 16000, 16, 1, 256 << 1, ENABLE);
            break;
    }
}