Mercurial > mplayer.hg
comparison gui/interface.c @ 33393:eda1d0125255
Use mixer directly without checking for an audio_out.
If this cases issues, the mixer behaviour should be changed
to include any necessary special-cases.
author | reimar |
---|---|
date | Sun, 22 May 2011 11:20:07 +0000 |
parents | 3844d17b0a24 |
children | a97ab6658993 |
comparison
equal
deleted
inserted
replaced
33392:3844d17b0a24 | 33393:eda1d0125255 |
---|---|
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 "libao2/audio_out.h" | |
36 #include "libmpcodecs/dec_audio.h" | 35 #include "libmpcodecs/dec_audio.h" |
37 #include "libmpcodecs/dec_video.h" | 36 #include "libmpcodecs/dec_video.h" |
38 #include "libmpcodecs/vd.h" | 37 #include "libmpcodecs/vd.h" |
39 #include "libmpcodecs/vf.h" | 38 #include "libmpcodecs/vf.h" |
40 #include "libvo/video_out.h" | 39 #include "libvo/video_out.h" |
551 mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_AddingVideoFilter, str); | 550 mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_AddingVideoFilter, str); |
552 } | 551 } |
553 | 552 |
554 int guiGetEvent(int type, void *arg) | 553 int guiGetEvent(int type, void *arg) |
555 { | 554 { |
556 const ao_functions_t *audio_out = NULL; | |
557 mixer_t *mixer = NULL; | 555 mixer_t *mixer = NULL; |
558 | 556 |
559 stream_t *stream = arg; | 557 stream_t *stream = arg; |
560 | 558 |
561 #ifdef CONFIG_DVDREAD | 559 #ifdef CONFIG_DVDREAD |
562 dvd_priv_t *dvdp = arg; | 560 dvd_priv_t *dvdp = arg; |
563 #endif | 561 #endif |
564 | 562 |
565 if (guiIntfStruct.mpcontext) { | 563 if (guiIntfStruct.mpcontext) { |
566 audio_out = mpctx_get_audio_out(guiIntfStruct.mpcontext); | |
567 mixer = mpctx_get_mixer(guiIntfStruct.mpcontext); | 564 mixer = mpctx_get_mixer(guiIntfStruct.mpcontext); |
568 } | 565 } |
569 | 566 |
570 switch (type) { | 567 switch (type) { |
571 case guiXEvent: | 568 case guiXEvent: |
703 case guiReDraw: | 700 case guiReDraw: |
704 mplEventHandling(evRedraw, 0); | 701 mplEventHandling(evRedraw, 0); |
705 break; | 702 break; |
706 | 703 |
707 case guiSetVolume: | 704 case guiSetVolume: |
708 if (audio_out) { | 705 if (mixer) { |
709 float l, r; | 706 float l, r; |
710 | 707 |
711 mixer_getvolume(mixer, &l, &r); | 708 mixer_getvolume(mixer, &l, &r); |
712 guiIntfStruct.Volume = (r > l ? r : l); | 709 guiIntfStruct.Volume = (r > l ? r : l); |
713 | 710 |
744 else | 741 else |
745 btnSet(evSetMoviePosition, btnReleased); | 742 btnSet(evSetMoviePosition, btnReleased); |
746 | 743 |
747 // audio | 744 // audio |
748 | 745 |
749 if (audio_out) { | 746 if (mixer) { |
750 float l, r; | 747 float l, r; |
751 | 748 |
752 mixer_getvolume(mixer, &l, &r); | 749 mixer_getvolume(mixer, &l, &r); |
753 guiIntfStruct.Volume = (r > l ? r : l); | 750 guiIntfStruct.Volume = (r > l ? r : l); |
754 | 751 |