Software-mixer for moc (here it is :-) )

There have been some discussions about the niceness of having a software mixer for moc. Finally I had my personal softmixer-lack-experience and decided to write a mixer for moc.
I provide here a patch that has to be applied to revision 2057 of the moc-code in the subversion repository. I think this is currently the most recent revision.

If you would like to test the mixer: http://informatik.uni-bremen.de/~hiben/moc/moc-svn-r2057-softmixer.patch

There is some more info at the site (same url, without the file).

I tested this extension and it seems to work fine. There might still be bugs and I would like to hear some feedback.

The patch provides a software mixer that will be build per default setting.
It needs to be switched on by pressing 'w' (can be customized). It then acts as a third mixer.

Let me know, what you think (or what should be changed).

Thanks!

Just after quick look (I review it at weekend probably):
HAVE_SOFTMIXER is really necessary? Turning it on doesn't require any additional library or does not break anything as I can see.

You've contributed many patches recently, would it by any help if I give you write access to SVN?

--
Damian Pietras - MOC developer

I used the HAVE_SOFTMIXER define to make sure I don't break anything while testing the mixer. If it is considered useful and works for all systems there is no need for it.

As for the SVN-repository; I am not certain, if this would be a good idea.
I really like this software and to tinker with it but I would always live 'in fear' of breaking something for a larger audience when committing.
However, I do have some ideas I would like to implement and there are things on the TODO-list that should be done. Maybe we should discuss this via eMail.

Just gave it a try and it seems to work fine, but there dose seem to be quite a bit of lag before the volume changes. Looking forward to seeing this in the repository.

Nice one hiben, thanks alot! :)

You can influence the time of delay by decreasing the size of the output buffer - if this is an option for you.
I'll investigate another softmixing-approach with a more direct response (but don't wait for it; might take a while :-) )

Today I performed a short test on a fast-response software mixer and it seems to work very well.
I hope to get around committing something this week...

Works great, thanks again. :)

Is there currently a way to set it as the default (alsa) mixer?

I don't know if I understand this correct. The software mixer is independent of the sound system (also, oss, jack).

If you mean to have the software mixer as the current active mixer in the interface on startup: This is currently not possible but would be trivial to implement.

Yeah, that's what I was wanting, didn't think it could be done but had to ask. ;)

Thanks.

I just committed an updated softmixer to the repository.
The compilation of the software-mixer is now unconditional (cannot be disabled via configure) and the response time is now very small (independent of the output buffer).

One thing I can't decide : Is it usefull to be able to disable the software mixer with a single keypress ? I hardly use this feature myself. Is there a use-case out there ?

*edit*
just found a small bug - the softmixer value is not used until it is changed in the interface... looking into this...

*edit*
Fixed

Congratulations on your first commit :)

I can see now that MOC probably needs some subsystem to store it's state data between runs. It would include the path to the directory you are in (stored in ~/.moc/last_directory) and the software mixer state, all saved in one file.

--
Damian Pietras - MOC developer