Skip to main content
Visitor II
May 27, 2021
Question

Regarding PCM buffer data used in audio loop example of bluecoin

  • May 27, 2021
  • 4 replies
  • 1677 views

how can i store 1 second audio data using audio loop example

    This topic has been closed for replies.

    4 replies

    ST Employee
    June 1, 2021

    Hi @Dinakaran Palani​ ,

    if you follow the datapath of the audio signal you will find the audio buffer.

    once you find it, you can store it in a long array until you have enough samples to make one second.

    hope this helps,

    Niccolò

    Visitor II
    June 1, 2021

    Hi @niccolo.ruffini​ 

    how frequently should I capture the data from pcm buffer to another buffer

    the second one is how should I declare that buffer for storing one-second samples for the sampling rate 16000 for single-channel

    if I declare an array of uint16_t[16000] if I do so I am getting excessive use of ram

    ST Employee
    June 3, 2021

    Hi @Dinakaran Palani​ ,

    you should capture data from the buffer every time it is full, otherwise you loose samples.

    do you get the error even if you use the malloc?

    Niccolò

    Visitor II
    June 3, 2021

    how to do it

    ST Employee
    June 3, 2021

    Hi @Dinakaran Palani​ ,

    you can follow this link to check how to use the malloc function.

    hope this helps

    Niccolò

    Visitor II
    June 3, 2021

    i tried allocating by using the snippet as shown in the example link I am not able to allocate 16000 memory location

    ST Employee
    June 4, 2021

    Hi @Dinakaran Palani​ ,

    What system are you using?

    Niccolò