tico 0.1
Mechanical Watch Terminal Timegrapher
Functions
resources.c File Reference
#include "resources.h"
#include "myfft.h"
#include "mysync.h"
#include "printing.h"
#include <fftw3.h>
#include <stdlib.h>
Include dependency graph for resources.c:

Functions

AppResources allocateResources (size_t arrayLength, size_t ticktockBuffer, CapConfig *cfg)
 Allocates and initializes the resources needed for the application. More...
 
void cleanupResources (AppResources *res, CapConfig *cfg, CaptureCtx *ctx)
 Frees all allocated resources and performs any necessary cleanup. More...
 

Function Documentation

◆ allocateResources()

AppResources allocateResources ( size_t  arrayLength,
size_t  ticktockBuffer,
CapConfig cfg 
)

Allocates and initializes the resources needed for the application.

Parameters
arrayLengthThe length of the arrays to be allocated.
ticktockBufferThe size of the audio buffer to be allocated.
cfgPointer to the configuration structure containing necessary parameters.
Returns
An AppResources struct containing pointers to all allocated resources.

◆ cleanupResources()

void cleanupResources ( AppResources res,
CapConfig cfg,
CaptureCtx ctx 
)

Frees all allocated resources and performs any necessary cleanup.

Parameters
resPointer to the AppResources struct containing the resources to be freed.
cfgPointer to the CapConfig struct containing configuration parameters (if needed for cleanup).
ctxPointer to the CaptureCtx struct containing context information (if needed for cleanup).