How do i play a wavefile using MFC?

Posted on 1998-12-27
Last Modified: 2013-11-20
How do i play a wavefile using MFC? How does the sndPlaySound command work?
Question by:byrdal
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

ppeck earned 50 total points
ID: 1326782
hi byrdal,

there are no MFC classes dealing with wav files.

the sndPlaySound() function simply plays a wav file and it is a very comfortable way
to do that. however, you should only play short wav files with it, since they have to
fit into physical memory. moreover, the documentation says

> sndPlaySound is being maintained for backward compatibility.

so use the PlaySound() function instead (which offers basically the same functionality).

if you need advanced output facilities, check out the sound output class at:



Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question