網路城邦
上一篇 回創作列表 下一篇   字體:
[CC build] audio-tool
2021/01/27 16:54:16瀏覽49|回應0|推薦0

audio-tool is able to generate sine wave to sound card directly.

//---

get soruce code from github/audio-tool

sudo apt-get install gengetopt
make audio-tool

//---ubuntu 16
remove inline in oscillator-table.c (u12, does not do it)

/*inline*/ void write_s16_to_s8(void *out, uint16_t frame, uint8_t channels,
                       uint8_t channel, int16_t value)
{
...
}
/*inline*/ void write_s16_to_s16(void *out, uint16_t frame, uint8_t channels,
                       uint8_t channel, int16_t value)
{
...
}
/*inline*/ void write_s16_to_s24(void *out, uint16_t frame, uint8_t channels,
                       uint8_t channel, int16_t value)
{
...
}
/*inline*/ void write_s16_to_s32(void *out, uint16_t frame, uint8_t channels,
                       uint8_t channel, int16_t value)
{
...
}


//---cross compile for BBB/am335x
export CROSS_COMPILE=arm-linux-gnueabihf-
export PATH=$HOME/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH

//---test
ls /devn/snd/pcmC0D0p
./audio-tool tone sine 500 12 -D1 -d0 -t1

( 不分類不分類 )
回應 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=greatcat&aid=155710267