Play sound effect in XBMC
#1
Music 
My XBMC setup is in my basement. I often find when watching a movie or listening to music that I cannot hear the doorbell. So, I set out to fix this issue. I have built a doorbell from a RasPi which works perfectly and can send a signal to my XBMC machine (running on ubuntu 12.10). I want XBMC to
  • Pause what is playing
  • Display a notification
  • Play a doorbell sound
I wrote the script and the first two are fairly easy. I have been having problems playing the sound. I cannot find anyway to play the sound effect without stopping whatever is currently playing.

I have written a fairly messy workaround which
  • Grabs the current position of what is playing
  • Stops playback
  • Plays the doorbell sound effect
  • Reopens the previous item
  • Sets the position to where it was before
  • And pauses it so I can go to the door

This is hardly ideal though. The screen jumps back to the menu after playback is stopped and then when it reopens it is at a black screen because it hasn't yet played a frame. I would much prefer a way to play a sound effect once playback has been paused. Maybe the same way the menu clicks work?

If anyone has any ideas I would appreciate it.
Reply
#2
http://mirrors.xbmc.org/docs/python-docs...l#-playSFX

Does that interrupt your playback?
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
I can't believe I missed that. It looks perfect. I will try it this evening.

Thank you very much.
Reply
#4
Keep in mind it use to only support certain wav files. That may have changed.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
Play sound effect in XBMC0