tico 0.1
Mechanical Watch Terminal Timegrapher
Data Structures | Functions
resources.h File Reference
#include "config.h"
#include "myarr.h"
#include "mysound.h"
#include "fftw3.h"
#include <stdint.h>
Include dependency graph for resources.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AppResources
 Struct to hold all the resources needed for the application. More...
 

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).