Ticket #1627 (closed Bug: wontfix)

Opened 3 years ago

Last modified 3 years ago

Two instances of mplayer, no sound every other track

Reported by: mats.ahlgren@… Owned by: bflorat
Priority: 7, high Milestone: 1.9 "Killer Queen"
Component: Core Version: 1.8.4
Keywords: Cc:
Regression ?:

Description

When Jajuk plays a song, I seem to have two instances of mplayer out at once:

21097 mats 0.3 0.5 mplayer mplayer -quiet -slave -af volume=5 -softvol -cache 500 /path/to/music.file 21103 mats 0.0 0.1 mplayer mplayer -quiet -slave -af volume=5 -softvol -cache 500 /path/to/music.file

This happens with every song and even after restarting Jajuk.

In addition, every *OTHER* song, the sound will be completely silent.

e.g. Song1 -> sound Song2 -> no sound Song3 -> sound Song4 -> no sound Song5 -> sound Song6 -> no sound ...

I noticed that all my preferences were deleted (again) around the same time this started happening.

I have also tried sudo /etc/init.d/alsa restart to no avail.

I then tried to set the crossfade-time to 0. This did not work -- *until I restarted Jajuk*.

After restarting Jajuk, I then noticed that I only had 1 instance of mplayer running for songs:

22627 mats 0.8 0.5 mplayer mplayer -quiet -slave -af volume=5,volnorm -softvol -cache 500 /path/to/music.file

And the problem was gone.

Platform: Linux, OpenSuse?10.3, KDE with Compiz Version: Jajuk v1.8.4 (build 2010/02/07 6:01)

Attachments

Change History

Changed 3 years ago by anonymous

  • milestone changed from To Be Qualified by Jajuk Team to 1.9 "Killer Queen"

Let's try to find out what happened here. Especially the loosing of preferences is very scary. Do you have logfiles from around the time it happened?

Changed 3 years ago by bflorat

What do you mean by "preferences", jajuk options or songs rating preferences ?

Changed 3 years ago by mats.ahlgren@…

I was referring to #1611 which I think may have possibly happened around the same time.

It was just correlation; not necessary related. I was mentioning as a sidenote for completeness.

Changed 3 years ago by bflorat

  • owner set to bflorat
  • priority changed from 1, lowest to 7, high
  • component changed from (Jajuk Members) Any (Default Component) to (Java Developer) Core

I'm not sure to get it completely. Is it always reproductible or not ?

Few things :

Changed 3 years ago by mats.ahlgren@…

In reply to previous comment:

- Caching: This situation is indeed like the linked mplayer email thread. One of the processes is a child of the other.

- Zombies: Yes, I have also experienced zombies -- more than 4 at once -- but very rarely.

- FAQ: Yes, I suspected this exact situation (the focus of this bug). However rather than using a sound daemon, I am using dmix to make ALSA multiplex sound naturally ( http[anti-anti-spam]alsa.opensrc.org/index.php/Dmix ). I tested to make sure that I could play two mplayer instances at once -- and I can still hear both files. However I will run this test again when I have time, since I'm not 100% sure that it worked.

Changed 3 years ago by mats.ahlgren@…

Oops! It seems that I misremembered the result of my test (or did it on another computer) and mplayer is not using ALSA, but rather OSS by default.

This was assuredly the problem, so I added the -ao alsa flag to mplayer as suggested, and this has fixed the problem. Thank you.

Some Linux distros have made it so that multiple programs can play audio at the same time, and others haven't caught up. Nevertheless, you might consider setting the sound driver to -ao alsa by default (or auto-detecting arts/esd/etc. and setting -ao appropriately... maybe they're running processes?). One would only do this if the ~/.mplayer/config doesn't have an -ao clause.

[note: it seems that the FAQ has the filename incorrect possibly?]

Changed 3 years ago by mats.ahlgren@…

Also ironically, there is a warning message ("if crossfading doesn't work, try adding -ao...") that appears when one enables crossfading.

However, crossfading seems to be enabled by default, so the user will not see this warning?

Changed 3 years ago by bflorat

  • status changed from new to closed
  • resolution set to wontfix

I see your point but :

  • we don't want to access to mplayer conf from jajuk for isolation reasons
  • we are very reluctant to set a default -ao option that could work or not among distros. AFAIK, the current configuration works for most distros (including mine, xubuntu). I prefer to fix this by documentation means (FAQ).

We may reopen if required by more users.

Add/Change #1627 (Two instances of mplayer, no sound every other track)

Author



Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.