MP3/MPlayer pre-release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 01 Apr 2006 15:53:11 +0000, Stefan Huelswitt wrote:

> Hi,
> as many may have noticed, development of the MP3/MPlayer plugin
> is somewhat stuck. This is partly due to lack of time, but also due
> to missing motivation.
> 
> However, some changes already have been done. I don't want to
> hold them back any longer but most of them are only roughly
> tested, so that I don't want to make a full release.
> 
> I decided to put a pre-release on my homepage at
> <http://www.muempf.de/down/vdr-mp3-0.9.15pre4.tar.gz>
> 
> Please refer to the HISTORY file for changes.
> NOTE: this is a BETA release!
> If you don't dare to try it, please give feedback (positive or
> negative).
> 
> I'm going to update the pre-release version as necessary. You can
> check at <http://www.muempf.de/down.html> for new versions too.
> 
> Regards.

Dear Stefan,

I've tested your version and found that the mplayer volume fix does not work.
The attached patch makes it *really* work (well at least it is working here :) 

On another issue how is the status stuff supposed to work ? 
Will it display the play position ? 

Soeren.

--- ../mp3-0.9.15pre4/player-mplayer.c	2006-04-01 17:22:47.000000000 +0200
+++ PLUGINS/src/mplayer-0.9.15pre4/player-mplayer.c	2006-04-05 08:42:56.000000000 +0200
@@ -45,8 +45,6 @@
 
 //#define DEBUG_SLAVE
 
-#define MPLAYER_VOL_STEP 3.0
-
 const char *MPlayerCmd = "mplayer.sh";
 int MPlayerAid=-1;
 
@@ -67,7 +65,7 @@
   // convert according cDvbDevice::SetVolumeDevice();
   // take into account that VDR does non-linear changes, while
   // MPlayer does linear volume changes.
-  Volume=(float)(2*volume-volume*volume/255)/2.55;
+  Volume=((float)(2*volume-volume*volume/255))/2.56;
   Mute=mute;
   changed=false;
   Unlock();
@@ -543,23 +541,18 @@
 
 void cMPlayerPlayer::SetMPlayerVolume(void)
 {
-  float mpNewVol;
   bool mute;
   Lock();
-  if(status->GetVolume(mpNewVol,mute)) {
+  if(status->GetVolume(mpVolume,mute)) {
     if(mute) {
       if(!mpMute) { MPlayerControl("mute"); mpMute=true; }
       }
     else {
       if(mpMute) { MPlayerControl("mute"); mpMute=false; }
-      const int dir=mpNewVol>=mpVolume ? 1 : -1;
-      while(fabs(mpNewVol-mpVolume)>=(MPLAYER_VOL_STEP/2)) {
-        MPlayerControl("volume %d",dir);
+        MPlayerControl("volume %f 1",mpVolume);
         mpMute=false;
-        mpVolume+=MPLAYER_VOL_STEP * (float)dir;
-        }
       }
-    d(printf("mplayer: mpNewVol=%.2f mpVolume=%.2f mpMute=%d\n",mpNewVol,mpVolume,mpMute))
+    d(printf("mplayer: mpVolume=%.2f mpMute=%d\n",mpVolume,mpMute))
     }
   Unlock();
 }





[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux