Music app stops playing when an app plays a sound

Bug #1366586 reported by webtitekt
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Dropping Letters
Fix Released
Undecided
Victor Thompson
Media Hub
Invalid
Undecided
Unassigned
Ubuntu Clock App
Fix Released
Low
Victor Thompson
Ubuntu Music App
Invalid
Undecided
Unassigned
camera-app
Invalid
Undecided
Unassigned
qtubuntu-camera (Ubuntu)
Fix Released
Undecided
Ricardo Salveti

Bug Description

on rtm rev 27 music is paused when taking a photo

Related branches

Revision history for this message
Victor Thompson (vthompson) wrote :

Media-hub, the service that handles audio used in the system, recently added the capability to categorize the type of audio being played. If all the following are true the existing audio stream is paused:

1. New audio stream is of the type "multimedia" (note this is the default category)
2. Existing audio stream is playing
3. Existing audio stream is also of the type "multimedia"

I imagine there are many apps that have small sound effects that shouldn't be categorized as "multimedia". With the way media-hub works now any app that uses an alert or small sound effect would need to have the sound recategorized. Would it make more sense for the default to be "alert" or something similar and then just have apps like the Music app specify that they are of type "multimedia"? That would make this categorization easier on other apps, but would require a fix to the music app and media-hub.

Revision history for this message
Victor Thompson (vthompson) wrote :

Or alternatively, a more complex solution might be to unpause the original stream once the new audio stream reports a status of EndOfMedia

Revision history for this message
Jim Hodapp (jhodapp) wrote :

No, the default audio role is of type multimedia because that is the default because it's the default volume group that is controlled if no other context is active. It shouldn't be a big deal to get the core apps to change to be of their proper types. Obviously we need to get the camera-app to change its role. I'll make sure a bug is filed for this in camera app.

summary: - Music app stopps playing when taking a photo
+ Music app stops playing when taking a photo
Changed in media-hub:
status: New → Invalid
Changed in music-app:
status: New → Invalid
Revision history for this message
Jim Hodapp (jhodapp) wrote : Re: Music app stops playing when taking a photo

@Florian: camera-app should categorize the camera click sound as role type "alert". Add the following QML code to do this:

In the Audio element's properties, add:

Audio {
  audioRole: MediaPlayer.alert
}

Jim Hodapp (jhodapp)
Changed in camera-app:
status: New → Invalid
Changed in qtubuntu-camera:
assignee: nobody → Ricardo Salveti (rsalveti)
importance: Undecided → Critical
Changed in qtubuntu-camera (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
affects: qtubuntu-camera → ubuntu
no longer affects: ubuntu
Changed in qtubuntu-camera (Ubuntu):
assignee: nobody → Ricardo Salveti (rsalveti)
summary: - Music app stops playing when taking a photo
+ Music app stops playing an app plays a sound
Changed in ubuntu-clock-app:
status: New → In Progress
assignee: nobody → Victor Thompson (vthompson)
importance: Undecided → Low
Jim Hodapp (jhodapp)
summary: - Music app stops playing an app plays a sound
+ Music app stops playing when an app plays a sound
Changed in ubuntu-clock-app:
milestone: none → rtm
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-clock-app at revision 93, scheduled for release in ubuntu-clock-app, milestone rtm

Changed in ubuntu-clock-app:
status: In Progress → Fix Committed
Revision history for this message
Sam Bull (dreamsorcerer) wrote :

If this remains the default, then every 3rd party app that misses this setting is going to cause the same problem whenever they choose to play a sound, which will be rather irritating. Note that this also happens everytime a notification sounds due to a text message or similar.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

@Sam Bull: yes, but that would be a bug with the given app that should be fixed. As far as a text message goes, it should no longer pause playback when it comes in...it should instead cause the playback volume to decrease during the alert, then increase back to full volume (called the duckin effect in pulse audio terminology).

Revision history for this message
Sam Bull (dreamsorcerer) wrote :

Yes, but my point is that if developers miss the documentation, and don't set this setting, it shouldn't cause disruption to the whole platform, which is what will currently happen.

If alerts is the default, then a developer not selecting multimedia for their app will only disrupt their own app, and will more likely be caught and fixed.

Currently, not changing the setting to alerts cause the developers app to work perfectly fine, but causes the rest of the platform to suffer as it cuts off music etc. Somebody with less familiarity with the platform will likely register bugs against the music-app or the platform, as it appears that the music is not functioning, thus further reducing the chances of the guilty app getting fixed.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

There's no perfect solution in here, with whatever default role we pick. The main problem is that we currently can only have on active multimedia stream at a time, and that was a workaround until the background playlist stuff gets finished.

We need to improve/fix the documentation to make sure that this gets covered by all apps, so they can at least know better what to do when playing something.

Changed in dropping-letters:
assignee: nobody → Victor Thompson (vthompson)
status: New → In Progress
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:dropping-letters at revision 61, scheduled for release in dropping-letters, milestone Unknown

Changed in dropping-letters:
status: In Progress → Fix Committed
Changed in dropping-letters:
status: Fix Committed → Fix Released
Changed in ubuntu-clock-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.