[MP1-4838] Volume control no longer functions properly when changing audio device (3 Viewers)

Sebastiii

Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    So build failed on my side :

    Code:
    Severity    Code    Description    Project    File    Line    Suppression State
    Error        The "EnsureBindingRedirects" task failed unexpectedly.
    System.IO.FileNotFoundException: Could not find file 'D:\MediaPortal-1\mediaportal\Core\app.config'.
    File name: 'D:\MediaPortal-1\mediaportal\Core\app.config'
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
       at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
       at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
       at System.Xml.XmlTextReaderImpl.FinishInitUriString()
       at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
       at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
       at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
       at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
       at Roxel.BuildTasks.EnsureBindingRedirects.LoadAppConfig(String appConfigPath)
       at Roxel.BuildTasks.EnsureBindingRedirects.Execute()
       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
       at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()    Core          
    Error    CS0246    The type or namespace name 'AudioSwitcher' could not be found (are you missing a using directive or an assembly reference?)    MediaPortal    D:\MediaPortal-1\mediaportal\MediaPortal.Application\MediaPortal.cs    62    Active
    Error    CS0246    The type or namespace name 'CoreAudioController' could not be found (are you missing a using directive or an assembly reference?)    MediaPortal    D:\MediaPortal-1\mediaportal\MediaPortal.Application\MediaPortal.cs    224    Active
    Error    CS0246    The type or namespace name 'CoreAudioController' could not be found (are you missing a using directive or an assembly reference?)    MediaPortal    D:\MediaPortal-1\mediaportal\MediaPortal.Application\MediaPortal.cs    224    Active
    Error    CS0246    The type or namespace name 'CoreAudioController' could not be found (are you missing a using directive or an assembly reference?)    MediaPortal    D:\MediaPortal-1\mediaportal\MediaPortal.Application\MediaPortal.cs    3075    Active
    Error    CS0246    The type or namespace name 'CoreAudioDevice' could not be found (are you missing a using directive or an assembly reference?)    MediaPortal    D:\MediaPortal-1\mediaportal\MediaPortal.Application\MediaPortal.cs    3080    Active
    Error    CS0103    The name 'AudioSwitcher' does not exist in the current context    MediaPortal    D:\MediaPortal-1\mediaportal\MediaPortal.Application\MediaPortal.cs    3081    Active
    Error    CS0103    The name 'AudioSwitcher' does not exist in the current context    MediaPortal    D:\MediaPortal-1\mediaportal\MediaPortal.Application\MediaPortal.cs    3082    Active

    And attached is the NSIS and postbuild that is needed (should be ok :) )
     

    Attachments

    • 0001-MP1-4838-Added-NSIS-and-PostBuild.bat-change.patch
      2.1 KB

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Includes all of the work but in one commit for easy viewing :) , in the old branch ReSharper went a bit crazy (reformated a few files) so reverted it to master then manually merged some of the changes.
    Here's a list for changelog:

    - Included AudioSwitcher API for device and volume control
    - Volume control now listens on same device as Audio Renderer, handled in filter events as this looked like like the best place for a catch all
    - On a audio device disconnected state we check if it was indeed our Audio Renderer device where we started playback with and if so stop if user has setting "stopOnAudioRenderLoss"
    - Enumeration of audio devices in Mediaportal application -> Mediaportal.cs updated to use AudioSwitcher
    - Reworked mixer and volume handler completely and made it much simpler and faster (async + less hops in code), optionally allows for further expansion but think it's a good start

    Did leave some stuff in mixer and volume handler for legacy purposes in case some external plugins calls specific parts, for sure needs thorough testing as this is a pretty important part of Mediaportal.
    So maybe for 1.17 unless you guys think we have enough time to test it properly :)
     
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Includes all of the work but in one commit for easy viewing :) , in the old branch ReSharper went a bit crazy (reformated a few files) so reverted it to master then manually merged some of the changes.
    Here's a list for changelog:

    - Included AudioSwitcher API for device and volume control
    - Volume control now listens on same device as Audio Renderer, handled in filter events as this looked like like the best place for a catch all
    - On a audio device disconnected state we check if it was indeed our Audio Renderer device where we started playback with and if so stop if user has setting "stopOnAudioRenderLoss"
    - Enumeration of audio devices in Mediaportal application -> Mediaportal.cs updated to use AudioSwitcher
    - Reworked mixer and volume handler completely and made it much simpler and faster (async + less hops in code), optionally allows for further expansion but think it's a good start

    Did leave some stuff in mixer and volume handler for legacy purposes in case some external plugins calls specific parts, for sure needs thorough testing as this is pretty big part of Mediaportal.
    So maybe for 1.17 unless you guys think we have enough time to test it properly :)

    Nice nice work :)
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Should be there now, did have some issues with NuGet trying to update all projects even though I only selected Mediaportal.Application / Mediaportal.Core.
    So didn't commit those for that reason as it could mess up some things :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    The branch failed to compile so missing something else :p
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Probably missing app.conf, in Mediaportal.Application by any chance?
    Can commit all changes but it added app.conf in other un-related projects when I added the nuget package :)
     

    Users who are viewing this thread

    Top Bottom