/*************************************************************************** * Copyright (C) 2017-2018 Jonas Kvinge * * Copyright (C) 2005 Christophe Thommeret * * (C) 2005 Ian Monroe * * (C) 2005-2006 Mark Kretschmann * * (C) 2004-2005 Max Howell * * (C) 2003-2004 J. Kofler * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef XINEFADER_H #define XINEFADER_H #include "config.h" #include #include class XineFader : public QThread { private: XineEngine *engine_; xine_t *xine_; xine_stream_t *stream_; xine_stream_t *decrease_; xine_stream_t *increase_; xine_audio_port_t *port_; xine_post_t *post_; uint fade_length_; bool paused_; bool terminated_; void run(); public: XineFader(XineEngine *engine, xine_t *xine, xine_stream_t *stream, xine_audio_port_t *audioport, xine_post_t *post, uint fadeMs); ~XineFader(); void pause(); void resume(); void finish(); }; class XineOutFader : public QThread { private: XineEngine *engine_; bool terminated_; uint fade_length_; void run(); public: XineOutFader(XineEngine *, uint fadeLengthMs ); ~XineOutFader(); void finish(); }; #endif