Version 2.8.0 beta | Page 2

Discussion in 'ASIO music player' started by Symphy, January 26, 2014.

  1. Symphy
    • Team MediaPortal

    Symphy Retired Team Member

    Joined:
    August 25, 2007
    Messages:
    494
    Likes Received:
    132
    Gender:
    Male
    Occupation:
    Software Engineer
    Location:
    Groningen
    Ratings:
    +152 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    @Helios61
    Thanx for the logs. Good testing! Scrolling further down in your first log would have told me MP does play it correctly :)

    I think the problem is PureAudio not handling the 5.0 channellayout properly. It tries to initialize the WASAPI device to 5 channels which is probably not supported. Instead it should map to a 5.1 configuration.



    Hopefully i can find some time coming weekend to fix it!
     
    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Wiedmann

    Wiedmann Portal Pro

    Joined:
    June 22, 2007
    Messages:
    107
    Likes Received:
    12
    Ratings:
    +27 / 3
    Home Country:
    Germany Germany
    Fine, a step forward :)

    In a first test on my desktop (not htpc) WASAPI Exclusive is working, but not in Event mod (only Push). Of course this is normally working with my sound device. Maybe a problem with BASSWASAPIFormat?
    Code (Text):
    1. [2014-01-29 23:11:24,955] [Log    ] [PureAudio.Main] [INFO ] - Determined stream content type: PCM
    2. [2014-01-29 23:11:24,958] [Log    ] [PureAudio.Main] [DEBUG] - Starting session...
    3. [2014-01-29 23:11:24,959] [Log    ] [PureAudio.Main] [DEBUG] - BASSPlayer.ResetSessionState() called...
    4. [2014-01-29 23:11:24,961] [Log    ] [PureAudio.Main] [DEBUG] - Stream info: chans = 2, freq = 44100, origres = 0, ctype = BASS_CTYPE_STREAM_MP3
    5. [2014-01-29 23:11:24,965] [Log    ] [PureAudio.Main] [DEBUG] - Initializing WASAPI device: Lautsprecher (SoundMAX Integrated Digital HD Audio)...
    6. [2014-01-29 23:11:25,043] [Log    ] [PureAudio.Main] [INFO ] - Using WASAPI Device Lautsprecher (SoundMAX Integrated Digital HD Audio)
    7. [2014-01-29 23:11:25,047] [Log    ] [PureAudio.Main] [DEBUG] - Device info: outputs = 2, minrate = 8000, maxrate = 192000, latency = 50
    8. [2014-01-29 23:11:25,049] [Log    ] [PureAudio.Main] [DEBUG] - Creating new ringbuffer with 2000 ms delay...
    9. [2014-01-29 23:11:25,053] [Log    ] [PureAudio.Main] [DEBUG] - Creating sinkstream...
    10. [2014-01-29 23:11:25,058] [Log    ] [PureAudio.Main] [DEBUG] - Preparing mixerstream...
    11. [2014-01-29 23:11:25,059] [Log    ] [PureAudio.Main] [DEBUG] - Using 2 channels...
    12. [2014-01-29 23:11:25,059] [Log    ] [PureAudio.Main] [DEBUG] - Creating mixerstream...
    13. [2014-01-29 23:11:25,115] [Log    ] [PureAudio.Main] [DEBUG] - Plugging sinkstream into mixer...
    14. [2014-01-29 23:11:25,117] [Log    ] [PureAudio.Main] [DEBUG] - Mixing Matrix: matrix[0, 0] = 1
    15. [2014-01-29 23:11:25,118] [Log    ] [PureAudio.Main] [DEBUG] - Mixing Matrix: matrix[0, 1] = 0
    16. [2014-01-29 23:11:25,118] [Log    ] [PureAudio.Main] [DEBUG] - Mixing Matrix: matrix[1, 0] = 0
    17. [2014-01-29 23:11:25,119] [Log    ] [PureAudio.Main] [DEBUG] - Mixing Matrix: matrix[1, 1] = 1
    18. [2014-01-29 23:11:25,126] [Log    ] [PureAudio.Main] [DEBUG] - Creating WASAPI outputstream...
    19. [2014-01-29 23:11:25,128] [Log    ] [PureAudio.Main] [DEBUG] - Plugging mixerstream into outputmixer...
    20. [2014-01-29 23:11:25,130] [Log    ] [PureAudio.Main] [DEBUG] - Creating visualization stream...
    21. [2014-01-29 23:11:25,139] [Log    ] [PureAudio.Main] [DEBUG] - Initializing WASAPI handler...
    22. [2014-01-29 23:11:25,215] [Error  ] [PureAudio.Main] [ERROR] - PureAudio: _WASAPIHandler.Init failed: BASS_ERROR_UNKNOWN.
    23.  
    Must do a deeper look...

    About the source code:
    - The current Post/PreBuild - scripts doesn't work for me, because I have spaces in my paths. You have to quote these.
    - "High-End Music Player Plugin" is a good description. Should also be set in xmp2. And the current plugin requires MediaPortal 1.6.0, and not 1.2.0.

    Just look at my diff to get an idea.

    Update:
    On my HTPC with a different sound device event mode is also not working.
     

    Attached Files:

    • PureAudio.diff
      File size:
      6.5 KB
      Uploaded:
      January 29, 2014
      Views:
      135
    Last edited: January 30, 2014
  4. Symphy
    • Team MediaPortal

    Symphy Retired Team Member

    Joined:
    August 25, 2007
    Messages:
    494
    Likes Received:
    132
    Gender:
    Male
    Occupation:
    Software Engineer
    Location:
    Groningen
    Ratings:
    +152 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    @Wiedmann
    Thanx for your input. Even though you seem to be the only one with spaces in your development paths :), i can agree with your proposed changes, and will include them in the next release. May just remove the 1.2.0 dependency from the xmp2 though, doesn't seem functional.

    Have you verified the wasapi event mode of your audiodevices actually do work with other software like foobar? Not all devices support it...
     
  5. Symphy
    • Team MediaPortal

    Symphy Retired Team Member

    Joined:
    August 25, 2007
    Messages:
    494
    Likes Received:
    132
    Gender:
    Male
    Occupation:
    Software Engineer
    Location:
    Groningen
    Ratings:
    +152 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    @Helios61

    Could you test this for me? Should play 5.0 flacs correctly.
     

    Attached Files:

  6. Symphy
    • Team MediaPortal

    Symphy Retired Team Member

    Joined:
    August 25, 2007
    Messages:
    494
    Likes Received:
    132
    Gender:
    Male
    Occupation:
    Software Engineer
    Location:
    Groningen
    Ratings:
    +152 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Been playing around with event mode...
    On my onboard realtek device the combi exclusive/event doesn't work either. Shared/event does.
    On my esi maya44 both combi's work.
    Either the realtek doesn't support exclusive/event or there's a bug in the BASS lib. Not much i can do about it right now.
     
  7. Helios61
    • Team MediaPortal

    Helios61 Retired Team Member

    Joined:
    January 30, 2008
    Messages:
    4,587
    Likes Received:
    584
    Gender:
    Male
    Location:
    NRW
    Ratings:
    +897 / 4
    Home Country:
    Germany Germany
    Show System Specs
    Hi @Symphy !

    Thanks for your efforts, but unfortunately with the new version playback of this file doesn't start. Logs are attached.

    Best regards,
    Helios
     
  8. Symphy
    • Team MediaPortal

    Symphy Retired Team Member

    Joined:
    August 25, 2007
    Messages:
    494
    Likes Received:
    132
    Gender:
    Male
    Occupation:
    Software Engineer
    Location:
    Groningen
    Ratings:
    +152 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    @Helios61
    Thanx for the test. Did you run that test with event mode enabled or disabled? Could you send that file to me?
     
  9. Helios61
    • Team MediaPortal

    Helios61 Retired Team Member

    Joined:
    January 30, 2008
    Messages:
    4,587
    Likes Received:
    584
    Gender:
    Male
    Location:
    NRW
    Ratings:
    +897 / 4
    Home Country:
    Germany Germany
    Show System Specs
    @Symphy
    Please check PMin 5 Minutes! Event mode is enabled!
     
  10. Wiedmann

    Wiedmann Portal Pro

    Joined:
    June 22, 2007
    Messages:
    107
    Likes Received:
    12
    Ratings:
    +27 / 3
    Home Country:
    Germany Germany
    Ok, for me that's: "%VisualStudioDir%\Projects\MediaPortal\pureaudio-mediaportal-plugin"
    with "%VisualStudioDir%": "%USERPROFILE%\Documents\Visual Studio 2010"
    (and "%USERPROFILE%" is also having a space)

    With foobar it's working.


    This code is also working:
    Code (Text):
    1. using System;
    2. using System.Collections.Generic;
    3. using System.Linq;
    4. using System.Text;
    5.  
    6. using Un4seen.Bass;
    7. using Un4seen.BassWasapi;
    8. using Un4seen.Bass.AddOn.Mix;
    9.  
    10. namespace BassTest
    11. {
    12.     class Program
    13.     {
    14.         static void Main(string[] args)
    15.         {
    16.             try
    17.             {
    18.                 BassWasapiHandler _wasapi;
    19.  
    20.                 Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
    21.  
    22.                 int stream = Bass.BASS_StreamCreateFile("test.mp3", 0, 0, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT);
    23.  
    24.                 _wasapi = new BassWasapiHandler(Bass.BASS_GetDevice() - 1, true, true, 44100, 2, 0f, 0f);
    25.                 _wasapi.AddOutputSource(stream, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT);
    26.                 _wasapi.Init();
    27.                 _wasapi.Start();
    28.  
    29.                 Console.WriteLine("Press any key to exit");
    30.                 Console.ReadKey(false);
    31.             }
    32.             catch (Exception)
    33.             {
    34.                 Console.WriteLine(Bass.BASS_ErrorGetCode());
    35.             }
    36.         }
    37.     }
    38. }
    39.  
     
  11. Symphy
    • Team MediaPortal

    Symphy Retired Team Member

    Joined:
    August 25, 2007
    Messages:
    494
    Likes Received:
    132
    Gender:
    Male
    Occupation:
    Software Engineer
    Location:
    Groningen
    Ratings:
    +152 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Hi @Wiedmann ,

    What version of bass.net exactly are you using? The constructor overloads in 2.4.10.0 (which comes with MP) do not match the documentation that comes with 2.4.10.3. See intellisense.

    When using your code with 2.4.10.0, it doesn't use event mode as far as i can see. The following code will enable event mode:
    Code (Text):
    1. _wasapi = new BassWasapiHandler(Bass.BASS_GetDevice() - 1, true, true, true, 44100, 2, 0f, 0f);
    Apart from that, your errorhandling won't work.
    Only the BassWasapiHandler constructor throws exceptions, which disappear into nowhere in your catch.
    For all other methods and bass functions you need to look at the boolean return value and check BASS_ErrorGetCode when false.

    bass.net is giving me these 3 constructor overloads:
    Code (Text):
    1. public BassWasapiHandler(int device, bool exclusive, int freq, int chans, float buffer, float period);
    2. public BassWasapiHandler(int device, bool exclusive, bool sessionVol, int freq, int chans, float buffer, float period);
    3. public BassWasapiHandler(int device, bool exclusive, bool sessionVol, bool eventSystem, int freq, int chans, float buffer, float period);
     
    Last edited: February 1, 2014
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!