Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > API > PLZ PLZ PLZ PLZ HELP!


Reply
 
Thread Tools Display Modes
  #1  
Old 12-11-2000, 12:02 PM
CoolKat
Guest
 
Posts: n/a
Exclamation PLZ PLZ PLZ PLZ HELP!


I have asked this until I am blue in the face. Please someone answer this SIMPLE puzzle for me.

1 program using VB6
2 Windows Media Players
2 Soundcards

sound from Media player 1 to Soundcard 1
sound from Media player 2 to Soundcard 2

How the Hell do I do it?

By the way if I sound frustrated, I am. Please reply even if you just want to say P*** off.

Thanks guys, you're the bestest ever!

Stay KOOL

Reply With Quote
  #2  
Old 12-11-2000, 01:09 PM
adebuigny adebuigny is offline
Junior Contributor
 
Join Date: Sep 2000
Location: New Orleans
Posts: 197
Default Re: PLZ PLZ PLZ PLZ HELP!

The problem you are having is a major roadblock.

Windows Media Player has no way of specifying which soundcard you want to use. It simply looks for the default sound card.

You only hope at this solution is to play the files with your own code, using the windows API calls. the API call 'CreateDC' might be something you will use, though how you go about finding what parameters to send it for a sound card is way beyond my limited knowledge.

Good luck, I think you're going to need it.

Reply With Quote
  #3  
Old 12-12-2000, 12:54 AM
CoolKat
Guest
 
Posts: n/a
Default Re: PLZ PLZ PLZ PLZ HELP!

Thank you so much for replying. You go on my Christmas card list pal...

I will try to find out about that one.

I have been sent a dll called win95io.dll which, they claim, should do it. Problem is I don't know enough about API calls to complete it. Here is what they sent. Maybe you can advise, if not It may be worth copying for later.

Win95io, Version 1.01
Copyright (c) 1996-97 SoftCircuits Programming (R)
Redistributed by Permission.

Win95io.DLL is a 32-bit DLL that provides access to port input/output
(I/O) under Windows 95. It was written for use with 32-bit Visual
Basic since Visual Basic does not have I/O instructions. Note that,
due to the Win32 architecture, the DLL may not always behave exactly
as expected. This DLL is documented in more detail below.

This package may be distributed on the condition that it is
distributed in full and unchanged, and that no fee is charged for
such distribution with the exception of reasonable shipping and media
charges. The DLL may also be distributed with any programs you write
that use this DLL on the condition that you do not hold SoftCircuits
liable for any liabilities incurred as a result of such programs. In
addition, source code from any examples included with this package
may be incorporated into your own programs and the resulting programs
may be distributed in compiled form without payment of royalties.

SoftCircuits provides this software "as is" with no warranty of any
kind. We have attempted to provide software that may be useful and
attempted to describe those situations where we believe it is not be
useful. SoftCircuits makes no other claims with regards to this
software including claims that this documentation is accurate. Use
this software and documentation at your own risk.

This example program was provided by:
SoftCircuits Programming
http://www.softcircuits.com
P.O. Box 16262
Irvine, CA 92623

====================================================================

While DOS and Windows 3.x applications may perform port I/O freely,
Win32 operating systems assume that port I/O is handled by device
drivers. As discussed in Microsoft KB article Q112298, attempting to
use the port I/O functions from within an application for Windows NT
running in user mode causes a privileged instruction exception to
occur. Although Windows 95 takes a similar approach, port access
under Windows 95 does NOT cause a protection fault. Thus the reason
for writing this DLL.

Although port access under Windows 95 does not cause a protection
fault, it may not always perform as expected. For example, if a DOS
application is accessing the same port, or a device driver has
control of the same port then a port read or write may be ignored.
Further, if you write a 32-bit application that uses this DLL, care
must be taken to prevent it from running under NT.

Declarations:
-------------
Declare Sub vbOut Lib "WIN95IO.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
Declare Sub vbOutw Lib "WIN95IO.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
Declare Function vbInp Lib "WIN95IO.DLL" (ByVal nPort As Integer) As Integer
Declare Function vbInpw Lib "WIN95IO.DLL" (ByVal nPort As Integer) As Integer

Best wishes



Stay KOOL

Reply With Quote
  #4  
Old 12-12-2000, 08:12 AM
adebuigny adebuigny is offline
Junior Contributor
 
Join Date: Sep 2000
Location: New Orleans
Posts: 197
Default Re: PLZ PLZ PLZ PLZ HELP!

This doesn't make it any easier. There are several problems you are going to have to solve.

1. Figuring out which port each of the sound cards are on (might have to be specified by the users, because I'm not sure if Windows will tell you any other than the default.

2. The integer value nData...I have no idea what this is meant to represent. Is there any other documentation that came with that DLL?

3. Assuming that the DLL somehow accesses the data that you want to pump through the soundcard, I doubt that the DLL makes use of the Windows routines for pumping out the sound? How are you going to figure out the format the data needs to be in for your sound card(s) to recognize it.

4. If your program is going to be meant for others, you will have to have information on lots of different sound card configurations, and code that can format the data for each of them.

As far as calling DLL's , you simply paste those declares in the general declarations section of a visula basic module, or a form, and then you can call those functions the same way you would call any function in VB. However, you are still left with what data to send it.

Good luck.

<P ID="edit"><FONT SIZE=-1><EM>Edited by adebuigny on 12/12/00 09:14 AM (server time).</EM></FONT></P>
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->