mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	introduce upper channel map definition limit PA_CHANNEL_MAP_DEF_MAX
This commit is contained in:
		
							parent
							
								
									ece297f21b
								
							
						
					
					
						commit
						3429072504
					
				
					 2 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -198,6 +198,7 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p
 | 
			
		|||
    pa_assert(m);
 | 
			
		||||
    pa_assert(channels > 0);
 | 
			
		||||
    pa_assert(channels <= PA_CHANNELS_MAX);
 | 
			
		||||
    pa_assert(def < PA_CHANNEL_MAP_DEF_MAX);
 | 
			
		||||
 | 
			
		||||
    pa_channel_map_init(m);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -391,7 +392,7 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
        default:
 | 
			
		||||
            return NULL;
 | 
			
		||||
            pa_assert_not_reached();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -401,6 +402,7 @@ pa_channel_map* pa_channel_map_init_extend(pa_channel_map *m, unsigned channels,
 | 
			
		|||
    pa_assert(m);
 | 
			
		||||
    pa_assert(channels > 0);
 | 
			
		||||
    pa_assert(channels <= PA_CHANNELS_MAX);
 | 
			
		||||
    pa_assert(def < PA_CHANNEL_MAP_DEF_MAX);
 | 
			
		||||
 | 
			
		||||
    pa_channel_map_init(m);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -157,6 +157,9 @@ typedef enum pa_channel_map_def {
 | 
			
		|||
    PA_CHANNEL_MAP_OSS,
 | 
			
		||||
    /**< The default channel mapping used by OSS as defined in the OSS 4.0 API specs */
 | 
			
		||||
 | 
			
		||||
    /**< Upper limit of valid channel mapping definitions */
 | 
			
		||||
    PA_CHANNEL_MAP_DEF_MAX,
 | 
			
		||||
 | 
			
		||||
    PA_CHANNEL_MAP_DEFAULT = PA_CHANNEL_MAP_AIFF
 | 
			
		||||
    /**< The default channel map */
 | 
			
		||||
} pa_channel_map_def_t;
 | 
			
		||||
| 
						 | 
				
			
			@ -211,7 +214,7 @@ pa_channel_map *pa_channel_map_parse(pa_channel_map *map, const char *s);
 | 
			
		|||
/** Compare two channel maps. Return 1 if both match. */
 | 
			
		||||
int pa_channel_map_equal(const pa_channel_map *a, const pa_channel_map *b) PA_GCC_PURE;
 | 
			
		||||
 | 
			
		||||
/** Return non-zero of the specified channel map is considered valid */
 | 
			
		||||
/** Return non-zero if the specified channel map is considered valid */
 | 
			
		||||
int pa_channel_map_valid(const pa_channel_map *map) PA_GCC_PURE;
 | 
			
		||||
 | 
			
		||||
/** Return non-zero if the specified channel map is compatible with
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue