/* This file is part of the Simba project.  */
int channel_init(struct channel_t *self_p, int id, int32_t *buf_p, size_t length)
/* This file is part of the Simba project.  */
int channel_init(struct channel_t *self_p, int id, int32_t *buf_p, size_t length)
{
    self_p->id = id;
    self_p->state = CHANNEL_STATE_ON;
    self_p->length = 0;
    self_p->waveform.buf_p = buf_p;
    self_p->waveform.length = length;
    return (0);
}