fix empty samples eating memory

when DPCM is requested, Furnace would waste 500MB of memory per empty sample

that's why it had to be signed!
This commit is contained in:
tildearrow 2025-10-09 03:53:44 -05:00
parent 2739b5af54
commit 6b83f399f0
2 changed files with 12 additions and 5 deletions

View file

@ -236,14 +236,14 @@ struct DivSample {
* @param count number of samples.
* @return whether it was successful.
*/
bool initInternal(DivSampleDepth d, unsigned int count);
bool initInternal(DivSampleDepth d, int count);
/**
* initialize sample data. make sure you have set `depth` before doing so.
* @param count number of samples.
* @return whether it was successful.
*/
bool init(unsigned int count);
bool init(int count);
/**
* resize sample data. make sure the sample has been initialized before doing so.