Introduce helper-function for connecting DSP-modules into a chain.
This commit is contained in:
parent
8eb3a25289
commit
b4d2b78bca
|
@ -129,4 +129,7 @@ void ifax_handle_demand(struct ifax_module *self, size_t len);
|
|||
*/
|
||||
int ifax_command(struct ifax_module *self, int command, ...);
|
||||
|
||||
/* Establish a signal chain from src-module to dst-module */
|
||||
void ifax_connect(struct ifax_module *src, struct ifax_module *dst);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -123,3 +123,12 @@ int ifax_command(struct ifax_module *self, int command, ...)
|
|||
return rc;
|
||||
}
|
||||
|
||||
/* Make a connection in a chain of signal-processing modules and update
|
||||
* both forward and backward pointers. The direction of the flow of data
|
||||
* is from the source module to the destination module.
|
||||
*/
|
||||
void ifax_connect(struct ifax_module *src, struct ifax_module *dst)
|
||||
{
|
||||
src->sendto = dst;
|
||||
dst->recvfrom = src;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue