Thread: Windows Multimedia API - Audio Mixers

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    35

    Windows Multimedia API - Audio Mixers

    I'm writing a Windows application in C. I'd like to access programmatically to the properties that are shown in the captures I've attached to this post.

    First of all I'd like to check how many options there are in order to play or to record sound. As you can see in the captures I've attached, in my PC I've got:

    Play Control:
    - Play Control
    - Wave/DirectSound
    - MIDI
    - CD Audio
    - Line-In2/Microphone
    - Line-In

    Record Control:
    - MIDI
    - CD Audio
    - Line-In2/Microphone
    - Line-In
    - Microphone

    How can I retrieve this information programmatically? And, how can I mute some options or change the volume, for example? If I'd want to record sound from the microphone, how could I mute all the other record options and adjust the volumen of the microphone in order to record sound?

    I guess I must use the Windows Multimedia API (http://msdn.microsoft.com/library/en...dio_mixers.asp) but I'm confused about the mixers, controls, lines, etc. concepts. Is there any simple example in order to start doing things like that?

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    There is actually a function that does this. I have a program that does this somewhere so I'll try to get back to you on this one.

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Ah hah! Ok you want waveInGetNumDevs() to get the number of input devices. waveOutGetNumDevs() to get number of output devices. waveInGetDevCaps() for gathering info about an input device. waveOutGetDevCaps() for gathering info about an output device. Using these you can create a loop to go through your devices. Enjoy and good luck.

  4. #4
    Registered User
    Join Date
    Jul 2004
    Posts
    35
    Many thanks for your anwser.

    But when I use waveInGetNumDevs I get I've got just 1 waveform-audio input device. What does it mean? As I told you in my previous message if I check Windows Multimedia panel I get:

    Record Control:
    - MIDI
    - CD Audio
    - Line-In2/Microphone
    - Line-In
    - Microphone

    I don't know but it seems that waveInGetNumDevs returns the number of soundcards installed in my system and that's true, there is just one. But how can I retreive the previous list (MIDI, CD Audio, Lin-In2/Microphone, Line-In and Microphone) and select one for recoding, muting the rest of them?

  5. #5

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Use windows API functions in a GTK+ program?
    By Jake.c in forum Windows Programming
    Replies: 19
    Last Post: 01-23-2009, 06:40 AM
  2. how do i compile pipe() API on windows ?
    By intruder in forum C++ Programming
    Replies: 2
    Last Post: 01-04-2006, 06:39 PM
  3. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  4. I dont know Windows API...
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 03-07-2004, 06:24 PM
  5. MFC or Windows API
    By aresashura in forum Windows Programming
    Replies: 7
    Last Post: 12-01-2001, 10:21 PM