Skip to contentSkip to conversation

snd_pcm_status_get_avail() and external I/O plugins

DISCUSSION Robert Huitl 1 participant 1 message Jan 18, 2007

lore
Share & tools
lore
#0 lore raw

Hello,

I have some trouble to get mplayer working with an external pcm I/O plugin (a2dp from bluez). The problem is that mplayer needs to know how much space is left in the ring buffer:

  snd_pcm_status(alsa_handler, status)
  ret = snd_pcm_status_get_avail(status) * bytes_per_sample;

Now with the ALSA kernel driver, ret will vary, depending on how much data was written to the device, and how much time passed.

However, with the I/O plugin, snd_pcm_status_get_avail() always returns the maximum value (causing mplayer to think that all samples have been played). I can't find a callback function for the status in snd_pcm_ioplug_callback_t where I could adjust the avail value.

I'd appreciate any hints.

Robert

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV