Console Play a sound - best method??

Hey all,

For an assignment in a module of my degree, I need to write a console application MIDI sequencer. What would be the best method for creating a sound?

Although I've done a lot of VBA and VB.net programming, I'm new to C++..

I was looking at Beep function which would be nice and simple but I've also seen the following Sound function (https://www.daniweb.com/programming/software-development/code/216360/play-a-midi-voice-dev-c-console-program)
This looks perfect as it gives so much more scope for the program but as i'm new to C++ i don't know how much of the code is superfluous or is it all needed to create and run the function?

I also saw the Sound and Delay functions (http://cprogg.blogspot.co.uk/2011/10/use-of-sound-and-delay-function-in-c.html) but cannot get it too work as the complier says Sound and Delay are undefined, even using #include <dos.h>

I can get Beep to work but thought there might be a better method and one with moe versatility..

Paul..

The first link you provide is literally ten years old and the guy in the second post is what we call a "complete idiot". Playing sound is a platform specific operation, even though we can infer that you are using Windows I would still suggest that you use a third party library for this anyway. I suggest SFML: http://www.sfml-dev.org/tutorials/2.3/audio-sounds.php
Topic archived. No new replies allowed.