kwave  18.07.70
Functions.cpp File Reference
#include "config.h"
#include <math.h>
#include <QString>
#include <KLocalizedString>
#include "libkwave/Functions.h"
#include "libkwave/String.h"
Include dependency graph for Functions.cpp:

Go to the source code of this file.

Functions

static double rect (double param)
 
static double sin2 (double param)
 
static double sin3 (double param)
 
static double saw (double param)
 
static double sawinv (double param)
 
static double tri (double param)
 
static double zero (double)
 

Function Documentation

◆ rect()

static double rect ( double  param)
static

◆ saw()

static double saw ( double  param)
static

Definition at line 52 of file Functions.cpp.

Referenced by Kwave::Functions::FunctionTypesMap::fill(), and Kwave::RecordPlugin::split().

53 {
54  double div = param / (2 * M_PI);
55  param -= (floor(div) * (2 * M_PI));
56  param /= M_PI;
57  param -= 1;
58  return param;
59 }
Here is the caller graph for this function:

◆ sawinv()

static double sawinv ( double  param)
static

Definition at line 62 of file Functions.cpp.

Referenced by Kwave::Functions::FunctionTypesMap::fill().

63 {
64  double div = param / (2 * M_PI);
65  param -= (floor(div) * (2 * M_PI));
66  param = 2 * M_PI - param;
67  param /= M_PI;
68  param -= 1;
69  return param;
70 }
Here is the caller graph for this function:

◆ sin2()

static double sin2 ( double  param)
static

Definition at line 38 of file Functions.cpp.

Referenced by Kwave::Functions::FunctionTypesMap::fill().

39 {
40  double y = sin(param);
41  return y*y;
42 }
Here is the caller graph for this function:

◆ sin3()

static double sin3 ( double  param)
static

Definition at line 45 of file Functions.cpp.

Referenced by Kwave::Functions::FunctionTypesMap::fill().

46 {
47  double y = sin(param);
48  return y*y*y;
49 }
Here is the caller graph for this function:

◆ tri()

static double tri ( double  param)
static

Definition at line 73 of file Functions.cpp.

Referenced by Kwave::Functions::FunctionTypesMap::fill().

74 {
75  param += M_PI / 2;
76  double div = param / (2 * M_PI);
77  param -= (floor(div) * (2 * M_PI));
78  if (param > M_PI) return (((param -M_PI) / M_PI)*2)-1;
79  return (((M_PI -param) / M_PI)*2)-1;
80 }
Here is the caller graph for this function:

◆ zero()

static double zero ( double  )
static

Definition at line 83 of file Functions.cpp.

Referenced by Kwave::Functions::function(), Kwave::NoiseDialog::updateDisplay(), and Kwave::WavEncoder::writeInfoChunk().

84 {
85  return 0.0;
86 }
Here is the caller graph for this function: