comp.lang.ada
 help / color / mirror / Atom feed
* soundcard
@ 2001-01-12 11:54 Daniel Nilsson
  2001-01-12 15:11 ` soundcard Ted Dennison
  2001-01-15 17:39 ` soundcard Anders Gidenstam
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Nilsson @ 2001-01-12 11:54 UTC (permalink / raw)


Hi.
I need info on how to use soundcard in ada95 , Myself I have a soundblaster
128 pci. I have no prior experience in soundcard-programming.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: soundcard
  2001-01-12 11:54 soundcard Daniel Nilsson
@ 2001-01-12 15:11 ` Ted Dennison
  2001-01-12 19:37   ` soundcard tmoran
  2001-01-15 17:39 ` soundcard Anders Gidenstam
  1 sibling, 1 reply; 5+ messages in thread
From: Ted Dennison @ 2001-01-12 15:11 UTC (permalink / raw)


In article <93mr6p$33l$1@eol.dd.chalmers.se>,
  "Daniel Nilsson" <danielnilsson@REMOVE_THIShem3.passagen.se> wrote:
> I need info on how to use soundcard in ada95 , Myself I have a
> soundblaster 128 pci. I have no prior experience in
> soundcard-programming.

What you need then is info on how to program a soundcard, period. Ada95
will only be an issue when you already know exactly what you want to do.

As for how to program a soundcard, period; this isn't the proper
newsgroup to be asking in. But from my (miniscule) knowledge of the
subject, I'd say (assuming you are using some recent version of Windows,
which you didn't bother to tell us) you'll probably want to put the
appropriate sound in a .WAV file and call the "PlaySound" system
service. See your nearest Windows programming documentation for more
info on this. If you can't find an Ada binding to this system call, it
should be fairly easy to make your own.

If you want to do something more complicated, you'll probably need to
learn how to use the DirectSound API. Once you have that figured out, I
think the best way into it from Ada is probably going to be through COM.
See http://www.adapower.com/gnatcom/index.html for more information on this.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com
http://www.deja.com/



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: soundcard
  2001-01-12 15:11 ` soundcard Ted Dennison
@ 2001-01-12 19:37   ` tmoran
  0 siblings, 0 replies; 5+ messages in thread
From: tmoran @ 2001-01-12 19:37 UTC (permalink / raw)


>appropriate sound in a .WAV file and call the "PlaySound" system
>service. See your nearest Windows programming documentation for more
>...
>learn how to use the DirectSound API.
  You can also put a sound into an internal memory buffer and use
PlaySound to play it.  One of the Claw example programs plays a
simple tune this way.  The user can move slider bars to adjust the
decay and harmonics to vary the sound from xylophone to organ.  It
runs just fine in real time on a P200.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: soundcard
  2001-01-12 11:54 soundcard Daniel Nilsson
  2001-01-12 15:11 ` soundcard Ted Dennison
@ 2001-01-15 17:39 ` Anders Gidenstam
  2005-01-28  2:57   ` soundcard Adrian Hoe
  1 sibling, 1 reply; 5+ messages in thread
From: Anders Gidenstam @ 2001-01-15 17:39 UTC (permalink / raw)


In article <93mr6p$33l$1@eol.dd.chalmers.se>,
	"Daniel Nilsson" <danielnilsson@REMOVE_THIShem3.passagen.se> writes:
> Hi.
> I need info on how to use soundcard in ada95 , Myself I have a soundblaster
> 128 pci. I have no prior experience in soundcard-programming.

Hello,

Well, this of course completely operating system dependent. (Assuming that
you are using an operating system, but I'd guess you are ;)

Anyway, if you happen to use Linux (or some other Unix system) the sound
system are controlled through some device files (for example
/dev/dsp and /dev/mixer on linux) using the OS read/write and ioctl calls.
So what you want/need is an Ada-binding for the soundsystem on your
operating system.
The Florist POSIX binding provide open/close/read/write but I think you'll
need to create your own binding for the ioctl calls.

I have a small partial working (maybe) binding for the linux mixer API that
I wrote some years ago, if you are interested I could send it.

/Anders Gidenstam
-- 
--------------------------------------------
"A well-written program is its own heaven; 
 a poorly-written program is its own hell."
  - The Tao of Programming 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: soundcard
  2001-01-15 17:39 ` soundcard Anders Gidenstam
@ 2005-01-28  2:57   ` Adrian Hoe
  0 siblings, 0 replies; 5+ messages in thread
From: Adrian Hoe @ 2005-01-28  2:57 UTC (permalink / raw)


Hi,

I am searching for something similar and I have found this old thread
but my interest is not in programming sound card.


Anders Gidenstam wrote:
> In article <93mr6p$33l$1@eol.dd.chalmers.se>,
> 	"Daniel Nilsson" <danielnilsson@REMOVE_THIShem3.passagen.se> writes:
> > Hi.
> > I need info on how to use soundcard in ada95 , Myself I have a
soundblaster
> > 128 pci. I have no prior experience in soundcard-programming.
>
> Hello,
>
> Well, this of course completely operating system dependent. (Assuming
that
> you are using an operating system, but I'd guess you are ;)
>
> Anyway, if you happen to use Linux (or some other Unix system) the
sound
> system are controlled through some device files (for example
> /dev/dsp and /dev/mixer on linux) using the OS read/write and ioctl
calls.
> So what you want/need is an Ada-binding for the soundsystem on your
> operating system.
> The Florist POSIX binding provide open/close/read/write but I think
you'll
> need to create your own binding for the ioctl calls.



What's the difference of open/read/write between Florist POSIX binding
and gnat_os_lib?









> I have a small partial working (maybe) binding for the linux mixer
API that
> I wrote some years ago, if you are interested I could send it.

Yes, I'm interested to take a look at the code. Where can I find them?






> /Anders Gidenstam
> --
> --------------------------------------------
> "A well-written program is its own heaven;
>  a poorly-written program is its own hell."
>   - The Tao of Programming


Thanks.
--
Adrian Hoe




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-01-28  2:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-12 11:54 soundcard Daniel Nilsson
2001-01-12 15:11 ` soundcard Ted Dennison
2001-01-12 19:37   ` soundcard tmoran
2001-01-15 17:39 ` soundcard Anders Gidenstam
2005-01-28  2:57   ` soundcard Adrian Hoe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox