Commit 6e54cbb1 authored by Richard Gobeille's avatar Richard Gobeille
Browse files

audiolib: less nasty looking MV_Voices[] allocation

This removes the +2 bytes at the end of the allocation--I checked out the valgrind_errors.log referenced by the deleted comment and it looks like the issue fixed by 2e2e0e3a.

This is the commit to revert if weird audio crashes start happening.
parent b164d944
......@@ -806,8 +806,7 @@ int MV_Init(int soundcard, int MixRate, int Voices, int numchannels, void *initd
MV_SetErrorCode(MV_Ok);
// MV_TotalMemory + 2: FIXME, see valgrind_errors.log
int const totalmem = Voices * sizeof(VoiceNode) + (MV_TOTALBUFFERSIZE<<1) + (MV_MIXBUFFERSIZE*numchannels*2) + 2;
int const totalmem = Voices * sizeof(VoiceNode) + (MV_TOTALBUFFERSIZE * sizeof(int16_t)) + (MV_MIXBUFFERSIZE * numchannels * sizeof(int16_t));
char *ptr = (char *) Xaligned_alloc(16, totalmem);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment