2
* Purpose: Local output buffer to device export routine for vmix (int)
6
* This file is part of Open Sound System.
8
* Copyright (C) 4Front Technologies 1996-2008.
10
* This this source file is released under GPL v2 license (no other versions).
11
* See the COPYING file included in the main directory of this source
12
* distribution for the license terms and conditions.
19
#define RANGE_MAX ((1<<24)-1)
20
#define RANGE_MIN -(1<<24)
22
vol = vmix_db_table[eng->outvol / 5];
24
for (ch = 0; ch < channels; ch++)
29
och = eng->channel_order[ch];
30
op = (SAMPLE_TYPE *) outbuf;
35
vu = eng->vu[och % 2];
38
for (i = 0; i < samples; i++)
44
tmp = (tmp * vol) / VMIX_VOL_SCALE;
47
* Check for clipping. Decrease volume if necessary.
63
*op = VMIX_BYTESWAP(INT_EXPORT(tmp));