Groups > Borland > Borland Delphi multimedia > Re: Device already opened...




Re: Device already opened...

Re: Device already opened...
Wed, 12 Mar 2008 10:36:28 -070
"HAROUCHE, David" <metanil@hotmail.com> wrote in message 
news:47d7e687$1@newsgroups.borland.com...

> What to do ?

Don't use multiple TMediaPlayer objects to talk to the same device.


Gambit 

Post Reply
Re: Device already opened...
Wed, 12 Mar 2008 12:36:58 -070
"HAROUCHE, David" <metanil@hotmail.com> wrote in message 
news:47d81b00$1@newsgroups.borland.com...

> I need to play overlaid sounds....

You can't do that with TMediaPlayer.  You will have to communicate with the 
source card directly instead.  If you don't want to do that manually, then 
use DirectX (specifically, DirectSound) to manage it for you.


Gambit 

Post Reply
Re: Device already opened...
Wed, 12 Mar 2008 14:42:37 -070
"HAROUCHE, David" <metanil@hotmail.com> wrote in message 
news:47d84860@newsgroups.borland.com...

> Bloody Hell. There must be a solution....

The OS does not expose APIs to easily merge multiple sources together on a 
single device.  DirectX does, though.

> What I can't do is to correctly name at runtime (because I have
> to call InsertControl for all new Instances of TMediaPlayer)...

You should not be calling InsertControl() directly.  Use the Parent property 
instead.

Why are you trying to name anything in the first place?  Dynamic instances 
do not need Names assigned to them.


Gambit 

Post Reply
Device already opened...
Wed, 12 Mar 2008 15:19:38 +010
Yep

I have two instances of TMediaPlayer opened at the same time....

m1.open;
m1;play

m2.open
m2.play       <----- there I got an error message : "Device already
opened 
as an alias...."

What to do ?

DH 
Post Reply
Re: Device already opened...
Wed, 12 Mar 2008 15:57:59 -070
"HAROUCHE, David" <metanil@hotmail.com> wrote in message 
news:47d84f3c@newsgroups.borland.com...

> I dont want to go to DirectSound... That's a choice !

Then you are just going to have to mix the audio data yourself using the 
waveOut...() API functions.


Gambit 

Post Reply
<< Previous 1 2 3 Next >>
( Page 1 of 3 )
about | contact