~ubuntu-branches/ubuntu/oneiric/oss4/oneiric-proposed

« back to all changes in this revision

Viewing changes to tutorials/sndkit/sblive/vu.mac

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Rivera
  • Date: 2011-06-16 20:37:48 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110616203748-jbrxik6ql33z54co
Tags: 4.2-build2004-1ubuntu1
* Merge from Debian unstable.
  - Supports our current kernel (LP: #746048)
  Remaining changes:
  - debian/oss4-dkms.dkms.in: s/source/build/ in Kernel headers paths.
* ld-as-needed.patch: Re-order CC arguments to enable building with ld
  --as-needed (LP: #770972)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 * This file is part of Open Sound System.
 
4
 *
 
5
 * Copyright (C) 4Front Technologies 1996-2008.
 
6
 *
 
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.
 
10
 *
 
11
 */
 
12
// VU meter computation macros
 
13
//
 
14
// Simple VU
 
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)