Freeze on playback of Audacity 2.0.1 on Gentoo

I asked this question on the Gentoo forums, but so far nobody there has any answers, so I’m hoping for some insight here.

Audacity launches fine from either the menu or the command line, and all functions seem to work fine – except playback. I can edit the waveform, apply effects, zoom in, zoom out, and so on. However, the moment I try to play back, Audacity freezes. I have to close the window, it never comes back. When I do close the window I get a message that it is not responding, do I really want to force close it? When I open it back up I get a message requesting that I “recover” the project I had been working on, and that always seems to work fine.

When I start from the command line, these are the error messages I get right at launch:

~ $ audacity
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875

Once I hit “Play” these lines are added, along with a freeze up of Audacity (and the menu bar vanishes as well):

Expression 'paTimedOut' failed in 'src/os/unix/pa_unix_util.c', line: 387
Expression 'PaUnixThread_New( &stream->thread, &CallbackThreadFunc, stream, 1., stream->rtSched )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2263
Expression 'pthread_join( self->thread, &pret )' failed in 'src/os/unix/pa_unix_util.c', line: 441

I last used Audacity with no trouble less than a month ago (June 17) and it worked fine then. I’ve done some system updates, but nothign too extensive, and nothing focusing on Audacity.

I’ve tried using all the available “devices” in Preferences->Devices:
default
dmix
spdif
iec958
sysdefault
HDA ATI SM: ALC892 (hw:0,1)

Every single one responds the same way.

All other sound works fine on my system, set up with plain ALSA. I checked with alsaplayer and it plays sound files with no trouble.

Those are not “Errors”. They are just “information” from the system as Audacity searches for available sound systems.

Am I right in thinking that you do not have PulseAudio installed?

Please select “Audio Device Info” from the Audacity Help menu and post the contents.

Correct, no PulseAudio. I’ve been avoiding it, and hope not to have to deal with it, although I will if I have to.

I hadn’t noticed the devices section of the help menu before. Here it is.

==============================
Default capture device number: 6
Default playback device number: 6
==============================
Device ID: 0
Device name: HDA ATI SB: ALC892 Analog (hw:0,0)
Host name: ALSA
Input channels: 2
Output channels: 0
Low Input Latency: 0.011610
Low Output Latency: -1.000000
High Input Latency: 0.046440
High Output Latency: -1.000000
Supported Rates:
==============================
Device ID: 1
Device name: HDA ATI SB: ALC892 Digital (hw:0,1)
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Device ID: 2
Device name: HDA ATI SB: ALC892 Analog (hw:0,2)
Host name: ALSA
Input channels: 2
Output channels: 0
Low Input Latency: 0.011610
Low Output Latency: -1.000000
High Input Latency: 0.046440
High Output Latency: -1.000000
Supported Rates:
==============================
Device ID: 3
Device name: sysdefault
Host name: ALSA
Input channels: 128
Output channels: 128
Low Input Latency: 0.042653
Low Output Latency: 0.042653
High Input Latency: 0.046440
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    16000
    22050
    32000
    44100
    48000
    88200
==============================
Device ID: 4
Device name: iec958
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Device ID: 5
Device name: spdif
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Device ID: 6
Device name: default
Host name: ALSA
Input channels: 128
Output channels: 128
Low Input Latency: 0.042653
Low Output Latency: 0.042653
High Input Latency: 0.046440
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    16000
    22050
    32000
    44100
    48000
    88200
==============================
Device ID: 7
Device name: dmix
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.042667
High Input Latency: -1.000000
High Output Latency: 0.042667
Supported Rates:
    48000
==============================
Selected capture device: 6 - default
Selected playback device: 6 - default
Supported Rates:
    8000
    9600
    11025
    16000
    22050
    32000
    44100
    48000
    88200
==============================
Available mixers:
==============================
Available capture sources:
0 - Rear Mic:0
1 - Front Mic:0
2 - Line:0
3 - Rear Mic:1
4 - Front Mic:1
5 - Line:1
==============================
Available playback volumes:
0 - Master:0
1 - Headphone:0
2 - PCM:0
3 - Front:0
4 - Front Mic:0
5 - Front Mic Boost:0
6 - Surround:0
7 - Center:0
8 - LFE:0
9 - Side:0
10 - Line:0
11 - Rear Mic:0
12 - Rear Mic Boost:0
==============================
Capture volume is native
Playback volume is native

Log out and back in again. Avoid opening any programs that use audio (watch out for flash pages in your web browser).
Open Audacity and try setting the output device to either “default” or “sysdefault”.
Generate a tone (Generate menu) - unless you have changed other preference settings this should be 440 Hz, mono, 32-bit float, 44100 Hz.
Cross your fingers and press Play.

Thanks! You sent me in the right direction. Logging out and then in didn’t do any good, but a complete reboot did the trick. I’m guessing that something hadn’t relinquished the audio device?