Skip to content

PhillipDaPaster/Windows-Media-Controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Windows Multi Media Controller

Overview

A modern, safe, and lightweight C++ wrapper around Windows' system media transport and volume control APIs.

Supports playback management, media metadata retrieval (title, artist, album, artwork), and system volume control — all via native WinRT and Core Audio interfaces.

Example Usage

Create a MediaController Instance

MediaController media;

Get Current System Volume

float volume = media.GetVolume();

Setting System Volume

media.set_volume(50.f);

Retrieve Current Song Info

std::string title  = media.GetTitle();
std::string artist = media.GetArtist();
std::string album  = media.GetAlbumTitle();

Retrieve Album Art

std::vector<uint8_t> art = media.GetAlbumArt(); 

Get Playback Status

std::string status = media.GetPlaybackStatus();  // "Playing", "Paused", "Stopped", "Changing".

Get Timeline Info

double position = media.GetPosition();   // seconds
double duration = media.GetDuration();   // seconds
std::string time = media.GetFormattedTime(); // MM:SS / MM:SS

Media Playback Controls

Play Media

media.play();

Pause Media

media.pause();

Stop Current Media

media.stop();

Skip Track

media.next();

Previous Track

media.previous();

Dependencies

WinRT.
Required for accessing Windows Runtime APIs like Windows.Media.Control and Windows.Storage.Streams.
Core Audio API.
Includes headers like mmdeviceapi.h and endpointvolume.h for audio control.
Windows SDK.
Provides the necessary libraries and tools to build applications for Windows.

License

This project is licensed under the GNU General Public License.
See the LICENSE file for more details.

Windows Multi Media Controller

About

Simple windows mutli-media controller

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages