0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 11:22:00 +01:00
This commit is contained in:
2026-02-19 16:33:56 +01:00
parent 9a1352febc
commit fc66e2a467
2 changed files with 3 additions and 3 deletions

View File

@@ -424,7 +424,7 @@ int setup_audio(FM95_Runtime* runtime, const FM95_DeviceNames dv_names, const FM
if(config.options.mpx_on) free_PulseDevice(&runtime->mpx_device);
return 1;
}
runtime->rds_in = calloc(sizeof(float) * BUFFER_SIZE * config.rds_streams);
runtime->rds_in = malloc(sizeof(float) * BUFFER_SIZE * config.rds_streams);
}
printf("Connecting to output device... (%s)\n", dv_names.output);

View File

@@ -35,13 +35,13 @@ typedef struct {
} AudioBuffer;
AudioBuffer* create_audio_buffer(int capacity) {
AudioBuffer* buffer = (AudioBuffer*)calloc(sizeof(AudioBuffer));
AudioBuffer* buffer = (AudioBuffer*)malloc(sizeof(AudioBuffer));
if (!buffer) {
perror("Failed to allocate audio buffer");
return NULL;
}
buffer->packets = (AudioPacket*)calloc(capacity * sizeof(AudioPacket));
buffer->packets = (AudioPacket*)malloc(capacity * sizeof(AudioPacket));
if (!buffer->packets) {
perror("Failed to allocate packet buffer");
free(buffer);