Can't Recrod After Using Audacty

I am running Ubuntu 12.04 LTS and Audcaity 2.0.0. Before I run Audacity, the ‘arecord’ and ‘aplay’ commands work fine. After that, I can’t record. I can use ‘arecord’ to create a file, but it is always a blank file. I have to restart Ubuntu to be able to record.

How are you selecting the recording source for arecord?

Do you have more than one audio device? (for example an external sound card, USB tape player, web cam, …?)

Hi Steve:
I am new to this, so please bear with me. I have only one input device. it is the “line” input on my computer. I have that connected to a Yamaha keyboard for testing. Before running Audacity, I can type “arecord test1.wav” in the terminal, and I can record from the keyboard. When I play back 'test1.wav", I hear the keyboard. Afterward, I cannot record from the Yamaha keyboard; I get an empty wav file. I checked the “Sound” settings and they were OK (or i made them OK, I cannot remember which) after I ran Audacity. But I still could not record from the keyboard after running Audcacity. I will try all this again today, but I’d aprreciate any suggestions.

Try refreshing PulseAudio before you run arecord.
Type this into a command line or terminal:

killall pulseaudio

This will cause PulseAudio to shut down. It will then restart automatically.
Then try arecord.

I did “killall pulseaudio” and it works!
Thank you.
If you don’t mind, I have another question.
I’ll post it separalety so others can see the topic heading