]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/core-format.h
core-format: Add pa_format_info_get_channels()
[pulseaudio] / src / pulsecore / core-format.h
index 7e5d98297cfcf9bfebd1928eca5b8fc146fdfe78..06fb51f30aec3cfdcc11f33c06cd51fe85e12006 100644 (file)
@@ -32,6 +32,11 @@ int pa_format_info_get_sample_format(pa_format_info *f, pa_sample_format_t *sf);
  * -PA_ERR_NOENTITY. */
 int pa_format_info_get_rate(pa_format_info *f, uint32_t *rate);
 
+/* Gets the channel count stored in the format info. Returns a negative error
+ * code on failure. If the channels property is not set at all, returns
+ * -PA_ERR_NOENTITY. */
+int pa_format_info_get_channels(pa_format_info *f, uint8_t *channels);
+
 /* For compressed formats. Converts the format info into a sample spec and a
  * channel map that an ALSA device can use as its configuration parameters when
  * playing back the compressed data. That is, the returned sample spec doesn't