We have moved to a new Sailfish OS Forum. Please start new discussions there.
25

Music playback is interrupted if a notification occurs while notification volume is muted

asked 2014-04-02 10:54:12 +0300

Tigre-Bleu gravatar image

updated 2014-07-25 14:04:51 +0300

jiit gravatar image

Description of problem:

When the phone is connected to headphone and playing music, if a notification occurs (sms reception for instance) the music is "overwritten" by the notification sound.

If the notification sound has a volume of zero in the settings, the music is still muted for the duration of the notification.

I suppose that the same thing happens if music is played via the speaker instead of headphones but I didn't try it.

Evolution proposal:

  • Music shall be paused during the notification sound if notification volume is greater than zero
  • Music shall not be interrupted if notification volume is zero
edit retag flag offensive close delete

Comments

At least this can be workarounded by setting the notification tone as "no tone". Then the music should not stop. At least for me it does not stop when using CuteSpotify.

matrixx ( 2014-04-17 15:01:23 +0300 )edit
1

While listening to music, instead of the notification sound, I’d like a beep just like what is played on receiving new message when message list for a contact is open in Messages App.

AliN ( 2015-06-10 19:28:27 +0300 )edit
1

Why pausing/muting anyways? I do not think it is necessary, I can keep on listening to the music or podcast (where interruption is really annoying) and still recognise there was some incoming message. Just play the notification sound on top and everything will be ok.

inta ( 2015-09-30 16:25:00 +0300 )edit

Is there a bug report for this? I couldn't find anything and I'm surprised that there aren't more people complaining, to me it's pretty annoying. Does anyone know if this is being worked on? (especially regarding the suggestion from the comment above)

ArmsOfSorrow ( 2016-03-26 18:30:21 +0300 )edit
3

I believe ideally this would be solved by slightly lowering the volume of the music, playing the notification, then raising the volume again. I've seen it work this way on other phones and as far as I'm concerned, it's a good compromise.

nthn ( 2017-01-08 19:13:15 +0300 )edit

1 Answer

Sort by » oldest newest most voted
8

answered 2017-01-07 23:20:56 +0300

ArmsOfSorrow gravatar image

updated 2017-01-08 20:52:02 +0300

Alright, since nobody replied to my comment, here's a solution to listen to music without being interrupted while the phone is not silent:

  • Open an ssh session to your device

  • Then:

    cd /usr/share/ngfd/events.d
    ls /usr/share/ngfd/events.d
    

    Now you see that there are lots of files for different system events. Some of those (e.g. chat_exists, email_exists, etc.) mute audio and some (e.g. unlock_device) don't.


devel-su

and type in the password you have set in developer options

  • Use vi or some other editor to open a file for an event that mutes audio playback, e.g.

    vi chat_exists.ini
    
  • Comment out these two lines by placing a '#' before them:

    sound.stream.media.role = notification
    sound.stream.droid.device.additional-route = AUDIO_DEVICE_OUT_SPEAKER
    
  • Restart your device or kill the ngfd process. It should restart automatically.


Is there any way to propose this behavior for upstream inclusion? I think it makes for a far better user experience if the user listens to music regularly.


EDIT: I've written a script that comments out the proper lines given a file from events.d. The original files are saved with a .bak extension in the same directory.

edit flag offensive delete publish link more

Comments

What does your solution do? Does it completely mute notification audio while music is playing?

nthn ( 2017-01-08 19:11:27 +0300 )edit

No, it plays the notification sound on top of the music. It doesn't lower the music volume (yet?), but, depending on the current ringtone volume, is very much audible.

ArmsOfSorrow ( 2017-01-08 19:28:02 +0300 )edit

Thanks, sounds good.

nthn ( 2017-01-12 14:16:33 +0300 )edit

Thank you very much! I have always been pissed by this behavior.

dr4Ke ( 2017-03-03 21:42:39 +0300 )edit
Login/Signup to Answer

Question tools

Follow
6 followers

Stats

Asked: 2014-04-02 10:54:12 +0300

Seen: 455 times

Last updated: Jan 08 '17