Solved

Input from Audio Port

Posted on 1997-10-06
10
214 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
ID: 1216109
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
ID: 1216110
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
ID: 1216111
if it is of any help I have the source to pogram the soundblaster pro card.
0
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
LVL 2

Expert Comment

by:kellyjj
ID: 1216112
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
ID: 1216113
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
 

Author Comment

by:Krueger092397
ID: 1216114
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
ID: 1216115
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
ID: 1216116
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
ID: 1216117
so what would you like to do?
0
 

Accepted Solution

by:
mes earned 100 total points
ID: 1216118
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
Ransomware continues to grow in reach and sophistication, putting data everywhere at risk. Learn how to avoid being caught in its sinister clutches with these 11 key tips.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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