3
* This file is part of Open Sound System.
5
* Copyright (C) 4Front Technologies 1996-2008.
7
* This this source file is released under GPL v2 license (no other versions).
8
* See the COPYING file included in the main directory of this source
9
* distribution for the license terms and conditions.
12
// VU meter computation macros
15
#define VU(vuvar, input) \
16
TSTNEG(VUTMP, input, input, 0);\
17
LIMIT(vuvar, vuvar, vuvar, VUTMP)
18
/* VU meter with volume scaling */
19
#define VUSCALE(vuvar, input, scale) \
20
MACS(VUTMP2, 0, input, scale) ;\
21
TSTNEG(VUTMP, VUTMP2, VUTMP2, 0);\
22
LIMIT(vuvar, vuvar, vuvar, VUTMP)
23
/* VU meter with volume scaling and summing with a 'base' signal */
24
#define VUSCALESUM(vuvar, basevar, input, scale) \
25
MACS(VUTMP2, basevar, input, scale) ;\
26
TSTNEG(VUTMP, VUTMP2, VUTMP2, 0);\
27
LIMIT(vuvar, vuvar, vuvar, VUTMP)