nsRemotedAudioStream::Write is non-blocking

RESOLVED FIXED in mozilla16

Status

()

Core
Audio/Video
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: kinetik, Assigned: kinetik)

Tracking

Trunk
mozilla16
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:+)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
nsAudioStream consumers expect Write to block when the backend audio buffer is full, and rely on this behaviour to put audio refill threads to sleep until buffer space becomes available.

nsRemotedAudio's Write does not block, and currently has no knowledge of how full the audio stream's buffers it is remoting to actually are.
(Assignee)

Updated

6 years ago
Blocks: 695986
(Assignee)

Comment 1

6 years ago
I don't plan to work on this anytime soon.  The NativeUI Fennec project for Android is single process, which means we can use sydneyaudio (and future audio APIs) directly without the remoted nsAudioStream.
(Assignee)

Comment 2

6 years ago
So I don't forget: Oleg's media bridge patch in bug 598868 is useful for pointers on how to do  non-main-thread IPC bridging, which would make fixing this bug much simpler by allowing Write() to be an synchronous inter-audio-thread call.
(Assignee)

Updated

6 years ago
No longer blocks: 695986
(Assignee)

Updated

5 years ago
Blocks: 695986
This would be quite easy to do.  We might want this for b2g.
Blocks: 745143

Updated

5 years ago
blocking-basecamp: --- → +
(Assignee)

Updated

5 years ago
Blocks: 766824
(Assignee)

Updated

5 years ago
Blocks: 761936
(Assignee)

Comment 4

5 years ago
Created attachment 638266 [details] [diff] [review]
patch v0

This is kind of a crummy fix, but we already use this technique to make Drain() blocking, so it's super simple to reuse it for Write.
Assignee: nobody → kinetik
Status: NEW → ASSIGNED
(Assignee)

Updated

5 years ago
Attachment #638266 - Flags: review?(chris.double)

Updated

5 years ago
Attachment #638266 - Flags: review?(chris.double) → review+
(Assignee)

Comment 5

5 years ago
I spun off bug 770753 for reworking the PAudio protocol to avoid shunting everything through the main threads of each process (which I mentioned in comment 2 in thus bug).
(Assignee)

Comment 6

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/f39b9c98ab14
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/f39b9c98ab14
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

5 years ago
Duplicate of this bug: 766824

Updated

5 years ago
Duplicate of this bug: 768272
You need to log in before you can comment on or make changes to this bug.