Mercurial > mplayer.hg
comparison gui/interface.c @ 33689:8d0290220239
Replace numeric constants for gtkEquChannels array size.
Use macro FF_ARRAY_ELEMS() instead.
author | ib |
---|---|
date | Wed, 29 Jun 2011 11:35:58 +0000 |
parents | acb61c6d14cd |
children | d00491caf986 |
comparison
equal
deleted
inserted
replaced
33688:acb61c6d14cd | 33689:8d0290220239 |
---|---|
30 #include "access_mpcontext.h" | 30 #include "access_mpcontext.h" |
31 #include "config.h" | 31 #include "config.h" |
32 #include "help_mp.h" | 32 #include "help_mp.h" |
33 #include "input/input.h" | 33 #include "input/input.h" |
34 #include "libaf/equalizer.h" | 34 #include "libaf/equalizer.h" |
35 #include "libavutil/common.h" | |
35 #include "libmpcodecs/dec_audio.h" | 36 #include "libmpcodecs/dec_audio.h" |
36 #include "libmpcodecs/dec_video.h" | 37 #include "libmpcodecs/dec_video.h" |
37 #include "libmpcodecs/vd.h" | 38 #include "libmpcodecs/vd.h" |
38 #include "libmpcodecs/vf.h" | 39 #include "libmpcodecs/vf.h" |
39 #include "libvo/video_out.h" | 40 #include "libvo/video_out.h" |
595 | 596 |
596 if (gtkEnableAudioEqualizer) { | 597 if (gtkEnableAudioEqualizer) { |
597 equalizer_t eq; | 598 equalizer_t eq; |
598 int i, j; | 599 int i, j; |
599 | 600 |
600 for (i = 0; i < 6; i++) { | 601 for (i = 0; i < FF_ARRAY_ELEMS(gtkEquChannels); i++) { |
601 for (j = 0; j < 10; j++) { | 602 for (j = 0; j < FF_ARRAY_ELEMS(*gtkEquChannels); j++) { |
602 eq.channel = i; | 603 eq.channel = i; |
603 eq.band = j; | 604 eq.band = j; |
604 eq.gain = gtkEquChannels[i][j]; | 605 eq.gain = gtkEquChannels[i][j]; |
605 gtkSet(gtkSetEqualizer, 0, &eq); | 606 gtkSet(gtkSetEqualizer, 0, &eq); |
606 } | 607 } |
1313 int i; | 1314 int i; |
1314 | 1315 |
1315 memset(gtkEquChannels, 0, sizeof(gtkEquChannels)); | 1316 memset(gtkEquChannels, 0, sizeof(gtkEquChannels)); |
1316 | 1317 |
1317 if (guiInfo.afilter) { | 1318 if (guiInfo.afilter) { |
1318 for (i = 0; i < 6; i++) { | 1319 for (i = 0; i < FF_ARRAY_ELEMS(gtkEquChannels); i++) { |
1319 tmp.ch = i; | 1320 tmp.ch = i; |
1320 tmp.arg = gtkEquChannels[i]; | 1321 tmp.arg = gtkEquChannels[i]; |
1321 af_control_any_rev(guiInfo.afilter, AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp); | 1322 af_control_any_rev(guiInfo.afilter, AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp); |
1322 } | 1323 } |
1323 } | 1324 } |