splitter: add channel splitter

Splits a buffer with multiple non-interleaved channels to multiple
buffers, each with 1 channel.
This commit is contained in:
Wim Taymans 2018-04-13 20:00:30 +02:00
parent eea05cc139
commit e869d5bcb0
3 changed files with 973 additions and 0 deletions

View file

@ -25,6 +25,7 @@ extern const struct spa_handle_factory spa_audioconvert_factory;
extern const struct spa_handle_factory spa_fmtconvert_factory;
extern const struct spa_handle_factory spa_channelmix_factory;
extern const struct spa_handle_factory spa_resample_factory;
extern const struct spa_handle_factory spa_splitter_factory;
int
spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
@ -45,6 +46,9 @@ spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *ind
case 3:
*factory = &spa_resample_factory;
break;
case 4:
*factory = &spa_splitter_factory;
break;
default:
return 0;
}