BASS player does not reinitialize sound device

Discussion in '1.2.x' started by JBravo, December 19, 2011.

  1. JBravo
    • Premium Supporter

    JBravo MP Donator

    Joined:
    November 11, 2007
    Messages:
    269
    Likes Received:
    27
    Occupation:
    Software Architect
    Ratings:
    +27 / 0
    Home Country:
    Sweden Sweden
    MediaPortal Version: 1.1.3
    MediaPortal Skin: StreamedMP
    Windows Version: Windows 7
    CPU Type: Intel Pentium Dualcore E5200
    HDD: Not enough
    Memory: DDRII 4GB
    Motherboard: ASUS P5N7A-VM
    Video Card: Geforce 9300 mGPU
    Video Card Driver: -
    Sound Card: -
    Sound Card AC3: -
    Sound Card Driver: -
    1. TV Card:
    1. TV Card Type:
    1. TV Card Driver:
    2. TV Card: Twinhan Mantis 3030
    2. TV Card Type: DVB-T
    2. TV Card Driver: 1.1.0.400
    3. TV Card: Twinhan Mantis 3030
    3. TV Card Type: DVB-T
    3. TV Card Driver: 1.1.0.400
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec:
    MPEG2 Audio Codec:
    h.264 Video Codec: -
    Satelite/CableTV Provider: Boxer
    HTPC Case:
    Cooling:
    Power Supply:
    Remote: -
    TV: Sony 52" LCD
    TV - HTPC Connection: HDMI




    In short;
    When playing music and LCD-tv is set to standby the audio is lost. HTPC is connected to LCD-tv via AVR through HDMI. When the LCD is powered on again it's not possible to start playback. For every file I want to open it says that he cannot play the selected file. MP needs to be restarted to recover.

    See the following thread for details;
    https://forum.team-mediaportal.com/listen-music-99/bass-player-does-not-reinitialize-sound-device-90300/

    The logs;
    https://forum.team-mediaportal.com/listen-music-99/bass-player-does-not-reinitialize-sound-device-90300/index3.html#post774637

    Some notes to the logs;
    The logs indicate "windowed mode" when turning on/off lcd, however I was running in fullscreen mode the whole time.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. IchBinsShort

    IchBinsShort Portal Pro

    Joined:
    January 3, 2008
    Messages:
    682
    Likes Received:
    52
    Ratings:
    +54 / 2
    Home Country:
    Germany Germany
    Show System Specs
    AW: BASS player does not reinitialize sound device

    Yes I have the Problem too. I use Mediaportal 1.2.1.
     
  4. JBravo
    • Premium Supporter

    JBravo MP Donator

    Joined:
    November 11, 2007
    Messages:
    269
    Likes Received:
    27
    Occupation:
    Software Architect
    Ratings:
    +27 / 0
    Home Country:
    Sweden Sweden
    Same problem in MP1.2.1 here as well, I have included new logs.


    Step by step:
    1) Start MP
    2) Select a track (AC-DC Back in Black)
    3) Play for 30s
    4) Set tv to standby. AC-DC recovers and keeps performing after about 10-15s. The AVR (NADT785HD) indicates HDMI handshake.
    5) Play for about 60s
    6) Turn on tv. The AVR (NADT785HD) indicates HDMI handshake.
    7) AC-DC stops rockin'. (The logs also indicates "Main: OnSizeChanged - Resetting device" x2. Related to https://forum.team-mediaportal.com/operating-system-330/windows-7-half-fullscreen-71785/. In this case MP successfully recovers, I occasionally notice this issue, switching to window mode and then back to full screen (alt-enter) usually recovers MP.)
    8) Not possible to start play back again.

    To recover it's actually possible to start a movie and then go back to My Music and then start playback.
     
  5. JBravo
    • Premium Supporter

    JBravo MP Donator

    Joined:
    November 11, 2007
    Messages:
    269
    Likes Received:
    27
    Occupation:
    Software Architect
    Ratings:
    +27 / 0
    Home Country:
    Sweden Sweden
    Re: [CONFIRM] BASS player does not reinitialize sound device

    Did some more thinking and testing related to this.

    When the tv is turned on/off it windows states that the audio device is lost, the device directly reappears (logged in remotely via VNC, Control Panel - Hardware and Sound - Manage Audio Devices - Nvidia HDMI audio selected).

    I actually becoming to think that the root cause is the same as the infamous Windows 7 & halfscreen bug. When a display is lost (turned off in this case) windows 7 tries to detect other displays. In my case it finds the onboard VGA display (not connected) and then returns to HDMI. This toggling of display devices also causes the HDMI audio to be lost.

    When trying to play a track after turning tv on/off, the logs indicate "Reason: BASS_ERROR_HANDLE." and "Reason: BASS_ERROR_UNKNOWN.". BASS audio has obviously lost the handle to the audio device.

    Playing a movie and then return to music causes the BASS audio to be reinitialized, and then it's possible to resume playback.

    I can't see that this problem can be solved completly within MP, since the monitor dection seems to be a feature. Accordning to this thread the behaviour is by design and is not possible to disable;
    Disable 'Monitor Off' detection, how?

    However when BASS audio returns an error, MP should be able to reinitialize BASS audio without too much effort and playback should be able to resume.
     
  6. mba

    mba Portal Pro

    Joined:
    September 16, 2005
    Messages:
    129
    Likes Received:
    4
    Gender:
    Male
    Location:
    Aarhus
    Ratings:
    +4 / 0
    Home Country:
    Denmark Denmark
    Re: [CONFIRM] BASS player does not reinitialize sound device

    I also still have this issue, I have gotten used to start tv before playing music in order to reset the audio device, but my girlfriend still have trouble sometimes remembering this feature :)

    Maybe it was something that could be looked at during 0003695: [Music] Rework BASS implementation (hwahrmann) - assigned. ?

    Best regards
    Martin
     
  7. JBravo
    • Premium Supporter

    JBravo MP Donator

    Joined:
    November 11, 2007
    Messages:
    269
    Likes Received:
    27
    Occupation:
    Software Architect
    Ratings:
    +27 / 0
    Home Country:
    Sweden Sweden
    Re: [CONFIRM] BASS player does not reinitialize sound device

    I did take a quick look at the BASS implementation (BassAudio.cs), think it would be possible to reintialize Bass (call FreeBass(), and then BassInit()) when IPlayer.Play(..) is called and Bass fails to create the stream. Unfortunately I don't have the Dev environment set up, and I'm running out on HDD...

    I can't see that MP get any notifications from Bass indicating that the device was lost or playback stopped.

    However, I hwahrmann is doing changes to BASS implementation, I think I leave this one to the proffessionals... By the way feel free to add WASAPI support as well :)
     
  8. Ben Eastment

    Ben Eastment New Member

    Joined:
    November 17, 2012
    Messages:
    1
    Likes Received:
    1
    Gender:
    Male
    Ratings:
    +1 / 0
    Home Country:
    Australia Australia
    I too have this exact same issue, currently using MP 1.3, but issue was present on the previous version as well.

    All other audio (movies, tv, etc) works fine, but playing music with BASS player gives an error after my AVR is switched off and on again (or changes to a different input and back again), or if the TV is switched on (can switch it off and music keeps playing). HTPC is connect to AVR via HDMI (nvidia), AVR to TV via HDMI. If I play a movie or tv after the error happens, it seems to kick start the BASS player and I'm back in action, but yes the Wife Acceptance Factor has taken a serious hit.

    Also tried blocking pin 19 on the HDMI cable, and replacing BASS files with the latest official ones from the BASS website, but no luck.

    Using external player plugins (e.g. pureaudio, winamp) everything works fine, but then I lose visualisations (which I'm very reluctant to let go of).

    I was disappointed to see this problem has been around for over a year now, and no resolution. Has anyone found a workaround yet?
     
    • Like Like x 1
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!