Int16 aic3204_tone_headphone( )中
{
/* Pre-generated sine wave data, 16-bit signed samples */
Int16 sinetable[48] = {
0x0000, 0x10b4, 0x2120, 0x30fb, 0x3fff, 0x4dea, 0x5a81, 0x658b,
0x6ed8, 0x763f, 0x7ba1, 0x7ee5, 0x7ffd, 0x7ee5, 0x7ba1, 0x76ef,
0x6ed8, 0x658b, 0x5a81, 0x4dea, 0x3fff, 0x30fb, 0x2120, 0x10b4,
0x0000, 0xef4c, 0xdee0, 0xcf06, 0xc002, 0xb216, 0xa57f, 0x9a75,
0x9128, 0x89c1, 0x845f, 0x811b, 0x8002, 0x811b, 0x845f, 0x89c1,
0x9128, 0x9a76, 0xa57f, 0xb216, 0xc002, 0xcf06, 0xdee0, 0xef4c
};
/* Play Tone for 5 seconds*/
for ( sec = 0 ; sec < 5 ; sec++ )
{
for ( msec = 0 ; msec < 1000 ; msec++ )
{
for ( sample = 0 ; sample < 48 ; sample++ )
{
/* Write 16-bit left channel Data */
EZDSP5535_I2S_writeLeft(sinetable[sample]);
/* Write 16-bit right channel Data */
EZDSP5535_I2S_writeRight(sinetable[sample]);
}
}
printf("write text 1.\n");
}
}
运行时从耳机中听不到声音
Shine:
关于aic3204的配置建议去音频论坛问问。