[oss-devel] [PATCH] Add per-app mixer settings to ossxmix

Yair K. cesium2 at gmail.com
Sat May 17 23:07:12 EEST 2008


Hi,

  The attached patch adds the following functionality:
     1. A per-app mixer setting stored in an ini file. e.g.

[Programs]
mpg123 = 20.4:20.4

      Next time mpg123 volume will be automatically set to 20.4 on both channels.

     2. Private malloc, calloc, strdup functions converted to glib's g_malloc etc.
     3. To faciliate #1, a simple ini parser and a preferences window was added. Default ini location is ${HOME}/.ossxmix
     4. Also, the following options were added:
          Save_last_vol -> When enabled, save the volume of an existing program for use next time.
          Background_poll -> When enabled, poll also when ossxmix is minimized (pretty much required for Save_last_vol, unless someone wants to keep ossxmix on top in a separate desktop).
          Set_to_max_after_end -> When enabled, the engine volume will be set to maximum after a program has ended.
          Mixer -> Set mixer location. Default "/dev/mixer".

         All except the last are exposed in GUI, and default to disabled.
     5. Some small other changes (#ifdefs for MIXT_MUTE, don't make mixers with priority -2 ever default).

Notes:
    A. Didn't test with Clive's patch. No interference should happen.
    B. Value set in ini can exceed vmix's maximum. I didn't check for it, assuming that trying to set a value above maximum will set maximum.
    C. When option window is open, and Save_last_vol is enabled, and a program volume is stored, the option window will not update. Furthermore, pressing OK will overwrite that volume.
    D. Delves a bit into GTK's CList widget's private data. A bit for performance (I'm not sure how many programs a typical user may want to store), and a bit because of GTK1 bugs.
    E. There's some code to disable configuration options if vmix is not enabled. This will require a bit of remodeling if "dynamic" vmix is used.
    F. Ini comments begin with "#", but ossxmix erases them every time the ini file is saved. This happen every time the options window is closed, and every time ossxmix exits.

Yours,
	Yair K.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ossxmix-clist.diff.gz
Type: application/x-gzip
Size: 9412 bytes
Desc: not available
Url : http://mailman.opensound.com/pipermail/oss-devel/attachments/20080517/7eed632b/attachment.bin 


More information about the oss-devel mailing list