Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
981 Views

de2_115 audio core

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; 

 

 

 

 

Tags (1)
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
10 Views

What does "dirty" mean?

Altera_Forum
Honored Contributor I
10 Views

sizzle.I solved it.Due to frequency sizzle doing

Altera_Forum
Honored Contributor I
10 Views

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