AlisterH/gwc

No sound on Mageia 7

Closed this issue · 10 comments

Version 0.21.19 works for me with audio device /dev/dsp
Version 0.22.04 produces no sound on playback.
I am using a USB sound card (CM106).
The volume control appears in the toolbar applet at 100%, but no sound comes out.

Thanks for the report. I presume you're saying it appears to play, but doesn't actually produce any sound. There are quite a few things to look at here:

  • Are you trying to play the same file with both versions?

  • Did you compile both versions from source and in the same environment?

  • Is 0.22.04 also compiled with the oss backend, and are you still trying to use /dev/dsp? If so, I'm surprised, as I didn't think we'd done much to the playback code, except in current master (which is probably worth trying).
    audio_oss.c is unchanged between 0.21.19 and 0.22.04

  • Do you actually have a real OSS system? You probably have an alsa system with alsa's compatibility stuff. If so, it would still be good to troubleshoot this (although it may be difficult from a distance), but you might find that using the pulseaudio backend or the recommended alsa backend just works. Personally I had previously recommended the oss backend due to bugs in the alsa backend, but they were fixed prior to 0.22.04.

  • If in 0.22.04 you are using the alsa backend, there's a good chance you just haven't specified the right device. What have you tried?

To get debugging output to be printed to terminal you can edit these two lines in gwc.c

gint debug = 0;
...
static int audio_debug = 0 ;

I found the problem: I have to use "Configure Audio Volume" to tell the system which audio device to use for each application: because I am still using the name "gwc" I have to configure it to use the USB sound card with "gtk-wave-cleaner".

Now that I can hear the file playing I have another problem: the playback is very crackly and distorted and also slow. Here is a sample:
test.zip

Note: the wav file is PCM, 48.0 kHz sample rate. It plays fine with 0.21-19
I get the same problem with a 44.1 KHz file.

I am using pulseaudio with the ossp package which contains the OSS Proxy daemon - osspd. The documentation says: To sum
up, the whole pipe looks like the following.

App <-> /dev/dsp <-> CUSE <-> osspd <-> ossp-padsp <-> pulseaudio

Now that I can hear the file playing I have another problem: the playback is very crackly and distorted and also slow

OK, it seemed to me that Jeff's recent changes to playback are quite CPU hungry (or something like that), so I suspect that may be the problem here - did you only test with the branch I created for your other ticket? If so, please try with either the new branch, or 0.22.04. And maybe let us know how fast your machine is.

I'm also interested in whether it is any better with either the pulseaudio or the alsa backend, if you're willing to test them. Just make sure to run make clean before rebuilding with a different backend.

Thanks.

Jeff has done some more work on the audio playback code which I haven't merged yet, because the issues it's trying to fix (on OSX) aren't all resolved.
But if you do find that playback works well for you with either 0.22.04 or the new branch I've created, please also try with Jeff's working branch: https://github.com/weltyj/gwc/tree/gwc_cleanup_2021. If it happens to fix your issue I'll merge it now and we'll worry about sorting out the OSX issues later.

And how fast is your machine?

My machine is a beast: an AMD Threadripper, 3.7GHz clock with 32 cores and 64GB of RAM.

How do I test the pulseaudio and alsa backends?

Version gwc-gwc_cleanup_2021 still has the playback problem: it is as if the playback stops and starts every few milliseconds.

Version gwc-allow_select_during_playback_v2 works fine and allows any selection during playback.

Oh, if you don't know that, you probably are using the alsa backend already, so should test OSS and pulseaudio.
These days alsa is default.
OSS: make clean && ./configure --disable-alsa && make
Pulseaudio: make clean && ./configure --enable-pa && make

These all work OK for gwc-allow_select_during_playback_v2

Thanks for testing, but I was actually interested to know if the new playback code (i.e. current master, or allow_select_during_playback branch) worked OK on your system with either of the other backends. I'm assuming it would, i.e. the playback issue only affects one backend (which I think you're saying is the default alsa backend).

Both versions (current master and gwc-allow_select_during_playback) have the same problem with crackly slow playback for both OSS and Pulseaudio.

Attached is a recording of what comes through the headphones.

Recording.zip

There seems to be a pause of several milliseconds about every 20 milliseconds.

I guess it would be nice to further investigate the "crackly" playback, but I don't think there's much point in keeping this ticket open if the issue is gone in Mageia 8.