File Memory Buffer
![](../../__attachments/3039625417/att_1_for_3039625417.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
About This Guide
This application note describes the usage and workings of File Memory Buffer Module.
File Memory Buffer Module
The File Mem Buffer module implements the Audio Weaver wrapper for MP3 decoder on native PC target. The module can be found in Sound Design -> Control -> FileMemBuffer in the Module Bar on the left-hand side of AudioWeaver Designer.
![](../../__attachments/3039625417/att_2_for_3039625417.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 1: File Mem Buffer
![](../../__attachments/3039625417/att_5_for_3039625417.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 2: File Mem Buffer Module location
Output Pin and Arguments
bufferPtr is the output pin for this module. The bufferPtr points to the starting address of the file buffer. If the address is 32Bit then only ch1 contains the value and ch2 remains 0. For a native PC mode this output is given to the FFSStartAddr input in the FFS Wrapper module.
![](../../__attachments/3039625417/att_6_for_3039625417.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 3: bufferPtr Output Pin
Argument for the File Mem Buffer is fileName in which the .Bin file path is required to be provided.
![](../../__attachments/3039625417/att_3_for_3039625417.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 4:File Mem Buffer: Arguments
Workings
To explain the workings of the File Mem Buffer module we are using ‘FileMemoryBuffer_Example.awd’. In this example awd we are using the File Memory Buffer module to store the wave files converted into a .Bin file by using a script. The .Bin file here is awe_ffs_sim.bin and the file path is put into the module argument ‘fileName’. The output of the module is the buffer pointer value, which is given as an FFS starting address for the FFS Wrapper module. We are using a FFS Wrapper module as this example is for the Native PC mode. The FFS instance pointer value is given to the Wave One Shot Players ‘fsInstance’ pin. We have specified the names of the wave file to be played at each Wave One Shot Player modules that are in use namely sin_1k.wav and sin_2k.wav at the arguments tab of each module.
After starting the design by pressing ‘RUN’, the Trigger value needs to be shifted from 0-> 1 for a valid trigger to the Wave One Shot Player modules. With the positivity edge trigger, the output of the Wave One Shot Payer is given to the sink display as can be seen in the figure below. The frequency of the wave file can be controlled by the Pitch -> fRation which can be changed between 1-10 depending on the maxPlaybackRate set in the arguments.
![](../../__attachments/3039625417/att_7_for_3039625417.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 5: File Mem Buffer Example 1
![](../../__attachments/3039625417/att_8_for_3039625417.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 6: File Mem Buffer Example: 2