Freeze when hitting the play/ pause / stop button

I recorded some mp3 files with this audio recorder http://www.noobslab.com/2014/01/record-audio-from-systemmicrophoneappli.html .
The recorder offers me just a few formats, I have chosen the .mp3 (cd quality, lossy 44khz) option. That’s all I know about the recorded files.

So whenever I want to edit and export one of those files and I hit the play button, it will play but usually I will hear a crackle very fast.
The playback-rate is set to 1 so it will take 3 minutes to play a 3 minute track. But it took audacity about 10 seconds. Well, when I hit pause or stop after playing it will freeze and won’t react untill I click the x button in the corner of the window to close the program.

However, when I select a part of that file and export it without listening to it first, it’s fine. The output is great and there is no crackle.

I am using Linux Mint 17. Any ideas how to solve this problem?

Why not record in Audacity?

As you are intending to edit the file in Audacity, it would be better to make the original recording in WAV format (44.1 kHz).
MP3 makes files smaller (compresses the files) by throwing away some of the data, which reduces the sound quality a little before you have started editing. Just as with photocopying, it is best to start with the best quality original that you can, so stay in “uncompressed” formats like WAV, then if you require MP3 format, convert to MP3 at the end of the process.

In what program are you pressing play?

I tried. I watched tutorials on youtube, read some guides but always when I try to record with audacity the volume is very low. I set the input volume bar to maximum but it is still very low.

Last time I did that, I heard a lot of crackling. Not only the bug (if it is one) in audacity but also when I play the file with a normal audio player.

In audacity. I import the file, edit it and of course I want to play the part I have selected. It’ll play but it often just sounds terrible. And then when I hit the Pause or Stop button to stop the playback, it’ll freeze.

Which input volume bar did you set to maximum? Assuming you are choosing pulse or default in Audacity’s Device Toolbar the Audacity input slider should be greyed out on maximum (that is, it has no effect).

Pulse is often problematic although it makes it easier for multiple applications to use the sound card. If you want to use pulse I suggest you install Pulse Audio Volume Control then choose the input source and adjust the input level using that. Then to launch Audacity, open a terminal, type:

env PULSE_LATENCY_MSEC=30 audacity

and hit ENTER on your keyboard. This should solve the crackling, fast playback and freezes.

Otherwise, choose the (hw) playback and recording devices in Device Toolbar. However because you are now trying to access the sound device directly through ALSA, if any other program is accessing the device then it will not be available for Audacity. Also this denies exclusive access of a device to PulseAudio, so other programs using PulseAudio will not be able to use that device.


Gale

http://www.classroomcopilot.com/main/wp-content/uploads/2011/06/audacity1.jpg The volume bar I mean is Mic Input Volume in this picture.
The slider is, however, not greyed out on maximum. When I click on it, a ToolTip pops up with the message “Input Volume: 1,0”

I installed pavucontrol (should be the volume control you mean) and now in the Input Devices-Tab I can change the Port. Is that what you mean? If yes, mine is set to Line In (unplugged).

If I chose hw, audacity won’t play the sound. Guess that’s what you mean with “not be available for audacity”.

Then it’s not as intended by Audacity if you are selecting the pulse or default input in Device Toolbar. The tooltip should say “Unavailable, use system mixer”.

Where did you get Audacity from and what version does it give at Help > About Audacity… ?

If you are playing a song in another application (or perhaps if you even have another audio application open) then you won’t be able to play audio in Audacity.

So if you want to use multiple audio applications at once, use pulse and launch Audacity with the command suggested.


Gale

Audacity is Version 2.0.5 and I installed it from the repository (Linux Mint 17) with the command

sudo apt-get install audacity

.

Note that “another audio application” may include your web browser if a web page that includes audio has been opened. Flash animations do not always release the sound card after the page has been closed, so it may be necessary to close your web browser, ensuring that when you restart the web browser it does not open onto a page that has audio.

