Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Software mixer

Re: Software mixer

From: Tapio Kelloniemi <spammi.helevetti_at_nbl.fi>
Date: Mon, 23 Nov 2009 01:44:49 +0200

On Sun, Nov 22, 2009 at 11:11:52PM +0100, Thomas Martitz wrote:
> On 22.11.2009 20:28, Jeff Goode wrote:
> >
> >I proposed that pcmbuf be rewritten to allow multiple input
> >streams to be queued up independently and non-destructively mixed
> >in real time. But there was some concern that this would cost
> >memory and CPU time resources for little gain.

I'm completely for the rewrite. I think this would make the code more clearer.

> Let me clarify my concerns once more: I'm not remotely concerned
> with pcmbuf being rewritten for multiple streams or the like. That
> would fix the strange situation that voice doesn't play with audio
> paused.

IMHO this is not a major problem. I my self do use voice, but I feel it is
pretty easy to stop playback instead of pausing it. I prefer a solution that
is not yet another hack to support simultaneous music/voice output and a
solution that is modular, elegant and allows future extensions and interesting
new features. Slightly increased CPU/memory usage is not a major concern to
me.

> I'm just skeptical about the "non-destructive" bit, which is (as
> far as I understood) only there to have the voice play on in the
> moment of stopping/pausing/resuming playback (it means that the
> streams can be decoupled/restored again after being mixed
> together).

In my opinion it would be nice that the main audio stream would not receive
any special treatment, see below.

> I expect that (voice playing while changing playback state) to be a
> very rare situation. We probably wouldn't need non-destructive at
> all mixing if we ignored that rare case (the other imaginary
> streams will probably only be active when audio is playing too,
> unless someone wants fancy sound effects on voice(?)).

Not necessarily on the voice, but perhaps on it as well. I could easily
imagine sound effects related to the user interface and especially plugins.
This would make plugins' audio usage considerably easier - now there are very
few plugins that produce sound themselves (quite strange as we are dealing
with plugins for DAP software).

When talking about supporting simultaneous voice and music output, I think
that the most annoying problem at the moment is that since voice is mixed with
codec audio too early, the voice is almost useless while playing music since
it cannot be interrupted, and a message cannot be replaced by another.

-- 
Tappi-AUra

Received on 2009-11-23

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa