How to re-initialize DXAudioOut?

106 views
Skip to first unread message

PeterPanino

unread,
Oct 14, 2012, 8:41:03 AM10/14/12
to newac...@googlegroups.com
Hi! If an external USB audio-interface is switched off AFTER a program with a TDXAudioOut control instance has been started, the DXAudioOut.DeviceCount property is not anymore correct.

So how can DXAudioOut be re-initialized, so its DeviceCount does not anymore contain the switched off audio-interface?

RuudNL

unread,
Oct 15, 2012, 9:18:09 AM10/15/12
to newac...@googlegroups.com
I suppose the easiest way to solve this, is to detect the removal of an USB device (for example with  MahUSB.pas) and scan again for available devices.

Op zondag 14 oktober 2012 14:41:03 UTC+2 schreef PeterPanino het volgende:

PeterPanino

unread,
Oct 15, 2012, 3:04:27 PM10/15/12
to newac...@googlegroups.com
Hi! How can I scan again for available devices? The DXAudioOut component still reports the previous audio devices (with DeviceCount and DeviceName), AFTER an audio device has been connected or disconnected.

Ross Levis

unread,
Oct 15, 2012, 11:00:41 PM10/15/12
to newac...@googlegroups.com

I modified the code in ACS_DXAudio.pas.  I don’t remember what it was many years ago but I now have this

 

procedure TDXAudioOut.LoadDevices;

begin

  DSW_EnumerateOutputDevices(@Devices);

  FDeviceCount := Devices.devcount;

end;

 

And this is defined in the Public section of the class so I can call it from within my app.

 

Ross.

--
You are recieving this message because you are subscribed to "NewAC users" Google group.
To post message to this group send it to
newac...@googlegroups.com
To unsubscribe from the group send a mail to: newac-users...@googlegroups.com
Additional variants are available at the groups page http://groups.google.com/group/newac-users?hl=en

Reply all
Reply to author
Forward
0 new messages