external rate plugin: broken 16-bit stereo stream conversion (interleaved -> non-interleaved)

Đang mở
#320 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
c
Lĩnh vực
audio-video-rtc

Hướng nghiên cứu

The fault is in the external rate plugin's 16-bit stereo path, which converts interleaved input to non-interleaved output with libspeex, and the 32-bit path is reported as unaffected. Start from the S16 sample conversion code in the external rate plugin and compare it with the 32-bit path. Reproducing it needs an E-MU 0404b card, and the issue gives no file names. Done means 16-bit stereo output is undistorted at both up- and down-sampling.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

this setup:

Plug PCM: Rate conversion PCM (44100, sformat=S16_LE)
Converter: libspeex (external)
Protocol version: 10003
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 17832
  period_size  : 4458
  period_time  : 92879
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 4458
  period_event : 0
  start_threshold  : 17832
  stop_threshold   : 17832
  silence_threshold: 0
  silence_size : 0
  boundary     : 5019261784704417792
Slave: Hardware PCM card 0 'E-MU 0404b PCI [MAEM8852]' device 3 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_NONINTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 16384
  period_size  : 4096
  period_time  : 92879
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 4096
  period_event : 0
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
  appl_ptr     : 0
  hw_ptr       : 0

garbles the output rather impressively, though it's still recognizable as the input, more or less.

it happens both when up-sampling and down-sampling. it doesn't happen when not re-sampling.

it doesn't happen when the hardware takes 32-bit samples, so i guess it's somewhere in the optimized s16 paths.

it doesn't happen with mono.

this is not reproducible with the upstream emu10k1 driver, as the multichannel device demands 16 channels, which causes the route conversion plugin to be inserted, which sidesteps the issue. and the regular pcm device accepts any rate.

Ngôn ngữ chính
C
Star
501
Fork
227
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của alsa-project/alsa-lib

Tất cả issue của alsa-project/alsa-lib

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.