Solved

Input from Audio Port

Posted on 1997-10-06
10
212 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
audio record to file 4 1,086
copy one tchart to another 1 525
Get notified when a TPopupMenu closes? 4 172
how do i remove white background in node inside virtual TVirtualStringTree? 12 101
How do we balance the user experience (UX) with reasonable security measures? It can be done, if you keep these fundamentals in mind.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

13 Experts available now in Live!

Get 1:1 Help Now