OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
gvUtil.h
1/*
2GameSpy Voice2 SDK
3Dan "Mr. Pants" Schoenblum
4dan@gamespy.com
5
6Copyright 2004 GameSpy Industries, Inc
7
8devsupport@gamespy.com
9http://gamespy.net
10*/
11
12#ifndef _GV_UTIL_H_
13#define _GV_UTIL_H_
14
15#include "gvMain.h"
16#include "gvCodec.h"
17
18// gets the volume for a set of samples
19GVScalar gviGetSamplesVolume(const GVSample * samplesPtr, int numSamples);
20
21// checks if any samples in the set are above the given threshold
22GVBool gviIsOverThreshold(const GVSample * samplesPtr, int numSamples, GVScalar threshold);
23
24// returns the lowest multiple of base that is >= value
25int gviRoundUpToNearestMultiple(int value, int base);
26// returns the highest multiple of base that is <= value
27int gviRoundDownToNearestMultiple(int value, int base);
28// rounds the multiple of base that is closest to value
29int gviRoundToNearestMultiple(int value, int base);
30
31// multiply or divide by bytes per millisecond
32int gviMultiplyByBytesPerMillisecond(int value);
33int gviDivideByBytesPerMillisecond(int value);
34
35#endif