Jump to content

Custom Renderer bug?


majstang

Recommended Posts

Hello!

 

I use this script to switch audio renderers just by clicking the title bar of the TSPlayer control window. When trying to make it completely failsafe by selecting a tab directly in TSPlayer programatically using a SendMessage: SendMessage, 0x1330, 2,, TPageControl1, ahk_class TfrmPlayer  ; 0x1330 is TCM_SETCURFOCUS. Selects DirectShow TAB. I get surprising results when using the EVR Custom Renderer. TPanel1 video window goes black and if trying to switch audio renderers again by script, usually ends with a separate ActiveMovie Window pops up where video is working, while the TPanel1 control is still blackend. If using the EVR Enhanced Video Renderer the issue could not be reproduced. Why does the EVR Custom Renderer go nuts when sending 0x1330 to a TPageControl1? This seem to me like there is a bug. 

Code looks like this:

 

WinShow, ahk_class TfrmPlayer
WinActivate, ahk_class TfrmPlayer
SendMessage, 0x1330, 2,, TPageControl1, ahk_class TfrmPlayer  ; 0x1330 is TCM_SETCURFOCUS. Selects DirectShow TAB
;Control, TabRight, 2, TPageControl1, ahk_class TfrmPlayer      ; Are forced to use this non-failsafe tab selecting method instead
ControlGet, Renderer, Choice, , TComboBox1, ahk_class TfrmPlayer
ControlGet, Renderer_List, List, , TComboBox1, ahk_class TfrmPlayer
Loop, Parse, Renderer_List, `n
 {
   If (InStr(A_LoopField, "DirectSound: 1 - SAMSUNG (AMD High Definition Audio Device)"))
     Samsung_1 := A_Index
   If (InStr(A_LoopField, "DirectSound: Realtek Digital Output(Optical) (Realtek High Definition Audio)"))
     Optical := A_Index
 }
Sleep, 100 
If (Renderer = "DirectSound: 1 - SAMSUNG (AMD High Definition Audio Device)")
   Control, Choose, % Optical, TComboBox1, ahk_class TfrmPlayer
If (Renderer = "DirectSound: Realtek Digital Output(Optical) (Realtek High Definition Audio)")
   Control, Choose, % Samsung_1, TComboBox1, ahk_class TfrmPlayer  
If !(Renderer = "DirectSound: 1 - SAMSUNG (AMD High Definition Audio Device)") 
&& !(Renderer = "DirectSound: Realtek Digital Output(Optical) (Realtek High Definition Audio)")
   Control, Choose, % Samsung_1, TComboBox1, ahk_class TfrmPlayer  
SendMessage, 0x1330, 0,, TPageControl1, ahk_class TfrmPlayer  ; Selects Player TAB
;Control, TabLeft, 2, TPageControl1, ahk_class TfrmPlayer       ; Are forced to use this non-failsafe tab selecting method instead
WinActivate, ahk_class TfrmVideo

 

Edited by majstang
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...