From patchwork Wed Apr 5 13:00:41 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soeren Sonnenburg X-Patchwork-Id: 12246 Received: from prosun.first.fraunhofer.de ([194.95.168.2]) by www.linuxtv.org with esmtp (Exim 4.50) id 1FR7co-00017D-MP for vdr@linuxtv.org; Wed, 05 Apr 2006 15:00:42 +0200 Received: from fortknox (localhost [127.0.0.1]) by prosun.first.fraunhofer.de (8.12.10/8.12.10) with ESMTP id k35D0hGI025101 for ; Wed, 5 Apr 2006 15:00:43 +0200 (MEST) Received: (qmail 15710 invoked by uid 9); 5 Apr 2006 13:00:41 -0000 Received: from GATEWAY by fortknox with netnews for vdr@linuxtv.org (vdr@linuxtv.org) To: vdr@linuxtv.org Date: Wed, 05 Apr 2006 15:00:41 +0200 From: Soeren Sonnenburg Message-ID: Organization: Local Intranet News MIME-Version: 1.0 Sender: vdr-request@linuxtv.org References: Subject: Re: [vdr] MP3/MPlayer pre-release X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2006 13:00:42 -0000 Status: O X-Status: X-Keywords: X-UID: 8724 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 > > > 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 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(); }