Repeating midi files, and setting midi/sound volume + muting

Well, as well as my last question about INI files, I thought it would be easy to find out how to change midi and sound volume, repeat midi files, and mute the sound / midi.  I cannot find anything on this, so I am asking here.  If anyone can give me some C++Builder example, or just some C++ code on muting and changing volume level, and some code on repeating the midi files (not visual c++ source please), you'd be very helpful!!
nfcdrummerAsked:
Who is Participating?
 
chensuConnect With a Mentor Commented:
How to Use Wave Audio Volume Control APIs
http://support.microsoft.com/support/kb/articles/Q139/0/98.asp
0
 
chensuCommented:
Check out my article at CodeGuru.

Audio Mixer Functions Demo
http://www.codeguru.com/multimedia/ADMixer.shtml

The framework is MFC. But you can extract all the amd* functions for your own use.
0
 
nfcdrummerAuthor Commented:
Sorry, but this is no use to me - I don't want to change the master volume, only the wave volume and the midi volume, and mute both of these
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
chensuCommented:
The article is a tutorial. You just need to change a few parameters.
0
 
chensuCommented:
Alternatively, you may also use the waveOutSetVolume and midiOutSetVolume functions.
0
 
nfcdrummerAuthor Commented:
well I'll try it out, if I can get it to work I'll award you the points?
0
 
nfcdrummerAuthor Commented:
sorry Chensu I've tried, but  I can't seem to get it to work... Also I am using C++ Builder 4, not Visual C++ 5... That may  help
0
 
chensuCommented:
All of those multimedia functions are Win32 API functions. Using which compiler doesn't matter. What have you done? What have you got? Are there any error messages?
0
 
nfcdrummerAuthor Commented:
it says it cannot find some 'win???.h' files...
and also 'missing ,' and 'missing ;' but that was in my Borland C++ 5.02 compiler, not the Builder.

I was also thinking, maybe you could send me a Visual C++ Project file with these procedures used because C++Builder can convert them and that might help

I'll also try something else that I didn't think of before..
0
 
chensuCommented:
You need to include <mmsystem.h> and link with winmm.lib.
0
 
nfcdrummerAuthor Commented:
well, I'm getting somewhere now, but I'm having trouble... I'm not exactly sure how to use the waveOutSetVolume function...

here is what I'm doing:

if (TempCount == 6) waveOutSetVolume(void, 0x6000);

it gives me error 'E2188: Expression Syntax.'
I seriously don't think this is right... could you give me some help please?

also once I've finished doing the volume settings or have it all written down or memorised I will award you the points as I'm finally working it all out!
0
 
nfcdrummerAuthor Commented:
thanks mate... I spent about 3 hours this morning trying to figure it out and that link was all I needed !!!

laterz

Dave
0
All Courses

From novice to tech pro — start learning today.