File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -948,30 +948,41 @@ void Stop_Sample(int index)
948948bool Sample_Status (int index)
949949{
950950 if (index < 0 ) {
951+ DBG_LOG (" Index %d less that zero, returning false." , index);
951952 return false ;
952953 }
953954
954955 if (AudioDone) {
956+ DBG_LOG (" AudioDone, %d returning false." , index);
955957 return false ;
956958 }
957959
958960 if (LockedData.DigiHandle == INVALID_AUDIO_HANDLE || index >= MAX_SAMPLE_TRACKERS) {
961+ DBG_LOG (" Invalid handle, %d returning false." , index);
959962 return false ;
960963 }
961964
962965 SampleTrackerType* st = &LockedData.SampleTracker [index];
963966
964967 if (st->Loading ) {
968+ DBG_LOG (" st->Loading, %d returning true." , index);
965969 return true ;
966970 }
967971
968972 if (!st->Active ) {
973+ DBG_LOG (" !st->Active, %d returning false." , index);
969974 return false ;
970975 }
971976
972977 ALint val;
973978 alGetSourcei (st->OpenALSource , AL_SOURCE_STATE, &val);
974-
979+ if (val == AL_PLAYING) {
980+ DBG_LOG (" st->OpenALSource state AL_PLAYING, %d returning true." , index);
981+ } else if (val == AL_PAUSED) {
982+ DBG_LOG (" st->OpenALSource state AL_PAUSED, %d returning true." , index);
983+ } else {
984+ DBG_LOG (" st->OpenALSource state not AL_PLAYING or AL_PAUSED, %d returning false." , index);
985+ }
975986 return val == AL_PLAYING || val == AL_PAUSED;
976987};
977988
You can’t perform that action at this time.
0 commit comments