File: modutils.h

package info (click to toggle)
gnusound 0.6.2-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,488 kB
  • ctags: 1,778
  • sloc: ansic: 21,146; sh: 2,505; xml: 527; makefile: 171; perl: 157
file content (88 lines) | stat: -rw-r--r-- 1,742 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/* 
 * Copyright (C) 2002,2003 Pascal Haakmat.
 * Licensed under the GNU GPL.
 * Absolutely no warranty.
 */

#ifndef MODUTILS_H
#define MODUTILS_H

#include <audiofile.h>
#include <config.h>
#include "mem.h"
#include "module.h"
#include "shell.h"
#include "snd.h"
#include "gui.h"
#include "action.h"
#include "iterator.h"

#define RESAMPLE_BEST_ALGORITHM 0
#define HONOR_ENVELOPES 1
#define GUARANTEE_NEW_FRAME_COUNT 1

const char *
dirname(const char *s);

void
mix(shell *target_shell,
    int target_channel,
    AFframecount target_offset,
    snd *source_sr,
    int source_channel,
    AFframecount source_offset,
    AFframecount source_end_offset);

const char *
resample_algo_name(int algo);

const char *
resample_algo_description(int algo);

/*
 * Returns new number of frames written (length may be modified by
 * envelopes!).
 */
AFframecount
resample(shell *shl,
         int track,
         AFframecount start_offset,
         AFframecount end_offset,
         AFframecount new_frame_count,
         int algo,
         int honor_envelopes,
         int guarantee_new_frame_count);

void
reverse(shell *shl,
        int track,
        AFframecount start_offset,
        AFframecount end_offset);

void
amplify(shell *shl,
        int track,
        AFframecount start_offset,
        AFframecount end_offset,
        double factor,
        double slope);

int32_t
find_peak(shell *shl,
          int track,
          AFframecount start_offset,
          AFframecount end_offset);

action_group *
fade(shell *shl, 
     int undo,
     double factor,
     double slope);

AFframecount
find_zero(shell *shl,
          int track,
          AFframecount start_offset,
          AFframecount end_offset);

#endif /* ! MODUTILS_H */