Mac OS X Terminal - While True Do - Can you stop automatically under desired conditions?
You can stop the execution by entering the command break.

To make a sound, tput bel should work on most shells.

Something like the following example should work:

while true
do
     commands...

     if [[ "$YOUR_VARIABLE" == "value" ]]
     then
         tput bel
         break
     fi
done