snd_pcm_readi() takes to much time.

オープン
#270 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
12/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
c, linux

調査の方向性

The report concerns the blocking and non-blocking read path of snd_pcm_readi() and snd_pcm_nonblock() in the PCM API. Start by locating those entry points and the PCM read loop in the library source, then reproduce the latency with a capture loop that times each call. There is no clear fix target and no maintainer reply, so confirm with a maintainer what the expected behaviour is before changing code. Done would mean a reproducible cause and an agreed change, not just a timing measurement.

索引モデルが issue の本文から書いたものです。

説明

I am using alsa open source library for my project to read and write audio data.

For that I am using snd_pcm_readi function to read audio data. I am able to read audio data.

But issue is that sometimes it will take so much time to read data.(200-230 msec).
Normally this function executed in 1-3 ms that is normal case, but after every 2-4 frames it is taking 200-300 msec.
So this is affecting my whole application process.

I have also try to set this call as nonblock with the help of snd_pcm_nonblock function. With that I have observed some improvements but still after 2-3 frames it is taking 100msec time to get a data.

主要言語
C
スター
501
フォーク
227
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

alsa-project/alsa-lib のほかの issue

alsa-project/alsa-lib の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。