![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
New Member
Join Date: Jun 2006
Posts: 10
|
Hello, I am sending the same music to 2 sound cards simultaneously. I'm using a Direct Sound object per sound card and a Primary and obligatory Secondary buffer on each of these. I would like to economise on mem usage by using the DuplicateBuffer() call to share secondary sound buffer memory, but DuplicateBuffer() fails because the buffers are on separate DirectSound objects. Has anyone heard of a solution to this problem? - perhaps I should create a Primary Buffer with write access on one sound card and just stream the sound to it as the other device plays??? But this seems unnecessarily complicated. Any ideas welcome.
|
|
|
|
|
|
#2 |
|
Valued Member
Join Date: Oct 2005
Posts: 247
|
Perhaps there is some way to coerce DirectSound into accepting a SoundBuffer that uses an user-supplied buffer (in software mixing mode, obviously), but I don't see such a capability in the DSBUFFERDESC struct.
___________________________________________
http://www.iguanademos.com/Jare |
|
|
|
|
|
#3 |
|
Valued Member
Join Date: Aug 2005
Location: Seoul
Posts: 272
|
Are you trying to stream the music to both devices? In that case the buffer sizes are meaningless, as you need only a one buffer per device.
If that's not the case and you really need to lower the memory usage, you could do the mixing in software and then stream the mixed audio to both devices. |
|
|
|
|
|
#4 |
|
New Member
Join Date: Jun 2006
Posts: 10
|
Yes. I've have tried this by using the DSBCAPS_LOCSOFTWARE flag when creating the buffers but unfortunately DuplicateSoundBuffer() only returns successfully (with a duplicated buffer that shares mem of the original)when the buffer being duplicated and the original buffer are on the same DirectSound object(ie the same sound card). Tricky.
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Jun 2006
Posts: 10
|
Yes. Maybe mixing in the software is the only way but ideally I would like to keep the mixing done on the hardware as well.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|