Re: function PlaySound does not work
- From: "Jim Carlock" <anonymous@localhost>
- Date: Mon, 2 Oct 2006 11:44:17 -0400
"expvb" <nobody@xxxxxxx> wrote:
Are you sure that you used "regedt32" as the article suggested, not
"regedit"? It's easy to confuse both.
regedit.exe tends to end up getting left on computers and ends up
"working" in the same manner that the winmm.dll works. It ends up
working but relays the calls to the appropriate files.
And it helps to know that when messing with drivers for sound
cards as well, because the manufacturer might do something really
dumb like placing their own volume control on top of the Windows
controls. <g> And they do that!
"Susanne Wenzel" <wirdnichtgelesen@xxxxxxxxxxxxx> wrote:
I can't believe it, there is another problem, my computer plays
Mid-files soundless, even with the WMP...
WMP doesn't seem to get involved with winmm.dll in the playing
of wave files.
That MIDI problem might be easy to fix. Go into the Control Panel,
look for anything that indicates Sound, take a look at the dialogs
that pop up. It's typically the "Sounds And Audio Devices" (XP title)
dialog that contains the settings (might hold a slightly different title
in W2K). Click on the "Audio" tab (might be different in W2K).
Take a look at the Default devices selected. Let us know what the
options are there and what you've tried changing it to. You might
need to shut down WMP and reload WMP before trying to play
the sound again after you change something here. There might be
some volume controls here as well (I think someone mentioned it
already, but take a look).
Also note, that the volume controls here tend to be the main
volume controls and there tend to be more volume controls in
other places. Make sure you put the little checkmark next to
the "Place volume icon in the taskbar". Then open that volume
icon in the task bar up and click on File, Properties. You'll see
a combobox for Playing, Recording and possibly others. Click
on the Play or Playback and check everything off in the list
below and then click Apply. Then go through that list and look
for buttons there and Mute checkboxes. Turn the WAV volume
up there and the MIDI volume as well. <g> It sounds like you
might have missed something in this area.
Also, inside the Control Panel look for other icons that bear the
name of your sound drivers, or they might have the words Sound,
Volume or Multimedia. I've got three Icons in Control Panel that
deal with sound.
(1) Sounds and Audio Devices (standard windows item), might
have a slightly different name with Win2K or other operating
systems.
(2) Sound Effects Manager. This one is provided by the sound
card manufacturer. It has its own speaker controls and line and
line out rerouting controls (can handle extra speakers and such
instead of a microphone). It also has it's own equalizer control.
(3) CMI Audio Config <= Don't have a clue what this one is
or does but it probably belongs to some audio editor.
And this time I have the same effect when I do a doubleclick on a
mid-file in the explorer. WMP opens and shows the file, the little
slide (or whatever you call it) below moves slowly to the righthand
corner, no sound.
That means it's found the file and recognizes a selected playing
mechanism, so that's good. You might want to check your event
logs, specifically the Application and System logs to see what kind
of events are getting fired off there.
Start, Run, type in eventvwr.exe or type eventvwr.exe inside a
command prompt.
I tried to find out which internal functions/libraries the WMP uses
(at least he's successful in playing wav-files), I would guess it is the
winmm.dll as well.
I tried that last night and didn't see WMP going to winmm.dll. It looked
like it was going straight to the drivers with a call to the following,
NtGetVolumeInformation. Which again encourages me to suggest that
there's something you've overlooked in the volume controls somewhere.
Maybe the drivers don't use the Microsoft's provided controls and use
their own. In this case, Task Manager (taskmgr.exe) is your friend, and
I encourage you to scroll through the list of files there and become
familiar with those files (some things are easy to identify and some things
are not and it's definitely worth a little time to get to to know them).
Pardon me for repeating myself. It'll sink in once I've said it enough.
<g>
You might want to go to SysInternals and download their FileMon...
http://www.sysinternals.com/FileAndDiskUtilities.html
to help track which files get read. It'll look inimidating on the first
try, but that could help you track down which files are getting called
(read) when the media player plays, but I don't think that's going to
help you at all in solving your current problems.
And I feel like I'm sinking into the depths of my computers inner
life like I never wanted to.:-)
My professional opinion... there's some other software on your
system (has to do with your drivers possibly) that's controlling
the volume. Either inside Windows own volume controls or there's
a second set of controls somewhere (use taskmgr.exe to identify).
There might be two volume controls in the task bar or not. Typically
alot of sound card manufacturers provide their own volume controls
rather than creating software that uses the Windows volume con-
trols. This created problems in the past where sometimes you hear
sounds and sometimes you don't. Sound familiar? The system I'm
on right at the moment has two volume controls.
Basically, here's how Windows works in general.
Winmm.dll provides the very programmer friendly API to use to
do simple things. That interfaces with the drivers. WMP in turn
doesn't use the winmm.dll. To find the appropriate driver files that
handle sound events, the software looks through the registry for
particular identifiers indicating a sound or multimedia device, and
then goes straight to the drivers, bypassing winmm.dll.
The following Filter might help with the file monitor, after you see
everything in the first run, you'll want to not include any of your
anti-virus or other such stuff that reads the files (usually it's duplicate
information already displayed by the calling process).
Include: *.drv;*.sys;winmm.dll
Exclude: avg*.exe
Try the following first and create logs for searching through.
Include: *
Delete the lines you know have nothing to do with sound or your app.
You can then jump down to the driver files and take a look at what's
getting called right before the drivers get called. Posting the filenames
here causes the folks here to search Google, so search google first to
see if you can identify the files.
Sometimes driver manufacturers use the same prefix on all their
filenames, for instance all of Sound Blaster's driver files might start
with cl*.dll (for Creative Labs). So you can open a command
prompt, go to %systemroot%\system32 and type: dir cl*.* to see
what turns up. Perhaps there's such an ini file there. I used cl as an
example and I don't expect any cl*.* files on your system or even
on a Sound Blaster system. It's just an example. <g>
I know I'm throwing a lot your way and some of it may be repeated
from what others posted. I'm 90% convinced that you've missed
a volume control somewhere and either taskmgr.exe or the Control
Panel is going to be your friend.
The File Monitor may be helpful, but save that for last. And Paul
Clement suggested reinstalling the drivers, and that brought up
another possible issue that might involve your MIDI, but I don't
think applies to your WAV problems, open your Device Manager
(devmgmt.msc) and take a look at the sound video and game
controllers section there.
Click on View and select Devices By Type if you don't see "Sound,
Video and Game Controllers".
Hope this helps. It's more than I wanted to post at one time. My
apologies.
--
Jim Carlock
Post replies to the group.
.
- References:
- Re: function PlaySound does not work
- From: Susanne Wenzel
- Re: function PlaySound does not work
- From: expvb
- Re: function PlaySound does not work
- From: Susanne Wenzel
- Re: function PlaySound does not work
- From: expvb
- Re: function PlaySound does not work
- From: Jim Carlock
- Re: function PlaySound does not work
- From: Susanne Wenzel
- Re: function PlaySound does not work
- From: expvb
- Re: function PlaySound does not work
- From: Susanne Wenzel
- Re: function PlaySound does not work
- From: expvb
- Re: function PlaySound does not work
- Prev by Date: Re: API misunderstands VB function that returns a variant...?
- Next by Date: Re: function PlaySound does not work
- Previous by thread: Re: function PlaySound does not work
- Next by thread: Re: function PlaySound does not work
- Index(es):
Relevant Pages
|