andrewrk / andrewrk/libsoundio

soundio_outstream_pause() doesn't un-pause immediately on ALSA

オープン
#196 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C
スター
2.1k
フォーク
254
PR マージ指標
30日以内にマージされた PR はありません

説明

I'm using libsoundio to play notification sounds. These notification sounds are played once every 10 minutes, so I keep the stream paused in between notifications. When a notification sound needs to be played, I un-pause the stream, stream the samples, and then pause the stream again.

This works fine with CoreAudio on macOS, but fails with ALSA on Ubuntu: when I un-pause a stream that's been paused for a long time, the first few seconds worth of samples are not streamed to output. So, I tend to miss the entire notification sound.

Anyone know what this is down to? It feels like ALSA is 'detaching' streams that have been inactive for a long time, and then takes a bit of time to reattach them when un-paused. This seems fine to me, as long as I can tell when exactly I can actually start streaming sound. Any suggestions for what to do? Maybe manage it myself by completely opening and closing the stream when it's not in use?

Thanks,
Bartholomew

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

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

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