Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-03

OS/2 DART/MMPM information?

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Matti Hamalainen

Sorry, this is a bit off-topic on this maillist :)

Are there any programmers with knowledge of OS/2's sound APIs? (DART/MMPM if I remember right)

I need such info, but can't find it from IBM's site or such. Yes, I could look into various GPLd programs, but understanding the workings is not easy just by looking complex code.

Additionally, I need info on realtime timing possibilities (callback timers/events) under OS/2.

Specifications and simple programming examples (C/C++/Pascal) would be very helpful.

(I need the info for writing OS/2 support into my free software sound system project JSS, which is being developed for use with FPC. http://jss.sourceforge.net)

Thanks in advance,

= ccr/TNSP - | http://www.tnsp.org/ =
= Foo is a synonym for Bar, but not vice versa. =

Reply by email

Balogh, Karoly (Charlie/iNQ
to Matti Hamalainen

Hi,

Matti Hamalainen wrote
Are there any programmers with knowledge of OS/2's sound APIs? (DART/MMPM if I remember right)

Yepp, i have some very basic knowledge...
But, FPC/2 still not has (at least not official) any kind of MMOS2 interface. So you need to write your own, or port it from VP/2 (like i did).

I need such info, but can't find it from IBM's site or such. Yes, I could look into various GPLd programs, but understanding the workings is not easy just by looking complex code.

First, you need the IBM OS/2 Warp Programmers Toolkit. It's free for owners of VisualAge C/C++ and/or other IBM Development products. I just bought a VAC/C++
at Mensys.nl for only 4,5 euro...

Additionally, I need info on realtime timing possibilities (callback timers/events) under OS/2.

You can use the TIMER0 device, or such things, but that's a pretty big hack, and not recommended. You should time your events to the position of your sound stream.

Specifications and simple programming examples (C/C++/Pascal) would be very helpful.

There is a pascal example code about DART programming in Virtual Pascal/2 on hobbes.nmsu.edu.
http://hobbes.nmsu.edu/pub/os2/dev/pascal/vpdart01.zip

As you will see in the example source, using DART needs the followings:

1., Init MMOS2
2., Init the AMP mixer
3., Allocate stream buffers
4., Generate your stream using the callback procedure set at step 2.
5., When stopping playback, wait until buffers empty, then deinit AMP mixer, and MMOS2

The MMOS2 programming is mostly done via sending messages to the multimedia subsystem, and filling some structures with the necessary data. Pretty easy, i think.

Also, there is a very good DART example code in the sources of MPG123. It's in C, but very simple and clean code.

(I need the info for writing OS/2 support into my free software sound system project JSS, which is being developed for use with FPC. http://jss.sourceforge.net)

I just got my own player (ISS) to work with OS/2 some days ago, using FPC, with the ported version of MMOS2 part from Virtual Pascal RTL. (The port is incompletted, but it has the necessary things.)

The sources will be available soon, i hope.

To Tomas and/or the core team: it is possible to include these ported sources into the official FPC RTL, or it needs a complette rewriting to be legal?

Bye,
Charlie^iNQ

Reply by email

Unknown author
to Balogh, Karoly (Charlie/iNQ

From: "Balogh, Karoly (Charlie/iNQ)"
To: ""
Date sent: Fri, 30 Mar 2001 10:46:42 +0100 (CET) Priority: Normal
Subject: Re: [fpc-pascal]OS/2 DART/MMPM information? Send reply to:

To Tomas and/or the core team: it is possible to include these

I'm a member of the core team for some time already... ;-)

ported sources into the official FPC RTL, or it needs a complette rewriting to be legal?

Everything depends on the license of the original source file and/or permissions you get for your port from copyright owner(s). If it's a part of the original VP RTL and not a 3rd-party add-on (with a different, FPC-compatible license), then it cannot be used, unless you get an explicit permission from copyright owner(s) to distribute your port under the FPC RTL license (LGPL with an exception for statically linked binaries).

Tomas

Reply by email