SeaDve / Mousai

Identify songs in seconds
GNU General Public License v3.0
981 stars 36 forks source link

Mousai says microphone is muted #29

Closed archisman-panigrahi closed 3 years ago

archisman-panigrahi commented 3 years ago

OS: Manjaro XFCE Installation method: AUR Affected Version: 0.6.0 and 0.6.1

image Afterwards, it says "No audio detected" and "Please check your audio device". I have a working microphone in my laptop (it works with other apps, e.g. skype), and I also tried an earphone.

When I run from the command line, I get the error

$ mousai
Error: gst-resource-error-quark: Could not open file "/home/archisman/.cache/tmp/mousaitmp.ogg" for writing. (6) ../gstreamer/plugins/elements/gstfilesink.c(471): gst_file_sink_open_file (): /GstPipeline:pipeline0/GstFileSink:filesink0:
system error: Bad file descriptor
Error: gst-core-error-quark: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure. (4) ../gstreamer/libs/gst/base/gstbasesink.c(5865): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstFileSink:filesink0:
Failed to start

I cannot say when this issue appeared.

Last time I used the app was in July, and then the issue was absent.

archisman-panigrahi commented 3 years ago

I installed previous versions one by one, and 0.4.4 is the last version that works in my computer (0.5.0 shows the same issue).

SeaDve commented 3 years ago

Your microphone works propertly, I think. It is just the recorder is not recording because of that error.

/home/archisman/.cache/tmp Does this directoey exist?

SeaDve commented 3 years ago

This is related to this I suppose

SeaDve commented 3 years ago

I made a release and it should also now come to aur

SeaDve commented 3 years ago

I shoud have implemented more helpful error messages 😅

archisman-panigrahi commented 3 years ago

It is showing the same error message. I tried deleting /home/archisman/.cache/tmp, but that did not work. It is creating an empty file mousaitmp.ogg in the ~/.cache/tmp directory. Also, now it does not show any error message in the terminal. I also locally installed from source using meson and ninja, and the same error message exists.

I noticed that until 0.4.4 the AUR package used /tmp (not .cache/tmp). Is there a way to hardcode mousai to always use /tmp instead on .~/cache/tmp?

SeaDve commented 3 years ago

I noticed that until 0.4.4 the AUR package used /tmp (not .cache/tmp). Is there a way to hardcode mousai to always use /tmp instead on .~/cache/tmp?

You can modify get_tmp_dir() in utils directory, make it return '/tmp'

I won't prefer this though, it would be better to fix it properly so other won't get the same issue.

SeaDve commented 3 years ago

I also locally installed from source using meson and ninja, and the same error message exists.

I think the issue is fixed then? There is btw a new option in the hamburger menu to change audio source if that change anything

archisman-panigrahi commented 3 years ago

I think the issue is fixed then?

No, I meant, the same issue from AUR is present when I install from source.

SeaDve commented 3 years ago

No, I meant, the same issue from AUR is present when I install from source.

I mean't the issue that the recorder doesn't detect the audio file, since it doesnt output any error anymore on the terminal.

So i assume it may be a different issue, not something has to do with the tmpdir

(Oops i editted your reply instead of creating a new reply)

archisman-panigrahi commented 3 years ago

Now it is working. It seems that Desktop Audio was selected instead of microphone, and that is why it still said "muted".

I will do a few more tests, and close this issue in a few hours (till then, please keep it open).

SeaDve commented 3 years ago

Okay, thanks. You can close it yourself

It's weird though that it is defaulted to desktop audio, the microphone is the set default in the src code

archisman-panigrahi commented 3 years ago

Thank you for the quick fix.