Skip to content

Commit

Permalink
uninitialized duplicates (#157)
Browse files Browse the repository at this point in the history
uninitialized duplicates won't allocate an array when playing first sound. not sure if this should have allocation for duplicates should be done in cs_init() or on first playing first sound since there's an option to disable cull_duplicates.
  • Loading branch information
ogam authored Apr 3, 2024
1 parent 8a88a30 commit 0b6c94e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/cute/cute_sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,9 @@ cs_error_t cs_init(void* os_handle, unsigned play_frequency_in_Hz, int buffered_
s_ctx->mutex = SDL_CreateMutex();

#endif

s_ctx->duplicate_capacity = 0;
s_ctx->duplicate_count = 0;
s_ctx->duplicates = NULL;
return CUTE_SOUND_ERROR_NONE;
}

Expand Down

0 comments on commit 0b6c94e

Please sign in to comment.