DirectMusic and multithreading

Started by
1 comment, last by Vyts 19 years, 10 months ago
Hello Group, I am having trouble with DirectMusic. Our app. uses 2 separate threads, one for resource loading another for main. IDirectMusicSegment objects, loaded on loader thread are not playing in main thread. No errors are returned, just silence. If I try to play sound in loader thread (immidiately after load) sound''s playing well. Please help! Vytautas
Advertisement
If the sound is global data, do you have your mutexes (or critical sections) in the correct places?
Anthony Rufrano
RealityFactory 2 Programmer
Sounds are not touched before loading completes anyway. However, having in mind that we can''t actually know what direct music does....

anyway, I found out that the problem is in performance objects. If I create and intitialize them on loader thread, I get no sound. But if I do that on main thread (sounds are loaded on loader thread) everything works well.

This topic is closed to new replies.

Advertisement