Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises

de2_115 audio core

Altera_Forum
Honored Contributor II
1,826 Views

hi dear members, 

i make a simple project on DE2_115 board.It record sound and play it.But sound is very dirty.my c code is : 

#include 

<stdio.h> 

 

int 

i=0; 

 

#include 

"altera_up_avalon_audio.h" 

 

int 

main(void

 

 

alt_up_audio_dev * audio_dev; 

 

/* used for audio record/playback */ 

 

unsigned 

int l_buf; 

 

unsigned 

int r_buf; 

 

// open the Audio port 

 

audio_dev = alt_up_audio_open_dev ( 

"/dev/audio"); 

 

if 

( audio_dev == null

 

printf( 

"Error: could not open audio device \n"); 

 

else 

 

printf ( 

"Opened audio device \n"); 

 

/* read and echo audio data */ 

 

 

 

 

// read audio buffer 

 

alt_up_audio_read_fifo (audio_dev, &(r_buf), 1, ALT_UP_AUDIO_RIGHT); 

 

alt_up_audio_read_fifo (audio_dev, &(l_buf), 1, ALT_UP_AUDIO_LEFT); 

 

 

// write audio buffer 

 

alt_up_audio_write_fifo (audio_dev, &(r_buf), 1, ALT_UP_AUDIO_RIGHT); 

 

alt_up_audio_write_fifo (audio_dev, &(l_buf), 1, ALT_UP_AUDIO_LEFT); 

 

 

&#12288; 

 

 

 

 

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
855 Views

What does "dirty" mean?

0 Kudos
Altera_Forum
Honored Contributor II
855 Views

sizzle.I solved it.Due to frequency sizzle doing

0 Kudos
Altera_Forum
Honored Contributor II
855 Views

I have the same issue. How did you fix it?

0 Kudos
Reply