I’m having the same problem. I’m also using Linux Mint 17. Another post (Audacity 2.0.5 and Linux Mint 17, I can’t work) sounds like they are having a similar problem, and they are using Mint 17.

I wonder if this is related to Mint 17?

When I open files on this computer, they play back fast, with a lot of static sound. When I press stop, the computer freezes. It does it with both the standard 2.0.5 version, and the daily build.

I recorded something just now. Initialy after recording, it played back just fine. After I hit stop the first time, the problem started. Rebooting doesn’t help. There’s nothing else open except for this browser window open to this page. No other audio playing anywhere. If I export the audio to a file, and play back that file in a different audio player, its sounds great.

I’ve been succesfully using Audacity for a long time, so I know it’s not me.

Anybody got any ideas?

It’s a problem between pulseaudio and Audacity.

Please try the same solution which is already written in this topic. :wink:

Exit Audacity, open a Terminal, type the following:

env PULSE_LATENCY_MSEC=30 audacity

hit ENTER on your keyboard then Audacity will launch.

Alternatively, choose the (hw) playback device or dmix in Device Toolbar .


Gale

Sorry, I didn’t see this solution, because there was so much talk about multiple programs using the soundcard, which wasn’t happening in my case, So I didn’t pay attention.

Linux is so frustrating sometimes. I’ve been using Audacity for years with different version of Ubuntu, and it decides to break with a new version.

Anyway, I tried the HW playback device option and it works. :smiley: Thanks you very much!

As a general point, Ubuntu is an early adopter of new technology and new versions. The plus side is that Ubuntu users get to be among the first to try out the latest and greatest software. The downside is that breakages are more frequent as new software is exposed for the first time to millions of users. Some other distributions (notably “Debian Stable”) update applications more slowly, so by the time it reaches the end user it is thoroughly tested. The plus side of this approach is a stable system and breakages are rare. The downside is that applications may be a few versions behind the latest release versions. Mint is a very popular distribution based on Ubuntu. Because Mint lags a short way behind Ubuntu, main bugs and breakages are caught by the Ubuntu team before they reach the Mint releases. One of the benefits of using Linux is that you are free to choose a distribution that suits your tastes and needs.

i had though the “dmix” setting had solved the freezing problem, and it seemed to for a little while, but then Audacity froze up while hitting play/stop (using the spacebar), i’m running linux mint 17, audacity 2.0.5, 16gb of RAM, 100s of gb’s of harddrive space.
argh.

See this post from earlier in this topic: Freeze when hitting the play/ pause / stop button - #4 by Gale_Andrews

Hi, Guys,

Hardware: Thinkpad P51
OS: Ubuntu GNOME 16.04

I tried the suggested “fix” for this by using Terminal with this command:

~$ env PULSE_LATENCY_MSEC=30 audacity

Problem didn’t resolve, but I got the following list of messages, that I hope will be helpful:

ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 4611
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 4611
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 4611
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 4611
14:32:47: Debug: Unknown accel modifier: ‘left’
14:32:47: Debug: Unknown accel modifier: ‘click/left’
14:32:47: Debug: Unrecognized accel key ‘drag’, accel string ignored.
14:32:47: Debug: Unknown accel modifier: ‘left’
14:32:47: Debug: Unrecognized accel key ‘click’, accel string ignored.
14:32:47: Debug: Unknown accel modifier: ‘right’
14:32:47: Debug: Unrecognized accel key ‘click’, accel string ignored.
14:32:47: Debug: Unknown accel modifier: ‘left’
14:32:47: Debug: Unknown accel modifier: ‘click/left’
14:32:47: Debug: Unrecognized accel key ‘drag’, accel string ignored.
14:32:47: Debug: Unknown accel modifier: ‘left’
14:32:47: Debug: Unrecognized accel key ‘click’, accel string ignored.
14:32:47: Debug: Unknown accel modifier: ‘right’
14:32:47: Debug: Unrecognized accel key ‘click’, accel string ignored.

I’m a linux newbie / recent Windoze convert, and hoping for some help with this.

Thanks very much!