How to play a simple audio with WIn32 API in C++

thebluetropics 1,046 Reputation points
2022-09-19T09:55:08.043+00:00

I have read the Win32 documentation in Graphics and Multimedia section, Core Audio Programming Guide.

There is no simple example to load mp3 file and play it using Win32 API in the documentation, as always.

In short, I am looking for a simplest approach for loading an mp3 file and play the sound using Win32 API.

If possible, I need to do pause, track the progress, stop, skip or back at specified position.

Note: Simple here doesn't mean easy, it can be a complex thing, on the most basic level.

Windows development Windows API - Win32
Developer technologies C++
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 90,521 Reputation points
    2022-09-19T10:07:17.903+00:00

    One of the simplest ways is with MCI, like mciSendString

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Guido Franzke 2,191 Reputation points
    2022-09-19T10:12:13.237+00:00

    Hello,
    have a look at this: simplest-way-to-play-mp3-from-visual-c
    Regards, Guido

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.