[Asterisk-code-review] audiohook.c: Difference in read/write rates caused continuou... (asterisk[11])

Joshua Colp asteriskteam at digium.com
Thu May 14 07:32:06 CDT 2015


Joshua Colp has posted comments on this change.

Change subject: audiohook.c: Difference in read/write rates caused continuous buffer resets
......................................................................


Patch Set 2: Code-Review-1

I think what's still missing here is a higher level idea of how native sample rates should work for audiohooks. I've spent some time this morning thinking about it and here's what I've come up with:

1. The list internal sample rate is the highest sample rate among all audiohooks
2. Each audiohook has its own internal sample rate that it is operating at
3. For spy type the format given to ast_audiohook_read_frame / ast_audiohook_read_frame_all determines the audiohook sample rate
4. For whisper type the format given to ast_audiohook_write_frame determines the audiohook sample rate
5. For manipulate type the format returned from the manipulate callback determines the audiohook sample rate
6. The list internal sample rate can change depending on format changes
7. If native_slin_compatible is enabled the frames passing through the core are taken into account

As a result of this I would expect that the re-evaluation of the list internal sample rate would take place in the spots listed in 3, 4, and 5 and not in the list execution.
I would also expect that when an audiohook is removed the highest sample rate is re-evaluated and updated.

Just an additional note... since the sample rate of the read path and sample rate of the write path may differ it may be prudent to store those separately and treat them separately.

How does this jive with what you've learnt through this patch?

-- 
To view, visit https://gerrit.asterisk.org/462
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idab4dfef068a7922c09cc631dda27bc920a6c76f
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list