Changeset 3458:65ad445b7626 in roaraudio for libroarpulse
 Timestamp:
 02/13/10 21:44:14 (10 years ago)
 Branch:
 default
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

libroarpulse/volume.c
r3457 r3458 39 39 #include <libroarpulse/libroarpulse.h> 40 40 41 /** Return nonzero when *a == *b */ 42 int pa_cvolume_equal(const pa_cvolume *a, const pa_cvolume *b); 43 44 /** Set the volume of all channels to the specified parameter */ 45 pa_cvolume* pa_cvolume_set(pa_cvolume *a, unsigned channels, pa_volume_t v); 46 47 /** Pretty print a volume structure */ 48 char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c); 49 50 /** Return the average volume of all channels */ 51 pa_volume_t pa_cvolume_avg(const pa_cvolume *a); 52 53 /** Return TRUE when the passed cvolume structure is valid, FALSE otherwise */ 54 int pa_cvolume_valid(const pa_cvolume *v); 55 56 /** Return nonzero if the volume of all channels is equal to the specified value */ 57 int pa_cvolume_channels_equal_to(const pa_cvolume *a, pa_volume_t v); 58 59 /** Multiply two volumes specifications, return the result. This uses PA_VOLUME_NORM as neutral element of multiplication. This is only valid for software volumes! */ 60 pa_volume_t pa_sw_volume_multiply(pa_volume_t a, pa_volume_t b); 61 62 /** Multiply to perchannel volumes and return the result in *dest. This is only valid for software volumes! */ 63 pa_cvolume *pa_sw_cvolume_multiply(pa_cvolume *dest, const pa_cvolume *a, const pa_cvolume *b); 64 65 /** Convert a decibel value to a volume. This is only valid for software volumes! \since 0.4 */ 66 pa_volume_t pa_sw_volume_from_dB(double f); 67 68 /** Convert a volume to a decibel value. This is only valid for software volumes! \since 0.4 */ 69 double pa_sw_volume_to_dB(pa_volume_t v); 70 71 /** Convert a linear factor to a volume. This is only valid for software volumes! \since 0.8 */ 72 pa_volume_t pa_sw_volume_from_linear(double v); 73 74 /** Convert a volume to a linear factor. This is only valid for software volumes! \since 0.8 */ 75 double pa_sw_volume_to_linear(pa_volume_t v); 76 41 77 //ll
Note: See TracChangeset
for help on using the changeset viewer.