Ticket #4 (closed: fixed)

Opened 3 years ago

Last modified 1 year ago

Proper use of ALSA API

Reported by: ossman Assigned to: somebody
Priority: normal Milestone:
Component: component1 Severity: normal
Keywords: Cc:

Description

We need an overhaul of the way we use the ALSA API.

The poll functions should be used on each iteration of the mainloop, not just when starting up. The ALSA API explicitly states that these can be used to dynamically asign fd:s, so we must support that.

Allocating and freeing io events each iteration will be expensive, so we should compare the fd list with what we already have registered. In most cases it will not change so we can keep the current io:s.

We should also make sure to call snd_pcm_poll_descriptors_revent(). It is not strictly necessary since we never examine the revents (or translated flags), but we should still call it in case ALSA wants to do some magic there. We should take care to only call it once though.

Change History

04/20/06 15:10:23 changed by lennart

  • status changed from new to closed.
  • resolution set to fixed.

Done in 0.8