mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	rename pa_cvolume_snprint_dB to pa_sw_cvolume_snprint_dB since it is
useful only for software volumes
This commit is contained in:
		
							parent
							
								
									c0815deb4a
								
							
						
					
					
						commit
						7a1a147881
					
				
					 4 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -105,7 +105,7 @@ pa_cvolume_max;
 | 
				
			||||||
pa_cvolume_remap;
 | 
					pa_cvolume_remap;
 | 
				
			||||||
pa_cvolume_set;
 | 
					pa_cvolume_set;
 | 
				
			||||||
pa_cvolume_snprint;
 | 
					pa_cvolume_snprint;
 | 
				
			||||||
pa_cvolume_snprint_dB;
 | 
					pa_sw_cvolume_snprint_dB;
 | 
				
			||||||
pa_cvolume_valid;
 | 
					pa_cvolume_valid;
 | 
				
			||||||
pa_ext_stream_restore_delete;
 | 
					pa_ext_stream_restore_delete;
 | 
				
			||||||
pa_ext_stream_restore_read;
 | 
					pa_ext_stream_restore_read;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -170,7 +170,7 @@ char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c) {
 | 
				
			||||||
    return s;
 | 
					    return s;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
char *pa_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c) {
 | 
					char *pa_sw_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c) {
 | 
				
			||||||
    unsigned channel;
 | 
					    unsigned channel;
 | 
				
			||||||
    pa_bool_t first = TRUE;
 | 
					    pa_bool_t first = TRUE;
 | 
				
			||||||
    char *e;
 | 
					    char *e;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -145,10 +145,10 @@ char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c);
 | 
				
			||||||
 * any release without warning and without being considered API or ABI
 | 
					 * any release without warning and without being considered API or ABI
 | 
				
			||||||
 * breakage. You should not use this definition anywhere where it
 | 
					 * breakage. You should not use this definition anywhere where it
 | 
				
			||||||
 * might become part of an ABI. \since 0.9.13 */
 | 
					 * might become part of an ABI. \since 0.9.13 */
 | 
				
			||||||
#define PA_CVOLUME_SNPRINT_DB_MAX 448
 | 
					#define PA_SW_CVOLUME_SNPRINT_DB_MAX 448
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Pretty print a volume structure but show dB values. \since 0.9.13 */
 | 
					/** Pretty print a volume structure but show dB values. \since 0.9.13 */
 | 
				
			||||||
char *pa_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c);
 | 
					char *pa_sw_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Return the average volume of all channels */
 | 
					/** Return the average volume of all channels */
 | 
				
			||||||
pa_volume_t pa_cvolume_avg(const pa_cvolume *a) PA_GCC_PURE;
 | 
					pa_volume_t pa_cvolume_avg(const pa_cvolume *a) PA_GCC_PURE;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,14 +17,14 @@ int main(int argc, char *argv[]) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 256) {
 | 
					    for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 256) {
 | 
				
			||||||
        char s[PA_CVOLUME_SNPRINT_MAX], t[PA_CVOLUME_SNPRINT_DB_MAX];
 | 
					        char s[PA_CVOLUME_SNPRINT_MAX], t[PA_SW_CVOLUME_SNPRINT_DB_MAX];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        pa_cvolume_set(&cv, 2, v);
 | 
					        pa_cvolume_set(&cv, 2, v);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        printf("Volume: %3i [%s] [%s]\n",
 | 
					        printf("Volume: %3i [%s] [%s]\n",
 | 
				
			||||||
               v,
 | 
					               v,
 | 
				
			||||||
               pa_cvolume_snprint(s, sizeof(s), &cv),
 | 
					               pa_cvolume_snprint(s, sizeof(s), &cv),
 | 
				
			||||||
               pa_cvolume_snprint_dB(t, sizeof(t), &cv));
 | 
					               pa_sw_cvolume_snprint_dB(t, sizeof(t), &cv));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue