Solved

Input from Audio Port

Posted on 1997-10-06
10
208 Views
Last Modified: 2010-04-16
How is it possible to input audio information (from a microphone or something) and use it in a pascal program.  I would also like to be able to alter this information (i.e., echo, distortion, volume adjustment, etc.).  How do I do any of this?
0
Comment
Question by:Krueger092397
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 2

Expert Comment

by:kellyjj
Comment Utility
I believe you can do it the same way you would want to read the mouse/com port etc....    Access the part of memory/ the interrupt  that would be connected to your port.  You should also be able to write to that memory.  In pascal you the "mem[seg:off]"  that can be used to write directly to mem.

I know this isn't the best answer, but I hope it helps
0
 

Author Comment

by:Krueger092397
Comment Utility
But how do I write to procedures that access the mouse, com, and audio ports?  What are the commands that I have to type?  Additionally, how can I play the sounds on a Pascal program once I have made contact with a port?
0
 
LVL 1

Expert Comment

by:potsy
Comment Utility
if it is of any help I have the source to pogram the soundblaster pro card.
0
 
LVL 2

Expert Comment

by:kellyjj
Comment Utility
krueger,  How well do you know pascal?  If you don't know it real well, then you might want to  reject this answer and get potsy's source.
0
 

Author Comment

by:Krueger092397
Comment Utility
I don't know Pascal all that well.  I just started programming late this August, so my programs consists mainly of text and some mathematical calculations.  I'd like to do more (such as something involving input from other ports) but I have no idea how to do this.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Krueger092397
Comment Utility
Potsy, how can I get the source code from you?  Are you going to upload it onto this message board or do you want me e-mail address to upload it personally?  

0
 
LVL 1

Expert Comment

by:potsy
Comment Utility
well the source I have I got off the net and haven't had the time to test it yet so I'll give you the url and if it has what you need I'll submit this as an answer.

http://www.lakenet.com/~potter/audio.pas
0
 

Author Comment

by:Krueger092397
Comment Utility
I can't really use the code until I know how I can related it to input coming from other ports.  It should help once I know how to access the ports, though.  Until then...
0
 
LVL 1

Expert Comment

by:potsy
Comment Utility
so what would you like to do?
0
 

Accepted Solution

by:
mes earned 100 total points
Comment Utility
Hi Krueger,

Try this piece of code:

procedure testAudio;
const soundblasterAddress = $220;
      phone               = 0;

begin
  repeat
    writeLn(port[soundblasterAddress+phone]:3);
  until keyPressed;
end;

I don't know what value you have to use for phone, but you can try all values from 0 to 15 there. When you talk into your phone and the values on the screen changes, you have the right value.

If you would save all that data to a file at a regular time interval, you can add echo, etc. to it.

Greetings from the Netherlands,
MES.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now