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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
chensuCommented:
The article is a tutorial. You just need to change a few parameters.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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
chensuCommented:
How to Use Wave Audio Volume Control APIs
http://support.microsoft.com/support/kb/articles/Q139/0/98.asp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.