private void InitBuffer()
{
OnBufferInitializing();
if (ERSB == null)
{
ERSB = new EventRaisingSoundBuffer(Device, WaveFormat, BufferLength);
ERSB.BufferNotification += new BufferNotificationEventHandler(OnBufferNotification);
}
else
{
ERSB.WaveFormat = WaveFormat;
ERSB.BufferLength = BufferLength;
}
OnBufferInitialized();
}