diff options
author | phintuka <phintuka> | 2008-01-09 08:44:15 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-01-09 08:44:15 +0000 |
commit | 311e37ba2251a4a5e4bfa2398dfdab229d58f62d (patch) | |
tree | 14e21863acdfdccc4703e1027f00e91fd2fb5bf4 | |
parent | 4ec4ead243515119b8847ef276df5f2444113502 (diff) | |
download | xineliboutput-311e37ba2251a4a5e4bfa2398dfdab229d58f62d.tar.gz xineliboutput-311e37ba2251a4a5e4bfa2398dfdab229d58f62d.tar.bz2 |
Set audio volume when client connects
-rw-r--r-- | frontend.c | 4 | ||||
-rw-r--r-- | frontend.h | 3 | ||||
-rw-r--r-- | frontend_svr.c | 3 |
3 files changed, 7 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.c,v 1.39 2008-01-06 10:14:25 phintuka Exp $ + * $Id: frontend.c,v 1.40 2008-01-09 08:44:15 phintuka Exp $ * */ @@ -184,6 +184,7 @@ cXinelibThread::cXinelibThread(const char *Description) : cThread(Description) { TRACEF("cXinelibThread::cXinelibThread"); + m_Volume = 255; m_bStopThread = false; m_bReady = false; m_bIsFinished = false; @@ -259,6 +260,7 @@ bool cXinelibThread::IsFinished(void) void cXinelibThread::SetVolume(int NewVolume) { + m_Volume = NewVolume; cString str = cString::sprintf("VOLUME %d%s", NewVolume * 100 / 255, xc.sw_volume_control ? " SW" : ""); Xine_Control(str); @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.h,v 1.16 2008-01-06 10:14:25 phintuka Exp $ + * $Id: frontend.h,v 1.17 2008-01-09 08:44:15 phintuka Exp $ * */ @@ -139,6 +139,7 @@ class cXinelibThread : public cThread, public cListObject bool m_bLiveMode; bool m_bEndOfStreamReached; bool m_bPlayingFile; + int m_Volume; cString m_FileName; uint64_t m_StreamPos; uint32_t m_Frames; diff --git a/frontend_svr.c b/frontend_svr.c index 6468c692..2b65a74e 100644 --- a/frontend_svr.c +++ b/frontend_svr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.c,v 1.47 2008-01-03 19:05:07 phintuka Exp $ + * $Id: frontend_svr.c,v 1.48 2008-01-09 08:44:15 phintuka Exp $ * */ @@ -1154,6 +1154,7 @@ void cXinelibServer::Handle_Control_CONFIG(int cli) fd_control[cli].printf("NOVIDEO %d\r\nLIVE %d\r\n", m_bNoVideo?1:0, m_bLiveMode?1:0); + SetVolume(m_Volume); ConfigureOSD(xc.prescale_osd, xc.unscaled_osd); ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay, xc.audio_compression, xc.audio_equalizer, |