Fix up audio formats as well

This commit is contained in:
Wim Taymans 2016-08-26 19:22:50 +02:00
parent b67c216a04
commit a973007a49
12 changed files with 82 additions and 58 deletions

View file

@ -51,8 +51,8 @@ struct _SpaVolume {
void *user_data;
bool have_format;
SpaAudioRawFormat query_format;
SpaAudioRawFormat current_format;
SpaFormatAudio query_format;
SpaFormatAudio current_format;
SpaVolumePort ports[2];
};
@ -285,7 +285,9 @@ spa_volume_node_port_enum_formats (SpaNode *node,
switch (index) {
case 0:
spa_audio_raw_format_init (&this->query_format);
spa_format_audio_init (SPA_MEDIA_TYPE_AUDIO,
SPA_MEDIA_SUBTYPE_RAW,
&this->query_format);
break;
default:
return SPA_RESULT_ENUM_END;
@ -321,7 +323,7 @@ spa_volume_node_port_set_format (SpaNode *node,
return SPA_RESULT_OK;
}
if ((res = spa_audio_raw_format_parse (format, &this->current_format)) < 0)
if ((res = spa_format_audio_parse (format, &this->current_format)) < 0)
return res;
port->have_format = true;