/** * * Main function for audio playback * * Parameters: * * @return int */ int main(void) { int status = -1; /* Blackfin setup function to configure processor */ status = blackfin_setup(); //returns 0 if successful and -1 if failed if (status) { printf("\r\n Blackfin Setup Failed"); return -1; } /* FPGA setup function to configure FPGA, make sure the FPGA configuration binary data is loaded in to SDRAM at "FPGA_DATA_START_ADDR" */ status = fpga_setup(); //returns 0 if successful and -1 if failed if (status) { printf("\r\n FPGA Setup Failed"); return -1; } printf("[MAIN]: Starting Audio Player\n"); audioPlayer_init(&audioPlayer); audioPlayer_start(&audioPlayer); audioPlayer_run(&audioPlayer); }
static void audioPlayer_task( void *pThis ){ // insert code for outputting samples to FIFO Q here. // make sure to check if there is space in the FIFO before writing to it. // after setting an writing an sample, write the packet length of 1 as well // AXI Streaming FIFO expects packet information // // Audio samples are stored in: snd_samples[] as 16 bit mono audioPlayer_init(pThis); while (1) txData(snd_samples, snd_samples_nSamples); }