work on sink

This commit is contained in:
Wim Taymans 2016-08-18 12:43:25 +02:00
parent bdbddaf75b
commit a03352353f
9 changed files with 180 additions and 306 deletions

View file

@ -52,6 +52,7 @@ reset_alsa_sink_props (SpaALSASinkProps *props)
typedef struct {
bool opened;
bool have_buffers;
snd_pcm_t *handle;
snd_output_t *output;
snd_pcm_sframes_t buffer_size;
@ -391,6 +392,9 @@ spa_alsa_sink_node_port_set_format (SpaNode *node,
if ((res = spa_audio_raw_format_parse (format, &this->current_format)) < 0)
return res;
if (alsa_set_format (this, &this->current_format, false) < 0)
return SPA_RESULT_ERROR;
this->have_format = true;
return SPA_RESULT_OK;