problem with directsound

gianni
11-09-2001, 02:38 AM
I'm using Directx8 and VB5, and trying to play streaming buffers with DirectSound. As first i used a skip-on-flag technique, and it did work. Now I'm trying with a call-back function. I followed the guidelines in MSDN but I get "run time error 430: class doesn't support Automation" when I call the SetNotificationPositions method. Can anyone help me?
Attached the source (sorry, the var names are in Italian)

Thinker
11-09-2001, 07:28 AM
The only problem I can see in your code when compared to the example in
msdn is this declare...
Dim dsbpn(3) As DSBPOSITIONNOTIFY ' array notifica eventi (3 eventi)
This will, in fact, create an array of 4 DSBPOSITIONNOTIFY types. The
fourth one is uninitialized and could be causing the error. Try...
Dim dsbpn(2) As DSBPOSITIONNOTIFY ' array notifica eventi (3 eventi)

gianni
11-09-2001, 07:45 AM
Using the info provided by you, I was able to find a Sample in the site "http://64.23.12.52//index.asp", where I found that a crucial parameter was missing at buffer creation time (flag DSBCAPS_CTRLPOSITIONNOTIFY of method CreateSoundBuffer). I think that the main problem was the error message, quite misleading.. wasn't it?
Now the initialization looks working ok
Thanks a lot

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum