<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="None">
  <name>Software Implementation of Audio Localization</name>
  <metadata>
  <md:version>**new**</md:version>
  <md:created>2004/12/15 10:08:05.064 US/Central</md:created>
  <md:revised>2004/12/15 15:38:48.591 US/Central</md:revised>
  <md:authorlist>
      <md:author id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>lizzardg@rice.edu</md:email>
    </md:author>
      <md:author id="joecole">
      <md:firstname>Joseph</md:firstname>
      
      <md:surname>Cole</md:surname>
      <md:email>joecole@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>lizzardg@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="joecole">
      <md:firstname>Joseph</md:firstname>
      
      <md:surname>Cole</md:surname>
      <md:email>joecole@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>beamforming</md:keyword>
    <md:keyword>C</md:keyword>
    <md:keyword>real-time</md:keyword>
    <md:keyword>software</md:keyword>
  </md:keywordlist>

  <md:abstract>In this section, we will go over the C code we used for the DSK board and the options for the signal input in testing the algorithm.</md:abstract>
</metadata>

  <content>
    <section id="s1">
      <name>Code Description</name>
      <para id="s1p1">
	Our final implementation for the DSP board is written in C,
	and consists of two major functions, the interrupt service
	routine and the main function.  The samples arrive and are put
	into a buffer for each microphone channel by the McBSP1
	receive interrupt routine.  This function keeps track of how
	full the buffers are, and sets a flag when they are full.  The
	main function waits for the buffer full flag, and processes
	the contents of the buffers when the flag is set.  The
	algorithm is the same as the signal integration method
	described in the <cnxn document="">Matlab Simulation</cnxn>
	section.  The code keeps an average of the last 128 region
	codes selected, which is the value that is output on the DSP
	board's LEDs.
      </para>
    </section>
    <section id="s2">
      <name>Signal Input Options</name>
      <para id="s2p1">
	For our signal input, we have two options:
	<list id="s2p1l1" type="enumerated">
	  <item>Ideal Signal generated in Matlab</item>
	  <item>Real signal from the microphone array.</item>
	</list>
	To thoroughly test this algorithm, we tried both options,
	starting with the ideal signal, since this would help us in
	debugging.  Later, we tried using a real signal, generated
	from a computer across the room.  Unfortunately, within this
	option lies the danger of acoustics; the answer the algorithm
	gives us will even depend on the number of people in the room!
      </para>
    </section>
  </content>
  
</document>
