Audio Ports

Programming, for all ages and all languages.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Audio Ports

Post by Solar »

abraker95 wrote:So how does the computer know the port addresses when I look at them using device manager?
Because the people programming computers are using technical documentation, not user manuals. If you cannot tell the difference at a glance, and all this talk about "vendor ID" and "datasheet" confuses you, then rest assured: Even with the correct documentation you wouldn't be able to use the audio ports.
Every good solution is obvious once you've found it.
abraker95
Member
Member
Posts: 36
Joined: Mon Feb 14, 2011 7:39 am

Re: Audio Ports

Post by abraker95 »

I did A LOT of research and I became stuck on Direct Memory access(DMA). I've got a working example from the internet, but have no idea how it works. :(
Attachments
WAVPLAY.C
This plays a mono wav file
(5.32 KiB) Downloaded 53 times
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: Audio Ports

Post by Tosi »

That is a specific example of playing a .WAV format file under DOS, using the Soundblaster. It may be relevant to your own OS, however, since Bochs (an x86 emulator) has SB emulation. You just won't have the DOS functionalities ("conio.h" et al.) available, and the BIOS neither if you're in protected mode.

As for DMA, looking up "DMA reference" on Google (try it, it's pretty easy!) got me this interesting looking website. A search for "intel 8237", the DMA chip for ISA, got me a ton of results. I don't feel like sifting through them, but you can check it out. Looking up "SoundBlaster" got me a bunch of info too, for many cards that include SoundBlaster compatibility.
Post Reply