Music Player Rework (1 Viewer)

Status
Not open for further replies.

hwahrmann

Development Group
  • Team MediaPortal
  • September 15, 2004
    4,633
    2,457
    Vienna, Austria
    Home Country
    Austria Austria
    @hwahrmann

    1) I have pinpointed the code which is causing trouble with Rockstar

    BassAudioEngine.Initialize() calling Bass.BASS_Init(0, 48000, 0, IntPtr.Zero, Guid.Empty)
    BassAudioEngine.InitBass() calling Bass.BASS_Init(0, 48000, 0, IntPtr.Zero, Guid.Empty

    If either of these lines are executed, Rockstar is only able to play one song until MP is restarted. I'm not sure why this is but it would be nice to get this properly fixed.

    EDIT: More progress

    After first playback starts, Bass.BASS_GetDevice() returns "1" which is correct device and everything works fine. But when playback is stopped, GetDevice returns "0" which is the "no sound device" initialized by above and the second playback won't work.

    Then, if I use Bass.BASS_SetDevice(1) before playback, everything works fine. The problem with this is that this is an ugly hack and I don't actually know which device should be used (which device is actually the initialized one).

    I'm not sure why switch to "0 no sound device" is done and where. Also I'm not sure why this no sound device should be initialized at all in MediaPortal?

    2) Current BassAudioEngine code has few glitches
    - Bug: if (Config.SoundDevice == "Default Sound Device") should be "Default DirectSound Device" at least in my system
    - BassRegistration.BassRegistration.Register(); is called twice
    - _initialized = true; is called twice (not sure if this is a bug)

    I need the "No Sound" Device, because ASIO and WASAPI have their own init.
    In RockStar you use the DirectSound Device. So if you have selected BASS Player and set the sounddevice in MP Config, then InitBass should select the right device.

    Are you doing something in addition to what is shown ion your Stop Method? e.g. Freeing BASS?
    Device Number #1 is always the default sound device set in the mixer
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    In case you hadn't all noticed, @hwahrmann has linked a new build from the first post.

    Please get this tested, particularly checking if any bugs you found are fixed. The sooner all confirmed bugs are fixed, the sooner we can get this merged to master, and when we do that, we will be 75% of the way to 1.4.0 (subject to testing)! MediaPortal 1.4.0 will not take as long as 1.3.0 did, and there will be some nice improvements in there!
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom