equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * MP3/MPlayer plugin to VDR (C++) |
2 * MP3/MPlayer plugin to VDR (C++) |
3 * |
3 * |
4 * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de> |
4 * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de> |
5 * |
5 * |
6 * This code is free software; you can redistribute it and/or |
6 * This code is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU General Public License |
7 * modify it under the terms of the GNU General Public License |
8 * as published by the Free Software Foundation; either version 2 |
8 * as published by the Free Software Foundation; either version 2 |
9 * of the License, or (at your option) any later version. |
9 * of the License, or (at your option) any later version. |
78 void cMPlayerStatus::SetVolume(int Volume, bool Absolute) |
78 void cMPlayerStatus::SetVolume(int Volume, bool Absolute) |
79 { |
79 { |
80 Lock(); |
80 Lock(); |
81 if(Absolute && Volume==0) mute=true; |
81 if(Absolute && Volume==0) mute=true; |
82 else { |
82 else { |
83 #if APIVERSNUM>=10401 |
|
84 #if APIVERSNUM==10401 |
|
85 #warning Caution! This code does not work with VDR 1.4.1 and 1.4.1-1. You can ignore this warning if you are using VDR 1.4.1-2 or later. |
|
86 #endif |
|
87 if(!Absolute) |
83 if(!Absolute) |
88 volume+=Volume; |
84 volume+=Volume; |
89 else |
85 else |
90 #endif |
|
91 volume=Volume; |
86 volume=Volume; |
92 if(volume>0) mute=false; |
87 if(volume>0) mute=false; |
93 } |
88 } |
94 d(printf("status: volume=%d mute=%d\n",volume,mute)) |
89 d(printf("status: volume=%d mute=%d\n",volume,mute)) |
95 changed=true; |
90 changed=true; |