This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Managing very long audio sample buffers

Hi Everyone,

Apologies if this has already been dealt with but I could not find anything on it on any search I could think of.

I would like to ask people for advice on how to go about buffering large amounts of audio when using DSP/BIOS ((V)C5515)  (say up to 1s of stereo audio @ 48kHz) whilst being able to quickly access any sample within the buffer. A 1 second buffer @48kHz stereo would give 187.5kB of data, and whilst the SARAM is technically large enough to store that much data, i clearly can't just create two arrays of size 48000.

Assuming more buffered audio were necessary, clearly external memory is necessary, but is it with that amount?

Is the only way to go to use the DMA controllers?

Any help or advice would be greatly appreciated as I'm still trying to ascend this learning curve and this forum has been the main source of any learning I have done...

  • Hi,

     

    Technically, it's doable. The below are steps:

     

    1. Modify linker file.

    MEMORY

    {

     ...

     SARAM (RWIX): origin = 0x010000, length = 0x030000  /*  192KB */

    ...

    }

    SECTIONS

    {

    ...

     .buffer > SARAM

    ...

    }

     

    2. Assign your variable to .buffer memory in your code.

    #pragma DATA_SECTION(big_buffer, ".buffer")

    Uint16 big_buffer[48000];

     

     

    Regards,

    Hyun

  • Hi,

    I have tried this now (because im using DSP/BIOS I had to remove the SARAM definition from the .tcf file then provide an extra linker file with the commands given).

    The program works fine until I have written to big_buffer[32790], at which point the program behaves oddly, then finally crashes.

    When I connect to the device I occasionally get the following error messages:

    C55xx: Can't enable RTDX as it requires AU1 which is already claimed for profiling or breakpoint(s)
    C55xx: Can't enable RTDX as it requires AU1 which is already claimed for profiling or breakpoint(s)


    Once the program finally crashes I get this message:

    C55xx: Can't Run Target CPU: (Error -2134 @ 0x0) Unable to control device execution state. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Release 5.0.429.0)