Using Opus codec in VoIP example

goliveira
Posts: 2
Joined: Tue Feb 21, 2023 4:05 pm

Using Opus codec in VoIP example

Postby goliveira » Tue Mar 07, 2023 4:29 pm

Hello,

I am trying to use the opus codec in the VoIP example for the ESP32-LyraT V4.3, but I am having same issues.

I changed the audio stream configuration

Code: Select all

    av_stream_config_t av_stream_config = {
        .algo_mask = ALGORITHM_STREAM_DEFAULT_MASK,
        .acodec_samplerate = AUDIO_CODEC_SAMPLE_RATE,
        .acodec_type = [b]AV_ACODEC_OPUS[/b],
        .vcodec_type = AV_VCODEC_NULL,
        .hal = {
            .audio_samplerate = AUDIO_HAL_SAMPLE_RATE,
            .audio_framesize = PCM_FRAME_SIZE,
        },
    };
 
but I get the following error:
I (20386) AUDIO_THREAD: The algo_fetch task allocate stack on external memory
I (20394) AV_STREAM: audio_dec started
W (20398) SIP: CHANGE STATE FROM 16, TO 32, :func: sip_uas_process_req:1024
W (20417) AV_STREAM: audio decoder ringbuf write timeout
W (20418) AV_STREAM: audio decoder ringbuf write timeout
ERROR*** A stack overflow in task _rtp_audio_recv has been detected.


Backtrace: 0x4008225d:0x3f86a7b0 0x400913c5:0x3f86a7d0 0x40091ac5:0x3f86a7f0 0x40092d20:0x3f86a870 0x400914c0:0x3f86a890 0x40091472:0xa5a5a5a5 |<-CORRUPTED
0x4008225d: panic_abort at /home/goliveira/esp/esp-idf/components/esp_system/panic.c:408

0x400913c5: esp_system_abort at /home/goliveira/esp/esp-idf/components/esp_system/esp_system.c:137

0x40091ac5: vApplicationStackOverflowHook at /home/goliveira/esp/esp-idf/components/freertos/port/xtensa/port.c:407

0x40092d20: vTaskSwitchContext at /home/goliveira/esp/esp-idf/components/freertos/tasks.c:3553

0x400914c0: _frxt_dispatch at /home/goliveira/esp/esp-idf/components/freertos/port/xtensa/portasm.S:436

0x40091472: _frxt_int_exit at /home/goliveira/esp/esp-idf/components/freertos/port/xtensa/portasm.S:231


I tried changing the ADF Delegate stack size, ESP System Settings Event loop and main task stack sizes, but the issue persists.

Am I forgetting something ?

Thank you for your time,
Gabriel

Who is online

Users browsing this forum: No registered users and 34 guests