Gwion coverage report


Directory: src/
File: src/soundinfo.c
Date: 2023-01-30 18:32:28
Exec Total Coverage
Lines: 12 12 100.0%
Functions: 2 2 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 #include <gwion_util.h>
2 #include <soundinfo.h>
3
4 #ifndef GWION_DEFAULT_NIN
5 #define GWION_DEFAULT_NIN 2
6 #endif
7
8 #ifndef GWION_DEFAULT_NOUT
9 #define GWION_DEFAULT_NOUT 2
10 #endif
11
12 #ifndef GWION_DEFAULT_SAMPLERATE
13 #define GWION_DEFAULT_SAMPLERATE 48000
14 #endif
15
16 707 struct SoundInfo_ *new_soundinfo(MemPool p) {
17 707 struct SoundInfo_ *si = mp_calloc(p, SoundInfo);
18 707 si->in = GWION_DEFAULT_NIN;
19 707 si->out = GWION_DEFAULT_NOUT;
20 707 si->sr = GWION_DEFAULT_SAMPLERATE;
21 707 return si;
22 }
23
24 5 struct SoundInfo_ *soundinfo_cpy(MemPool p, const struct SoundInfo_ *src) {
25 5 struct SoundInfo_ *si = mp_calloc(p, SoundInfo);
26 5 si->in = src->in;
27 5 si->out = src->out;
28 5 si->sr = src->sr;
29 5 return si;
30 }
31