bpa wrote: 
> I don't use displays and its been a long time since I looked at the
> source code.  I always thought "VU" stood for Volume Units  and when I
> used tape recorders the VU meter was always affected by volume level and
> I assumed the same for SB player.
> 
> A quick look now at output_vis.c  - PCM data is shared with the
> "visualise" via shared memory and no FFT processing is done within
> squeezelite - just copying audio data. 
> 
> Since audio gets out of DAC - PCM samples are not clearly not reduced to
> zero - but current theory is that it seems PCM data is not shared with
> device with no Volume Control
> 
> In output_vis.c - there is a boolean "silence" that needs to be checked
> out as it stops sharing of PCM data.
> There is also some processing of PCM sample due to a replay gain
> setting.
> > 
Code:
--------------------
  >   > 
  > if (silence) {
  > vis_mmap->running = false;
  > } else {
  > frames_t vis_cnt = out_frames;
  > s32_t *ptr = (s32_t *) outputbuf->readp;
  > unsigned i = vis_mmap->buf_index;
  > 
  > if (!output->current_replay_gain) {
  > while (vis_cnt--) {
  > vis_mmap->buffer[i++] = *(ptr++) >> 16;
  > vis_mmap->buffer[i++] = *(ptr++) >> 16;
  > if (i == VIS_BUF_SIZE) i = 0;
  > }
  > } else {
  > while (vis_cnt--) {
  > vis_mmap->buffer[i++] = gain(*(ptr++), output->current_replay_gain) >> 16;
  > vis_mmap->buffer[i++] = gain(*(ptr++), output->current_replay_gain) >> 16;
  > 
  > if (i == VIS_BUF_SIZE) i = 0;
  > }
  > }
  > 
  > vis_mmap->updated = time(NULL);
  > vis_mmap->running = true;
  > vis_mmap->buf_index = i;
  > vis_mmap->rate = output->current_sample_rate;
  > }
  > 
--------------------
> > I just checked on the Touch and noticed that although the volume setting
in LMS doesn't affect the VU meters, replaygain does affect them.

Sent from my Pixel 3a using Tapatalk




------------------------------------------------------------------------
slartibartfast's Profile: http://forums.slimdevices.com/member.php?userid=35609
View this thread: http://forums.slimdevices.com/showthread.php?t=104486

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to