参照元†
- struct snd_pcm_substream *substream
- void *arg
返り値†
static int snd_pcm_lib_ioctl_reset(struct snd_pcm_substream *substream,
void *arg)
{
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned long flags;
snd_pcm_stream_lock_irqsave(substream, flags);
if (snd_pcm_running(substream) &&
snd_pcm_update_hw_ptr(substream) >= 0)
runtime->status->hw_ptr %= runtime->buffer_size;
else
runtime->status->hw_ptr = 0;
snd_pcm_stream_unlock_irqrestore(substream, flags);
- runtime->status は snd_pcm_mmap_status 型のメンバ。
return 0;
}
コメント†