Added print out for session status as it is registered

This commit is contained in:
Thomas Wilkie 2023-09-30 00:09:23 +09:00
parent 97cbd9a470
commit b755370d89
1 changed files with 18 additions and 0 deletions

View File

@ -82,7 +82,25 @@ HRESULT refreshOpenSessions(AudioSessionsInformation* pSessionInformation)
// Now the events interface has been setup, register it
// This requires casting my session events interface to the interface expected by the api
sessionControl->lpVtbl->RegisterAudioSessionNotification(sessionControl, AudioSessionEvents);
AudioSessionState sessionState = 3;
sessionControl->lpVtbl->GetState(sessionControl, &sessionState);
printf("\nRegistered session %d with control iterface at %p and events interface at %p", i, sessionControl, &AudioSessionEvents);
printf("with state ");
switch (sessionState)
{
case(2):
printf("Expired");
break;
case(1):
printf("Active");
break;
case(0):
printf("Inactive");
break;
default:
printf("Unknown");
break;
}
}
// Release the session manager and enumerator