I'm trying to access the equalizer from the luahttp interface as a part of my GSoC project.<br>For this, I'm accessing the equalizer-bands string and parsing the gain values from that string in the interface code.<br>
<br>However, the string is corrupted/truncated sometimes when the equalizer is modified using the Qt interface.<br>The linked screen shot ( <a href="http://i.imgur.com/qeCT7.png">http://i.imgur.com/qeCT7.png</a> )displays the string and its hex value when the string is modified through the Qt interface (from extended_panels.cpp)<br>
<br>I'm using this code to print the string(the part indented to the extreme left is the code I added for printing out the string) from modules/gui/qt4/components/extended_panels.cpp :<br><br>void Equalizer::setCoreBands()<br>
{<br> /**\todo smoothing */<br><br> QString values;<br> for( int i = 0; i < BANDS; i++ )<br> {<br> const float f_val = (float)( bands[i]->value() ) / 10 - 20;<br> QString val = QString("%1").arg( f_val, 5, 'f', 1 );<br>
printf("%d\n",bands[i]->value()/10-20);<br> band_texts[i]->setText( band_frequencies[i] + "\n" + val + "dB" );<br> values += " " + val;<br> }<br> const char *psz_values = values.toAscii().constData();<br>
<br> aout_instance_t *p_aout = THEMIM->getAout();<br> if( p_aout )<br> {<br> //delCallbacks( p_aout );<br> var_SetString( p_aout, "equalizer-bands", psz_values );<br>int i=0;<br>while(psz_values[i]!='\0' && i<=100)<br>
printf("%02x",psz_values[i++]);<br>printf("\n%s\n",psz_values);<br> //addCallbacks( p_aout );<br> vlc_object_release( p_aout );<br> }<br>}<br><br><br><br><br>Is this fixable, or should I workaround this assuming that the values of the last 3 bands may not always be available.<br>
<br><br>