mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	More generic support for poll descriptors
This commit is contained in:
		
							parent
							
								
									a86efa083c
								
							
						
					
					
						commit
						460660d4b4
					
				
					 25 changed files with 162 additions and 68 deletions
				
			
		| 
						 | 
				
			
			@ -52,12 +52,23 @@ int snd_rawmidi_close(snd_rawmidi_t *rmidi)
 | 
			
		|||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int snd_rawmidi_poll_descriptor(snd_rawmidi_t *rmidi)
 | 
			
		||||
int _snd_rawmidi_poll_descriptor(snd_rawmidi_t *rmidi)
 | 
			
		||||
{
 | 
			
		||||
	assert(rmidi);
 | 
			
		||||
	return rmidi->poll_fd;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rmidi, struct pollfd *pfds, unsigned int space)
 | 
			
		||||
{
 | 
			
		||||
	assert(rmidi);
 | 
			
		||||
	if (space >= 1) {
 | 
			
		||||
		pfds->fd = rmidi->poll_fd;
 | 
			
		||||
		pfds->events = rmidi->stream == SND_RAWMIDI_STREAM_OUTPUT ? POLLOUT : POLLIN;
 | 
			
		||||
	}
 | 
			
		||||
	return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int snd_rawmidi_nonblock(snd_rawmidi_t *rmidi, int nonblock)
 | 
			
		||||
{
 | 
			
		||||
	int err;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue