How to relink components from VoIP example
Posted: Thu Mar 12, 2020 5:15 pm
Hello,
In my project I want to mix MP3 audios with VoIP (not at the same time) with the codec. The board used is LyraT v4.3.
So after I realice that the read and write pipelines must be relinked (as the flexible_pipeline example shows) I implement the same steps used but with the filter / raw and I2S components.
Steps followed:
- Initialization:
1.- Init board
2.- Init I2S reader and writer -> register it into the pipelines
3.- Init filter and raw stream -> register it into the reader pipeline
4.- Init reader event and set it as a listener.
5.- Init filter and raw stream -> register it into the writer pipeline
6.- Init writer event and set it as a listener.
- Start process (reader)
1.- invoke audio_pipeline_breakup_elements to clean all elements (due to compatibility with MP3)
2.- Relink components: {"i2s_r", "filter_r", "raw_r"}
3.- Set listener
4.- Reset ringbuffer, elements and change state to AEL_STATE_INIT
5.- run and resume pipeline
- Start process (writer)
1.- invoke audio_pipeline_breakup_elements to clean all elements (due to compatibility with MP3)
2.- Relink components: "raw_w", "filter_w", "i2s_w"}
3.- Set listener
4.- Reset ringbuffer, elements and change state to AEL_STATE_INIT
5.- run and resume pipeline
- Read from microphone and reproduce it over the speaker
- Stop process (writer)
1.- pause element
2.- pause pipeline
- Stop process (reader)
1.- pause element
2.- pause pipeline
At this point i'm trying to reopen it from the start processes.
I got the microphone enable again but the speaker doesn't turned on again.
Have anyone any idea how it can be?
In my project I want to mix MP3 audios with VoIP (not at the same time) with the codec. The board used is LyraT v4.3.
So after I realice that the read and write pipelines must be relinked (as the flexible_pipeline example shows) I implement the same steps used but with the filter / raw and I2S components.
Steps followed:
- Initialization:
1.- Init board
2.- Init I2S reader and writer -> register it into the pipelines
3.- Init filter and raw stream -> register it into the reader pipeline
4.- Init reader event and set it as a listener.
5.- Init filter and raw stream -> register it into the writer pipeline
6.- Init writer event and set it as a listener.
- Start process (reader)
1.- invoke audio_pipeline_breakup_elements to clean all elements (due to compatibility with MP3)
2.- Relink components: {"i2s_r", "filter_r", "raw_r"}
3.- Set listener
4.- Reset ringbuffer, elements and change state to AEL_STATE_INIT
5.- run and resume pipeline
- Start process (writer)
1.- invoke audio_pipeline_breakup_elements to clean all elements (due to compatibility with MP3)
2.- Relink components: "raw_w", "filter_w", "i2s_w"}
3.- Set listener
4.- Reset ringbuffer, elements and change state to AEL_STATE_INIT
5.- run and resume pipeline
- Read from microphone and reproduce it over the speaker
- Stop process (writer)
1.- pause element
2.- pause pipeline
- Stop process (reader)
1.- pause element
2.- pause pipeline
At this point i'm trying to reopen it from the start processes.
I got the microphone enable again but the speaker doesn't turned on again.
Have anyone any idea how it can be?