<commit_before>#include "cbase.h"
#include "convar.h"
#include "openal.h"
#include "openal_oggsample.h"
#include "openal_wavsample.h"
#include "openal_sample.h"
#include "openal_loader.h"
#include "openal_mp3sample.h"
//#include "c_basehlplayer.h"

// Defines differt strings that are used for OpenAL's console commands. %s = file extension
#define OPENAL_DEMO_FILENAME "demo/demo.%s"

IOpenALSample* demoSample = NULL;

/***
 * Stops all demos that rely on the demoSample pointer.
 **/
void OpenALStopDemo()
{
    if (demoSample != NULL)
    {
		if (demoSample->IsPlaying())
			demoSample->Stop();

		delete demoSample;
    }
}

/***
 * Receives a file extension, and attempts to load and play demo/demo.<fileExtension>.
 */
void OpenALStartDemo(char *fileExtension)
{
	OpenALStopDemo();<commit_msg>Deleted pointers should probably be set to NULL.<commit_after>#include "cbase.h"
#include "convar.h"
#include "openal.h"
#include "openal_oggsample.h"
#include "openal_wavsample.h"
#include "openal_sample.h"
#include "openal_loader.h"
#include "openal_mp3sample.h"
//#include "c_basehlplayer.h"

// Defines differt strings that are used for OpenAL's console commands. %s = file extension
#define OPENAL_DEMO_FILENAME "demo/demo.%s"

IOpenALSample* demoSample = NULL;

/***
 * Stops all demos that rely on the demoSample pointer.
 **/
void OpenALStopDemo()
{
    if (demoSample != NULL)
    {
		if (demoSample->IsPlaying())
			demoSample->Stop();

		delete demoSample;
		demoSample = NULL;
    }
}

/***
 * Receives a file extension, and attempts to load and play demo/demo.<fileExtension>.
 */
void OpenALStartDemo(char *fileExtension)
{
	OpenALStopDemo();
{'fraction_non_alphanumeric': 0.13103864734299517, 'fraction_numerical': 0.0012077294685990338, 'mean_word_length': 4.636054421768708, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1270085', 'n_tokens_mistral': 605, 'n_tokens_neox': 579, 'n_words': 150}