<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hello all,<br><br>I'm a bit of a n00b here, but I've been working on a patch to allow for =custom equalizer presets=.  It is not complete yet, but I am very keen on input from some of you.<br><br>At present, I have devised a way to replace the built in presets in a thread-safe manner.<br><br>Some things I have added:<br><ul><li>Presets now have a mutex, allowing for only one read/write at a time.</li><li>Presets are loaded from the configuration file, safely, even though the equalizer module may have not loaded yet.  I accomplish this with the functions within equalizer_presets.h header file.</li><li>A new config var has been added, called "equalizer-presets", with a fairly complicated syntax.  You can paste the following into your vlcrc under [equalizer] if you wish to test this:<br><br># string (Equalizer presets values)<br>equalizer-presets=My Preset::14.0:1 2 3 4 5 6 7 8 9 10<br><br>You will notice that loading with this string causes "Flat" to get overloaded with the above (except the name) - and that the list will not react for any of the other elements, because they will not exist :)<br><br>Note: The additional ':' is meant for identifying whether a preset is a default preset override - in which case we can accompany the language changes/regional options for the user automatically.  MY intention is to be able to add things like "bass" into there, so that the preset initializer/loader will be able to replace that with the translated version for "bass".  This will also allow users to use the first location (i.e. "My Preset") with built-in names ("bass") without getting unintentionally translated.<br></li></ul><br>Incomplete:<br><ul><li>There is presently no way to change an equalizer preset's name (more on that).<br></li><li>There is presently no function to save equalizer presets to the configuration file.</li><li>There is presently no function to add equalizer presets.</li><li>There is presently no function to remove equalizer presets.</li><li>There has been no attempt to add these changes to the macosx interface - I will deal with that once we get the rest working smoother.<br><br></li></ul>As per the equalizer preset naming: Presently the way equalizer preset names are stored, their names are kept separate from their values/amps/bands.  This is primarily because it aided putting static equalizer presets into the configuration data - which require an array of strings. ( see change_string_list() )<br><br>Because of the way that change_string_list( preset_list, preset_list_text, 0 ) requires that no more strings can be added, nor can strings be shortened/lengthened, I am at a bit of a loss as to how I can make the preferences dialog accept a dynamic drop-down of presets that were added or modified during this session.<br><br>It is easy to change the values that would be associated with this list:<br>preset_list_text[i] corresponds with eqz_preset_10b[i]<br>^ ^ string ^ ^                            ^ ^ values ^ ^ <br><br>The equalizer dialog itself in extended_panels.cpp can easily be told to use a different list (i.e. with our custom, dynamic names) but this doesn't escape the problem of having the preferences dialog load and stay with whatever is within preset_list_text .  As I see it, these lists cannot be changed during runtime in a thread safe manner.<br><br><blockquote><blockquote><ul><li>I am also having trouble getting the functions in equalizer_presets.h into their own separate .c file (possibly equalizer.c), so that they can be called externally from parts like extended_modules.cpp in qt4's c++ code.  df__ and j-b have helped extensively on irc already, unfortunately we can't seem to get past this problem.</li></ul><br></blockquote></blockquote>Again, any input appreciated!  I'm stubborn and will do this with or without help! xD<br><br>Dave Andrews<br><br /><hr />Internet Explorer 8 makes surfing easier.  <a href='http://go.microsoft.com/?linkid=9655264' target='_new'>Get it now! </a></body>
</html>