mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
these aren't the droids you're looking for, move along....
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6453 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -215,6 +215,27 @@ SWITCH_DECLARE(void) switch_generate_sln_silence(int16_t *data, uint32_t samples
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(uint32_t) switch_merge_sln(int16_t *data, uint32_t samples, int16_t *other_data, uint32_t other_samples)
|
||||
{
|
||||
int i;
|
||||
int32_t x, z;
|
||||
|
||||
if (samples > other_samples) {
|
||||
x = other_samples;
|
||||
} else {
|
||||
x = samples;
|
||||
}
|
||||
|
||||
for(i = 0; i < x; i++) {
|
||||
z = data[i] + other_data[i];
|
||||
switch_normalize_to_16bit(z);
|
||||
data[i] = (int16_t) z;
|
||||
}
|
||||
|
||||
return x;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_change_sln_volume(int16_t *data, uint32_t samples, int32_t vol)
|
||||
{
|
||||
|
Reference in New Issue
Block a user