<commit_before>/*
 *			Class to support direct audio playing
 *
 *						Copyright (C) 2002-2003  <NAME>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * <NAME>
*/

#ifndef SOUND_WIN32_H
#define SOUND_WIN32_H

#include <windows.h>
#include <mmsystem.h>
#include "afmt.h"

const int MAX_HEADERS= 20;
const int BUFFER_SIZE= 10000;

static void CALLBACK wave_callback(HWAVE hWave, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2);
static void CALLBACK iwave_callback(HWAVE hWave, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2);

// *****************************************************************************************************
// generic error handler for all classes below
// *****************************************************************************************************
class DeviceHandler
{
protected:
	char sErr[ 512 ];
	int iErr;

	// ----------------------------------------------
	void FormatError()
	{
		LPVOID lpMsgBuf;
		this->iErr= GetLastError();
		FormatMessage(
				FORMAT_MESSAGE_ALLOCATE_BUFFER |
				FORMAT_MESSAGE_FROM_SYSTEM |
				FORMAT_MESSAGE_IGNORE_INSERTS,
				NULL,
				this->iErr,
				MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language<commit_msg>Number of buffers increased<commit_after>/*
 *			Class to support direct audio playing
 *
 *						Copyright (C) 2002-2003  <NAME>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * <NAME>
*/

#ifndef SOUND_WIN32_H
#define SOUND_WIN32_H

#include <windows.h>
#include <mmsystem.h>
#include "afmt.h"

const int MAX_HEADERS= 40;
const int BUFFER_SIZE= 10000;

static void CALLBACK wave_callback(HWAVE hWave, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2);
static void CALLBACK iwave_callback(HWAVE hWave, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2);

// *****************************************************************************************************
// generic error handler for all classes below
// *****************************************************************************************************
class DeviceHandler
{
protected:
	char sErr[ 512 ];
	int iErr;

	// ----------------------------------------------
	void FormatError()
	{
		LPVOID lpMsgBuf;
		this->iErr= GetLastError();
		FormatMessage(
				FORMAT_MESSAGE_ALLOCATE_BUFFER |
				FORMAT_MESSAGE_FROM_SYSTEM |
				FORMAT_MESSAGE_IGNORE_INSERTS,
				NULL,
				this->iErr,
				MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
{'fraction_non_alphanumeric': 0.19363256784968685, 'fraction_numerical': 0.02139874739039666, 'mean_word_length': 4.083554376657825, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6768779', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1003, 'n_words': 406}