- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am starting to using audio functions in DE1 soc. I run the media.c from Monitor Program without any problems. My doubt is that now I am going to integrate with my source code to identify isolated words and all my functions was designed to deal with double data. And in exemple, the data from audio buffer is an int:
volatile int * audio_ptr = (int *) 0xFF203040; // audio port address int fifospace, int buffer_index = 0; int left_buffer[BUF_SIZE]; int right_buffer[BUF_SIZE]; ... fifospace = *(audio_ptr + 1); // read the audio port fifospace register if ( (fifospace & 0x000000FF) > 96) // check RARC, for > 75% full { /* store data until the audio-in FIFO is empty or the memory buffer is full */ while ( (fifospace & 0x000000FF) && (buffer_index < BUF_SIZE) ) { left_buffer[buffer_index] = *(audio_ptr + 2); //Leftdata right_buffer[buffer_index] = *(audio_ptr + 3); //Rightdata ++buffer_index; fifospace = *(audio_ptr + 1); // read the audio port fifospace register } } I am not sure what I need to do to convert this data to double to integrate properly with my codeLink Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page