mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	add an API to create arbitrary alsa sinks/sources dynamically without having to load/unload modules
This commit is contained in:
		
							parent
							
								
									b88b89a676
								
							
						
					
					
						commit
						16d200e369
					
				
					 7 changed files with 3177 additions and 2930 deletions
				
			
		| 
						 | 
					@ -1254,7 +1254,7 @@ module_oss_la_LIBADD = $(AM_LIBADD) liboss-util.la libpulsecore-@PA_MAJORMINORMI
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ALSA
 | 
					# ALSA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
libalsa_util_la_SOURCES = modules/alsa/alsa-util.c modules/alsa/alsa-util.h
 | 
					libalsa_util_la_SOURCES = modules/alsa/alsa-util.c modules/alsa/alsa-util.h modules/alsa/alsa-sink.c modules/alsa/alsa-sink.h modules/alsa/alsa-source.c modules/alsa/alsa-source.h
 | 
				
			||||||
libalsa_util_la_LDFLAGS = -avoid-version
 | 
					libalsa_util_la_LDFLAGS = -avoid-version
 | 
				
			||||||
libalsa_util_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
 | 
					libalsa_util_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libpulsecore-@PA_MAJORMINORMICRO@.la libpulsecommon-@PA_MAJORMINORMICRO@.la libpulse.la
 | 
				
			||||||
libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
 | 
					libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										1636
									
								
								src/modules/alsa/alsa-sink.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1636
									
								
								src/modules/alsa/alsa-sink.c
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										36
									
								
								src/modules/alsa/alsa-sink.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								src/modules/alsa/alsa-sink.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,36 @@
 | 
				
			||||||
 | 
					#ifndef fooalsasinkhfoo
 | 
				
			||||||
 | 
					#define fooalsasinkhfoo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/***
 | 
				
			||||||
 | 
					  This file is part of PulseAudio.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Copyright 2004-2006 Lennart Poettering
 | 
				
			||||||
 | 
					  Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  PulseAudio is free software; you can redistribute it and/or modify
 | 
				
			||||||
 | 
					  it under the terms of the GNU Lesser General Public License as published
 | 
				
			||||||
 | 
					  by the Free Software Foundation; either version 2 of the License,
 | 
				
			||||||
 | 
					  or (at your option) any later version.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  PulseAudio is distributed in the hope that it will be useful, but
 | 
				
			||||||
 | 
					  WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
				
			||||||
 | 
					  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 | 
				
			||||||
 | 
					  General Public License for more details.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  You should have received a copy of the GNU Lesser General Public License
 | 
				
			||||||
 | 
					  along with PulseAudio; if not, write to the Free Software
 | 
				
			||||||
 | 
					  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 | 
				
			||||||
 | 
					  USA.
 | 
				
			||||||
 | 
					***/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <pulsecore/module.h>
 | 
				
			||||||
 | 
					#include <pulsecore/modargs.h>
 | 
				
			||||||
 | 
					#include <pulsecore/sink.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "alsa-util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pa_sink* pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const pa_alsa_profile_info *profile);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void pa_alsa_sink_free(pa_sink *s);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										1450
									
								
								src/modules/alsa/alsa-source.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1450
									
								
								src/modules/alsa/alsa-source.c
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										36
									
								
								src/modules/alsa/alsa-source.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								src/modules/alsa/alsa-source.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,36 @@
 | 
				
			||||||
 | 
					#ifndef fooalsasourcehfoo
 | 
				
			||||||
 | 
					#define fooalsasourcehfoo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/***
 | 
				
			||||||
 | 
					  This file is part of PulseAudio.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Copyright 2004-2006 Lennart Poettering
 | 
				
			||||||
 | 
					  Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  PulseAudio is free software; you can redistribute it and/or modify
 | 
				
			||||||
 | 
					  it under the terms of the GNU Lesser General Public License as published
 | 
				
			||||||
 | 
					  by the Free Software Foundation; either version 2 of the License,
 | 
				
			||||||
 | 
					  or (at your option) any later version.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  PulseAudio is distributed in the hope that it will be useful, but
 | 
				
			||||||
 | 
					  WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
				
			||||||
 | 
					  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 | 
				
			||||||
 | 
					  General Public License for more details.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  You should have received a copy of the GNU Lesser General Public License
 | 
				
			||||||
 | 
					  along with PulseAudio; if not, write to the Free Software
 | 
				
			||||||
 | 
					  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 | 
				
			||||||
 | 
					  USA.
 | 
				
			||||||
 | 
					***/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <pulsecore/module.h>
 | 
				
			||||||
 | 
					#include <pulsecore/modargs.h>
 | 
				
			||||||
 | 
					#include <pulsecore/source.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "alsa-util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pa_source* pa_alsa_source_new(pa_module *m, pa_modargs *ma, const pa_alsa_profile_info *profile);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void pa_alsa_source_free(pa_source *s);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue