Modify

Opened 5 years ago

Closed 4 years ago

#1627 closed Bug (wontfix)

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, OpenSuse10.3, KDE with Compiz
Version: Jajuk v1.8.4 (build 2010/02/07 6:01)

Attachments (0)

Change History (8)

comment:1 Changed 5 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?

comment:2 Changed 5 years ago by bflorat

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

comment:3 Changed 5 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.

comment:4 Changed 5 years ago by bflorat

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

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

Few things :

comment:5 Changed 5 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.

comment:6 Changed 5 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?]

comment:7 Changed 5 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?

comment:8 Changed 4 years ago by bflorat

  • Resolution set to wontfix
  • Status changed from new to closed

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 Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.