ref: bb5e1bf18a65454ef3f57db7f55c091ad239c526
parent: e763bd93badbd390945a3d0ee25d75e54e4fb8eb
author: Bernhard Schelling <14200249+schellingb@users.noreply.github.com>
date: Sat Feb 18 21:26:59 EST 2023
Use TSF_NULL not NULL
--- a/tsf.h
+++ b/tsf.h
@@ -121,7 +121,7 @@
// Two channels with all samples for the left channel first then right
TSF_STEREO_UNWEAVED,
// A single channel (stereo instruments are mixed into center)
- TSF_MONO,
+ TSF_MONO
};
// Thread safety:
@@ -1610,7 +1610,7 @@
if (!f->channels)
{
f->channels = (struct tsf_channels*)TSF_MALLOC(sizeof(struct tsf_channels) + sizeof(struct tsf_channel) * channel);
- if (!f->channels) return NULL;
+ if (!f->channels) return TSF_NULL;
f->channels->setupVoice = &tsf_channel_setup_voice;
f->channels->channelNum = 0;
f->channels->activeChannel = 0;
@@ -1618,7 +1618,7 @@
else
{
struct tsf_channels *newChannels = (struct tsf_channels*)TSF_REALLOC(f->channels, sizeof(struct tsf_channels) + sizeof(struct tsf_channel) * channel);
- if (!newChannels) return NULL;
+ if (!newChannels) return TSF_NULL;
f->channels = newChannels;
}
i = f->channels->channelNum;