Ticket #4 (closed: fixed)

Opened 4 years ago

Last modified 3 years ago

Proper use of ALSA API

Reported by: ossman Owned by: somebody
Milestone: Component: component1
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

Changed 4 years ago by lennart

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

Done in 0.8

Note: See TracTickets for help on using tickets.