Closed
Bug 1023783
Opened 11 years ago
Closed 7 years ago
[Flame][V1.4][Music]The songs will play by loudspeaker when there is a headset insert.
Categories
(Firefox OS Graveyard :: AudioChannel, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: panda67231, Assigned: rlin)
Details
(Whiteboard: bamboo)
Attachments
(4 files)
[1.Description]:
Play FM by loudspeaker, launch music to play songs, the songs will play by loudspeaker.
Attach the video:[ Music2.3gp]
Attach the logs: [bugreport_Music2.txt& logcat_Music2.txt]
Happened time:2:00PM
[2.Testing Steps]:
Precondition: insert headset
1. Launch FM and play a channel.
2. Tap loudspeaker icon to make voice to phone.
3. Launch music and play a song.
[3.Expected Result]:
3. The music voice should be played by headset.
[4.Actual Result]:
3. The music voice is played by loudspeaker.
Notes: Please hear the voice about attachment Music2.mp4
[5.Reproduction build]:
Gaia 7709936aeb21859d1607dbd038489493803bb085
Gecko https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/rev/5bf038fae0f1
BuildID 20140522160202
Version 30.0
[6.Reproduction Frequency]:
Always Recurrence,5/5
| Reporter | ||
Comment 1•11 years ago
|
||
| Reporter | ||
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
Hi Dominic,
I think it should be expected behavior, could you please confirm where the sound will be played on when user play the music while FM radio is played on speaker?
Flags: needinfo?(dkuo)
Comment 4•11 years ago
|
||
(In reply to Hubert Lu[:hlu] <hlu@mozilla.com> from comment #3)
> Hi Dominic,
> I think it should be expected behavior, could you please confirm where
> the sound will be played on when user play the music while FM radio is
> played on speaker?
It should be, but let's have ux people to comment on it, Jacqueline, would you please give some inputs on this? thanks.
Flags: needinfo?(dkuo) → needinfo?(jsavory)
Comment 5•11 years ago
|
||
Yes, I definitely agree that the expected behaviour is correct. I think the FM radio loudspeaker should work only for FM radio, it might get confusing if users have to return to FM radio to turn off loudspeaker.
Flags: needinfo?(jsavory)
Comment 6•11 years ago
|
||
For description in comment 5, FM radio loudspeaker should work only for FM radio, and music sound should be played on headset in the condition described in comment 0.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 7•11 years ago
|
||
My first idea is to disable the loudspeaker when the audio in FM radio gets interrupted, but currently I think we are unable to fix this cause the FM radio does not use an audio element to play the sounds.
I don't know if it's possible to let the mozFM know it's being interrupted, Randy, do you have any idea or anyone can answer this? thanks.
Flags: needinfo?(rlin)
| Assignee | ||
Comment 8•11 years ago
|
||
It sounds like a bug.
Refer to
https://wiki.mozilla.org/WebAPI/SpeakerManager
*If an app that has called forcespeaker=true, and audio is currently playing in the app itself, is switched to the background 'speakerforced' remains true in all apps. If/when the app stops playing audio, 'speakerforced' switches to false in all apps.
I will study this issue later.
Assignee: nobody → rlin
Flags: needinfo?(rlin)
| Assignee | ||
Comment 9•11 years ago
|
||
The idea is notifying speakerManager to switch off speaker if where is no audible channel used in the process.
Attachment #8469873 -
Flags: review?(amarchesini)
Comment 10•11 years ago
|
||
Comment on attachment 8469873 [details] [diff] [review]
patch v1
Review of attachment 8469873 [details] [diff] [review]:
-----------------------------------------------------------------
I understand what you want to do, but this is the wrong approach.
What I suggest is to implement:
bool AnyAudioChannelIsActiveForChildID(uint64_t aChildID) {
for (int i = AUDIO_CHANNEL_INT_LAST - 1;
i >= AUDIO_CHANNEL_INT_NORMAL; --i) {
if (mChannelCounters[i].Contains(aChildID)) {
return false;
}
}
return true;
}
and expose it to AudioChannelServiceChild using IPC. Check how AudioChannelGetState is implemented in PContent.ipdl.
::: dom/audiochannel/AudioChannelService.cpp
@@ +102,5 @@
> // To monitor the volume settings based on audio channel.
> obs->AddObserver(this, "mozsettings-changed", false);
> #endif
> }
> }
new line
@@ +105,5 @@
> }
> }
> + for (int i = AUDIO_CHANNEL_INT_LAST - 1;
> + i >= AUDIO_CHANNEL_INT_NORMAL;
> + mChannelState[i--] = AUDIO_CHANNEL_STATE_MUTED);
Please, write it like this:
for (int i = AUDIO_CHANNEL_INT_LAST - 1; i >= AUDIO_CHANNEL_INT_NORMAL; --i) {
mChannelState[i] = AUDIO_CHANNEL_STATE_MUTED;
}
@@ +209,5 @@
>
> if (data) {
> UnregisterType(data->mChannel, data->mElementHidden,
> CONTENT_PROCESS_ID_MAIN, data->mWithVideo);
> + mChannelState[GetInternalType(data->mChannel, false)] = AUDIO_CHANNEL_STATE_MUTED;
move this to UnregisterType. Then... why this has to be muted?
What about if we have 2 'normal' audio elements playing at the same time?
@@ +345,5 @@
> data->mElementHidden = aElementHidden;
>
> data->mState = GetStateInternal(data->mChannel, CONTENT_PROCESS_ID_MAIN,
> aElementHidden, oldElementHidden);
> + mChannelState[GetInternalType(data->mChannel, false)] = data->mState;
This should be moved into GetStateInternal otherwise you are ignoring the apps running in child processes.
Then, maybe we are muting this app, but not all the audio elements of the same type.
Attachment #8469873 -
Flags: review?(amarchesini) → review-
Updated•10 years ago
|
Component: Gaia::Music → AudioChannel
Comment 11•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•