Author: remi
Date: 2009-02-15 20:02:45 +0100 (Sun, 15 Feb 2009)
New Revision: 3642
Modified:
software_suite_v2/tuxware/tuxosl-ose/trunk/include/config.h
software_suite_v2/tuxware/tuxosl-ose/trunk/src/mixer.cpp
Log:
* sound equalizing can be disabled
* added some todo comments ...
* fixed some comments ...
Modified: software_suite_v2/tuxware/tuxosl-ose/trunk/include/config.h
===================================================================
--- software_suite_v2/tuxware/tuxosl-ose/trunk/include/config.h 2009-02-15
18:35:41 UTC (rev 3641)
+++ software_suite_v2/tuxware/tuxosl-ose/trunk/include/config.h 2009-02-15
19:02:45 UTC (rev 3642)
@@ -102,6 +102,8 @@
* \name Equalizer parameters.
* @{
*/
+/** Indicates if the equalizer is used or not */
+#define EQUALIZED_IS_USED (1)
/** Global volume gain */
#define EQUALIZER_GLOBAL_GAIN 1.8
/** Volume gain to the bass frequencies */
Modified: software_suite_v2/tuxware/tuxosl-ose/trunk/src/mixer.cpp
===================================================================
--- software_suite_v2/tuxware/tuxosl-ose/trunk/src/mixer.cpp 2009-02-15
18:35:41 UTC (rev 3641)
+++ software_suite_v2/tuxware/tuxosl-ose/trunk/src/mixer.cpp 2009-02-15
19:02:45 UTC (rev 3642)
@@ -53,8 +53,10 @@
{
_workBuff[i] = new unsigned char[PLAYBACK_FRAME_SIZE];
}
+#if EQUALIZED_IS_USED
/* Initialize the equalizer */
equalizerInitialization();
+#endif
logDebug("[mixer.cpp] Mixer created.");
}
@@ -74,8 +76,10 @@
{
delete &_channels[i];
}
+#if EQUALIZED_IS_USED
/* Finalize the equalizer */
equalizerFinalization();
+#endif
logDebug("[mixer.cpp] Mixer is destroyed.");
}
@@ -220,7 +224,9 @@
}
/* When the a TTS channel state is on, the volume of the wav channels must
- * be lowered for the TTS clarity improvment */
+ * be lowered for the TTS clarity improvement */
+ /* TODO : Get the right way to retrieve the TTS on/off state before to
apply
+ * theses conditions */
for (i = 0; i < _channelCount; i++)
{
if (_channels[i].getType() == TOCT_TTS)
@@ -240,8 +246,8 @@
}
}
- /* If no TTS channel state is on, the volume of the wav chennels must
- * be set to the normal volume */
+ /* If no TTS channel state is on, the volume of the wav channels must
+ * be setted to the normal volume */
if (!ttsPlaying)
{
for (j = 0; j < _channelCount; j++)
@@ -288,8 +294,12 @@
}
}
+#if EQUALIZED_IS_USED
/* Equalize the sound before to release it */
+ /* TODO : Only apply the equalizer to the TTS channel */
+ /* TODO : Add equalizer buffer flushing on TTS off */
equalizerApplyToBuffer(size, buffer);
+#endif
}
return;
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn