Home | History | Annotate | Download | only in scopes

Lines Matching full:level

2  *  PCM - Meter level plugin (ncurses)
32 int16_t level;
51 snd_pcm_scope_level_t *level = snd_pcm_scope_get_callback_private(scope);
53 level->channels = calloc(snd_pcm_meter_get_channels(level->pcm), sizeof(*level->channels));
54 if (!level->channels) {
55 free(level);
58 snd_pcm_scope_set_callback_private(scope, level);
59 level->win = initscr();
60 winsdelln(level->win, snd_pcm_meter_get_channels(level->pcm));
61 getyx(level->win, y, x);
62 level->top = y;
68 snd_pcm_scope_level_t *level = snd_pcm_scope_get_callback_private(scope);
70 free(level->channels);
75 snd_pcm_scope_level_t *level = snd_pcm_scope_get_callback_private(scope);
76 free(level);
85 snd_pcm_scope_level_t *level = snd_pcm_scope_get_callback_private(scope);
87 for (c = 0; c < snd_pcm_meter_get_channels(level->pcm); c++) {
88 move(level->top + c, 0);
91 move(level->top, 0);
97 snd_pcm_scope_level_t *level = snd_pcm_scope_get_callback_private(scope);
98 snd_pcm_t *pcm = level->pcm;
106 size = snd_pcm_meter_get_now(pcm) - level->old;
109 offset = level->old % snd_pcm_meter_get_bufsize(pcm);
116 max_decay = 32768 * ms / level->decay_ms;
124 l = &level->channels[c];
125 ptr = snd_pcm_scope_s16_get_channel_buffer(level->s16, c) + offset;
134 ptr = snd_pcm_scope_s16_get_channel_buffer(level->s16, c);
143 l->level = lev;
145 if (l->peak_age >= level->peak_ms ||
150 if (lev < l->level - max_decay)
151 lev = l->level - max_decay;
152 move(level->top + c, 0);
153 lev_pos = lev * level->bar_width / 32768;
154 peak_pos = l->peak * level->bar_width / 32768;
157 mvaddch(level->top + c, peak_pos - 1, '#');
159 move(level->top, 0);
161 level->old = snd_pcm_meter_get_now(pcm);
166 snd_pcm_scope_level_t *level = snd_pcm_scope_get_callback_private(scope);
167 snd_pcm_t *pcm = level->pcm;
168 memset(level->channels, 0, snd_pcm_meter_get_channels(pcm) * sizeof(*level->channels));
169 level->old = snd_pcm_meter_get_now(pcm);
188 snd_pcm_scope_level_t *level;
192 level = calloc(1, sizeof(*level));
193 if (!level) {
197 level->pcm = pcm;
198 level->bar_width = bar_width;
199 level->decay_ms = decay_ms;
200 level->peak_ms = peak_ms;
206 free(level);
210 level->s16 = s16;
212 snd_pcm_scope_set_callback_private(scope, level);