Hi, I'm a newbie (my first post!), and interested in writing a desktop app (prob in Delphi 6) which can play sounds to multiple sound cards. Reason is I'm trying to create a 3D surround sound effect.

I have a USB Creative external 5.1 soundblaster device, and although their proprietary .exe can individually pan left and right, front and rear, I can find no way to write my own app to do this (using TMediaPlayer and mciSendCommand). I cannot individually address each pair - unfortunately all four pan together.

I'm creating an Open Source app, so can't purchase a component. I'd be very happy to go out and buy a number of USB soundcards if I knew how to address each of them individually in my Delphi app.

Anyone have any experience with this ? The outcome will be used in the area of Assistive Technology (assisting people with disabilities). many thanks, Gazza

Wernaeh
—
2010-02-15T14:55:45Z —
#2

Not per se Delphi-related, but perhaps you should check out OpenAL, the Open Audio Library (google is your friend, we even have a tutorial series here on devmaster). I've made very good experiences using it.

Afaik, there is a OpenAL bind for Delphi as well. I'm not sure about licensing, though.

Cheers,

Wernaeh

GazzaPax
—
2010-02-15T16:34:51Z —
#3

thanks, will look into it....

GazzaPax
—
2010-02-15T20:21:46Z —
#4

Hi again, any Delphi people here ?

I note that the tutorials at this site do not included Delphi, and I'm having trouble getting Open AL installed. I downloaded and ran oalinst.exe which place a couple of dlls into the Windows directory but any example code I'm finding around the net fails with various .dcus not found. (al.dcu, altype.dcu, etc).

I'm prob doing something very basically wrong but google not helping much this time. Any advice much appreciated. Gazza

In the downloads section of that site, there also are import units for OpenAL available.

GazzaPax
—
2010-02-19T15:39:39Z —
#6

Hi, that was great thanks ! OpenAL now works fine for me!

I have an external (USB) Live! 24bit Soundblaster card (which supports 2 pairs of speakers, Front/Rear, Left/Right) and OpenAL has now allowed me to move a source around to any of these - fab stuff ! Your tutorials are v.helpful, thanks.

But my project needs to take this further, and its now back to my original question.... I am currently using those 4 speakers, and this allows me to move thru X and Z dimensions (SourcePos[0] and [2]).

But I need to create a true 3D aural field that has height, but inreoducing a second, identical soundcard (another 4 speakers) and control these via the Y dimension (SourecePos[1]).

Is it poss to identify which soundcards are attached to my system and send the sound to the appropriate soundcard? And secondly, if I am playing to both soundcards at once, is there a danger of the wav files being slightly out of phase? Or is it so fast that this will not occur. Many thanks, Gazza

Kenneth_Gorking
—
2010-02-19T17:52:39Z —
#7

If your soundcard supports the ALC_ENUMERATION_EXT extension, then you can enumerate all the endpoints on your system.