Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / September 2008



Tip: Looking for answers? Try searching our database.

API_mciSendString hangs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thomas Hoffmann - 07 Sep 2008 18:48 GMT
Hello,
I'm using the mp3.bas from Michael Karathanasis for years in a little prog for mp3s.
(http://www.vbforums.com/attachment.php?attachmentid=3227&d=994045718)

Since some days the above Api fails when is called by
API_mciSendString "open " & mmName & " type MPEGVideo alias mp3", 0, 0, 0
but only in some mp3-files. I cannot understand why. I can play these files with other
players.
The api is called, and the system-rescources increase to 100% and the code stops. I have
to kill the VB-developing-Engine, its the only way to continue.
No error-message.

Maybe this started, after I installed MAGIX Video deluxe 2007-2008, but I'm not shure.

Has anybody any idea?

(VB6, Win2K)

Thanks
Signature

Thomas Hoffmann

Jim Mack - 07 Sep 2008 20:42 GMT
> Hello,
> I'm using the mp3.bas from Michael Karathanasis for years in a
[quoted text clipped - 6 lines]
> these files with other
> players.

I wouldn't have thought "type MPEGVideo" was appropriate for an audio
file. Whatever codec is registered to play that type may have worked
for mp3's in the past, but the change you made could have broken that.

Try a better "type ..." clause.

Signature

       Jim

Alfie [UK] - 07 Sep 2008 23:15 GMT
>I wouldn't have thought "type MPEGVideo" was appropriate for an audio
>file. Whatever codec is registered to play that type may have worked
>for mp3's in the past, but the change you made could have broken that.
>
>Try a better "type ..." clause.

Nope, MPEGVideo is the only applicable type for MP3 files.

I've seen this happen with some codec packs that intercept/handle mp3s;
see if the MP3 opens and plays with Windows Media Player/Media Player
Classic, check that you have a valid MPEG codec (In XP: Control
Panel->Sounds and Audio Devices->Hardware->Audio
Codecs->Properties->Properties), try re-installing the Windows Media
Audio Codecs, if you have multiple codec packs installed make sure that
they are not conflicting, etc, etc.
Signature

Alfie [UK]
<http://www.delphia.co.uk/>
Why is a Failed marriage like a hurricane ? There is a lot of blowing at the start, then you loose your house!

Thomas Hoffmann - 13 Sep 2008 11:00 GMT
Thanks, Alfie,

> Nope, MPEGVideo is the only applicable type for MP3 files.

Thats right, see f.i. http://www.vbarchiv.net/api/api_mcisendstring.html

> I've seen this happen with some codec packs that intercept/handle mp3s;
> see if the MP3 opens and plays with Windows Media Player/Media Player
[quoted text clipped - 3 lines]
> Audio Codecs, if you have multiple codec packs installed make sure that
> they are not conflicting, etc, etc.

Thanks for this, too
1. I can play those songs with WMP, which are not handled by the api.
2. Even if I disable all Audio-Codecs, mp3s are played by the api and by WMP furthermore.
This is something, I dont understand.

yours TH

Signature

Thomas Hoffmann

Alfie [UK] - 19 Sep 2008 19:34 GMT
>Thanks for this, too
>1. I can play those songs with WMP, which are not handled by the api.
>2. Even if I disable all Audio-Codecs, mp3s are played by the api and by WMP furthermore.
>This is something, I dont understand.

You might want to check that you are using the GetShortName API to pass
the short name to MCI (it is in use in the code you linked to, but just
in case you bypassed it somewhere) and try editing the MP3 names to omit
spaces or any 'special' characters (including the path to the files).

Not using short names usually means MCI will just fail to load the file
though, not eat up all your CPU, so I doubt that that is the issue.

Another possibility is to check the eocnoding of the files that cause
issues, see if they are the same as files that work, and re-encode them
if you have the software to do so.
Signature

Alfie [UK]
<http://www.delphia.co.uk/>
It's called Irony. You know. Like goldy or silvery, only it's made out of iron.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.