Hi Mark,
you are right with that.
disabled onboard sound in bios returns two devices:
SB Live!-Wavegerät
Tunebite High-Speed Dubbing
enabled onboard sound adds two further:
Soundmax HD Audio I
Soundmax HD Audio O
MSDN writes: http://msdn2.microsoft.com/en-us/library/aa910250.aspx
"The device identifier specified by uMxId varies from zero to one less
than the number of devices present."
So I always get the first mixer-device when calling the API with a
zero as second param.
But how can I force mixeropen to retrieve the defaultmixer-device, the
one I set in the Sound-Properties in "Einstellungen" (don't know what
that startmenu-item is called in english).
Thanks for help TH
Mark Yudkin schrieb:
> I wonder if mixerOpen is returning the (disabled) on-board device, since you
> have more than one (what does mixerGetNumDevs return?). I suspect you'll
> need to specify the device you want.

Signature
Thomas Hoffmann
Mark Yudkin - 28 May 2007 16:46 GMT
Einstellung is setup, but in the Sound Properties it's under Audio.
Fortunately, I've never been forced to work with a German Windows (my poor
wife has to, and then I get mails asking for English translations so she can
work out what's going on - and she's Swiss German)
---
Unfortunately, I don't know the answer to your question. Try googling for it
> Hi Mark,
> you are right with that.
[quoted text clipped - 24 lines]
>> you have more than one (what does mixerGetNumDevs return?). I suspect
>> you'll need to specify the device you want.
Roger Evrard - 30 May 2007 10:51 GMT
I suspect that the mixer nr 0 opened with rc = mixerOpen(hMixer, 0, 0, 0, 0) does not support the type speakers (type 4, I think).Your other mixer should have the ID 1 and should open with rc = mixerOpen(hMixer, 1, 0, 0, 0), I think. For more detail, see http://www.borg.com/~jglatt/tech/mixer.htm.
I run this piece of code on my PC and got an error message 11, except for i = 0, 4, and 7.
newLine = Chr(13) & Chr(10)
textBuffer = ""
mxl.cbStruct = Len(mxl)
For i = 0 To 10
mxl.dwComponentType = i
getLineSuc = mixerGetLineInfo(hmixer, mxl, 3)
trimName = ""
For j = 1 To Len(mxl.szName)
If Asc(Mid(mxl.szName, j, 1)) <> 0 Then trimName = trimName + Mid(mxl.szName, j, 1)
Next j
textBuffer = textBuffer & getLineSuc & " " & i & " " & trimName & newLine
Next i
Text1.Text = textBuffer
Hope this can be of some help to you.
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com