Skip to content

Commit

Permalink
use hv_malloc for creating output buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Nov 30, 2023
1 parent 1540e73 commit dfb21d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/src/signal/test_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ int main(int argc, const char *argv[]) {
(int32_t) hv_getSampleRate(context),
TW_FLOAT32, TW_INLINE, outputPath);

float *outBuffers = (float *) malloc(
float *outBuffers = (float *) hv_malloc(
hv_getNumOutputChannels(context) * blockSize * sizeof(float));

for (int i = 0; i < numIterations; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main(int argc, const char *argv[]) {
HeavyContextInterface *context = hv_heavy_new(48000.0);
hv_setPrintHook(context, &printHook);

float *outBuffers = (float *) malloc(numOutputChannels * BLOCK_SIZE * sizeof(float));
float *outBuffers = (float *) hv_malloc(numOutputChannels * BLOCK_SIZE * sizeof(float));

for (int i = 0; i < numIterations; ++i) {
hv_processInline(context, NULL, outBuffers, BLOCK_SIZE);
Expand Down
2 changes: 1 addition & 1 deletion tests/test_midi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int main(int argc, const char *argv[]) {

MidiEvent* mev;

float *outBuffers = (float *) malloc(numOutputChannels * BLOCK_SIZE * sizeof(float));
float *outBuffers = (float *) hv_malloc(numOutputChannels * BLOCK_SIZE * sizeof(float));

for (int i = 0; i < numIterations; ++i) {
for (int event=0; event < midifile[0].size(); event++) {
Expand Down

0 comments on commit dfb21d6

Please sign in to comment.