Hi Yair, This is a nice feature but ossxmix is not the proper place to implement it because: - It only works when ossxmix is running. - If there are several ossxmix programs running then they may start fighting against each other. - It will conflict with volume management performed by other applications or by OSS.
I'm working on a new vmix subsystem. One of it's features will be that the same PID will get the same vmix client engine each time (if it's free) and the previous volume will be restored (instead of returning back to full scale). It will be easy to implement this feature so that the initial volume level is restored based on the program name. In addition the savemixer utility can be modified to save/restore the per application voliumes. I didn't apply this patch. Please revert back to the hg version. Best regards, Hannu --------- Yair K. wrote: > 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. > > ------------------------------------------------------------------------ > > _______________________________________________ > oss-devel mailing list > oss-devel@mailman.opensound.com > http://mailman.opensound.com/mailman/listinfo/oss-devel > _______________________________________________ oss-devel mailing list oss-devel@mailman.opensound.com http://mailman.opensound.com/mailman/listinfo/oss-devel