Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Latest commit

 

History

History
44 lines (30 loc) · 1.34 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.34 KB

WinAudio

WinAudio is a library for audio playback on Windows 7 and later. This project was born from the passion for music and programming. Developed as a hobby on weekends and after work.

The output is based on WASAPI in Shared Mode. Stream switch is supported.

The decoding of compressed audio files is based on Media Foundation. Currently supported MP3, and WMA. The decoding of PCM WAV files is done by a specially written module.

Editing and Compilation

The project was developed with Visual Studio 2019. So just open the WinAudio.sln file to start editing and compiling the code.

The supported platform is currently x86. No tests have been done on the X64 platform.

Development stage

The project is currently sufficiently complete and stable, but It is not yet complete and the code or structure may change in the future.

How to get started

Include "WinAudio.h" in your project

#include <stdint.h>
#include "..\WinAudio\WinAudio.h"

int main()
{
	WinAudio_Handle* pHandle;
	int32_t nErrorCode = 0;

	// Create new WinAudio Instance
	pHandle = WinAudio_New(WINAUDIO_WASAPI, &nErrorCode);
	
	// Try to open a new File
	nErrorCode = WinAudio_OpenFile(pHandle, pFilePath);	

	// Try to Play
	nErrorCode = WinAudio_Play(pHandle);
  
  	// Remember to Check for Errors...

	// Close WinAudio Instance
	WinAudio_Delete(pHandle);

	return 0;
}