|
FORUM MESSAGE
|
|
You are reading a General forum message.
Runtime error when using Dx_SoundNotify on bcb6
Author: Omar Zelaya
Date Posted: 2004-07-07 00:59:09
Hi,
i have the following code:
void __fastcall TRemoteView::Dx_SoundBuffer1Create(TObject *Sender)
{ int percent = DSBufferDesc1->BufferBytes/4;
DSBPositionNotify1->ArraySize = 4;
DSBPositionNotify1->Offset[0] = 0;
DSBPositionNotify1->Offset[1] = percent;
DSBPositionNotify1->Offset[2] = percent*2;
DSBPositionNotify1->Offset[3] = DSBPN_OFFSETSTOP;
if (Dx_SoundNotify1->Create( Dx_SoundBuffer1 ))
if (Dx_SoundNotify1->SetNotificationPositions( DSBPositionNotify1->ArraySize,
DSBPositionNotify1 ))
{
/// created ok
}
}
on the close event of the form i have the following code:l
if (Dx_SoundBuffer1->Created)
Dx_SoundBuffer1->Destroy();
if (Dx_Sound1->Created)
Dx_Sound1->Destroy();
but i get a access violation when i close the form and the debugger stop at the following line
void __fastcall TDx_SoundNotify_ThreadClass::RebuildHandles()
....
for (int i=0;i<TDx_SoundNotify_ComponentList->Count;i++) // here
if i comment the creation of the notify component, i have no access violation no more.
what am i doing wrong.
Thanks
REPLY TO THIS MESSAGE?
Top
You can post a reply to this General message using the form below:
|
|