esp-adf esp_audio_play()播放https异常

Liiidr
Posts: 4
Joined: Thu Nov 28, 2019 4:28 am

esp-adf esp_audio_play()播放https异常

Postby Liiidr » Fri Dec 20, 2019 8:40 am

esp_audio.h文件的接口说明是支持HTTP和HTTPs的,但是我测试只有HTTP能正常
有人遇到相同的问题吗?


esp_audio.h头文件接口说明如下:
  1. /**
  2.  * @brief Play the given uri
  3.  *
  4.  * The esp_audio_play have follow activity, setup inputstream, outputstream and codec by uri, start all of them.
  5.  * There is a rule that esp_audio will select input stream, codec and output stream by URI field.
  6.  
  7.  * Rule of URI field are as follow.
  8.  *     - `UF_SCHEMA` field of URI for choose input stream from existing streams. e.g:"http","file"
  9.  *     - `UF_PATH` field of URI for choose codec from existing codecs. e.g:"/audio/mp3_music.mp3"
  10.  *     - `UF_FRAGMENT` field of URI for choose output stream from existing streams, output stream is I2S by default.
  11.  *     - `UF_USERINFO` field of URI for specific sample rate and channels at encode mode.
  12.  *
  13.  *     The format "user:password" in the userinfo field, "user" is sample rate, "password" is channels.
  14.  *
  15.  * Now esp_audio_play support follow URIs.
  16.  *     - "https://dl.espressif.com/dl/audio/mp3_music.mp3"
  17.  *     - "http://media-ice.musicradio.com/ClassicFMMP3"
  18.  *     - "file://sdcard/test.mp3"
  19.  *     - "iis://16000:2@from.pcm/rec.wav#file"
  20.  *     - "iis://16000:1@record.pcm/record.wav#raw"
  21.  *
  22.  * @note
  23.  *     - The URI parse by `http_parser_parse_url`,any illegal string will be return `ESP_ERR_AUDIO_INVALID_URI`.
  24.  *     - If the esp_decoder codec is added to `handle`, then the `handle` of esp_decoder will be set as the default decoder,
  25.  *       even if other decoders are added.
  26.  *     - Enabled `CONFIG_FATFS_API_ENCODING_UTF_8`, the URI can be support Chinese characters.
  27.  *     - Asynchronous interface
  28.  *
  29.  * @param handle The esp_audio_handle_t instance
  30.  * @param uri    Such as "file://sdcard/test.wav" or "http://iot.espressif.com/file/example.mp3".
  31.  *               If NULL to be set, the uri setup by`esp_audio_setup` will used.
  32.  * @param type   Specific handle type decoder or encoder
  33.  * @param pos    Specific starting position by bytes
  34.  *
  35.  * @return
  36.  *      - ESP_ERR_AUDIO_NO_ERROR: on succss
  37.  *      - ESP_ERR_AUDIO_TIMEOUT: timeout the play activity
  38.  *      - ESP_ERR_AUDIO_NOT_SUPPORT: Currently status is AUDIO_STATUS_RUNNING
  39.  *      - ESP_ERR_AUDIO_INVALID_URI: URI is illegal
  40.  *      - ESP_ERR_AUDIO_INVALID_PARAMETER: invalid arguments
  41.  */
  42. audio_err_t esp_audio_play(esp_audio_handle_t handle, audio_codec_type_t type, const char *uri, int pos);

Liiidr
Posts: 4
Joined: Thu Nov 28, 2019 4:28 am

Re: esp-adf esp_audio_play()播放https异常

Postby Liiidr » Mon Dec 23, 2019 8:59 am

有人遇到esp_audio_play()播放https异常的情况吗?用最新的ADF

jason.mao
Posts: 75
Joined: Mon Nov 19, 2018 2:05 am

Re: esp-adf esp_audio_play()播放https异常

Postby jason.mao » Mon Jan 20, 2020 11:16 am

你好

你说的异常具体是什么情况?log是怎么样的?

Who is online

Users browsing this forum: No registered users and 2 guests