search

Home  >  Q&A  >  body text

android - 安卓把一个数组转化为wav格式的音频,并播放

PHP中文网PHP中文网2771 days ago568

reply all(3)I'll reply

  • 高洛峰

    高洛峰2017-04-17 17:15:29

    Is the array you are talking about the byte array of the audio file?


    According to the poster, five independent voice byte arrays are merged together, which may be a bit troublesome,

    • First parse the file headers of the five files. The file header structure is as shown below and cannot be uploaded. Only links can be given

    Integrate five header information into one.

    • Parse data blocks, merge data blocks, data block format

    • Part of the data in the file header needs to be determined based on the merged data blocks.

    I can only help you so far, I hope the poster can solve this problem.

    reply
    0
  • PHPz

    PHPz2017-04-17 17:15:29

    Try audio track. It should be possible to play naked streams.
    The array you are talking about is the naked stream. Convert to wav, mediacodec may be able to.

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 17:15:29

    Where did your array data come from? Are you sure it is a wav file? If so, I'm curious why it needs to be converted into an array? If not, I can't change it.

    reply
    0
  • Cancelreply