Skip to content

Commit

Permalink
Store source object's names in its struct, for debugging purposes.
Browse files Browse the repository at this point in the history
(So we can decide what AL name this is when we only have an object pointer,
as it is in the mixer thread.)
  • Loading branch information
icculus committed Jul 1, 2019
1 parent 1d17993 commit f5b36ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mojoal.c
Expand Up @@ -421,6 +421,7 @@ SIMDALIGNEDSTRUCT ALsource
ALfloat panning[2]; /* we only do stereo for now */
SDL_atomic_t mixer_accessible;
SDL_atomic_t state; /* initial, playing, paused, stopped */
ALuint name;
ALboolean allocated;
ALenum type; /* undetermined, static, streaming */
ALboolean recalc;
Expand Down Expand Up @@ -3322,6 +3323,7 @@ static void _alGenSources(const ALsizei n, ALuint *names)

SDL_zerop(src);
SDL_AtomicSet(&src->state, AL_INITIAL);
src->name = names[i];
src->type = AL_UNDETERMINED;
src->recalc = AL_TRUE;
src->gain = 1.0f;
Expand Down

0 comments on commit f5b36ae

Please sign in to comment.