Contents ...
udn網路城邦
[CC build] audio-tool
2021/01/27 16:54
瀏覽67
迴響0
推薦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


限會員,要發表迴響,請先登入