初级会员

- 积分
- 61
- 金钱
- 61
- 注册时间
- 2016-3-30
- 在线时间
- 16 小时
|
原子哥,大家好:
小弟想把Speex库移植到 STM32F401上,做语音压缩,输入数据是ADC采集音频数据,采样率是8K,移植Speex到STM32F401上总是进硬件中断HardFault_Handler函数里,我在论坛也看了相关大家碰到这个问题的解决方法是 将S启动文件里的 heap size 改大,改为0x00008000,但是问题依然存在,程序能够编码2次,2次以后就进入硬件中断中了!!跪求解决方法,在线等.....
我还想有经验的确定个问题,STM32F401是否可以移植Speex??? 有没有哪位做过,先谢谢大家!
/*******************************************************************************
* Function Name : Speex_Encode
* Description : SpeexòôÆμ±àÂëoˉêy
* Input : none
* Output : none
* Return : none
*******************************************************************************/
void Speex_Encode(void)
{
Speex_EncodeCount++;
//memcpy(gInTemp, EnCodeBuf, 160*2);
/* Flush all the bits in the struct so we can encode a new frame */
speex_bits_reset(&bitsEncode);
/* Encode the frame */
speex_encode_int(enc_state, (spx_int16_t*)EnCodeBuf, &bitsEncode);
/* Copy the bits to an array of char that can be decoded */
speex_bits_write(&bitsEncode, (char *)OutBytes, ENCODED_FRAME_SIZE);
//±àÂë½áêøoóêí·ÅbitsEncodeoíenc_state
speex_bits_destroy (&bitsEncode);
speex_encoder_destroy (enc_state);
}
|
|