anchor.diff:      Semaphore := CreateSemaphore( Nil, NUM_BUFFERS, NUM_BUFFERS, '' );
   
   	{ Open Audio Device. }
  -	Err := WaveOutOpen( @WaveOutHandle, WAVE_MAPPER, @WaveFormat, LongWord( @WaveOutProc ), 0, CALLBACK_FUNCTION );
  +	Err := WaveOutOpen( @WaveOutHandle, WAVE_MAPPER, @WaveFormat, DWORD_PTR( @WaveOutProc ), 0, CALLBACK_FUNCTION );
   	CheckMMError( Err );
   
   	{ Calculate Duration. }
  
positive.code: Var MixBuffer : Array Of SmallInt;
  Var MixIndex, MixLength, LFilter, RFilter : LongInt;
  
  Procedure WaveOutProc( hdrvr: HDRVR; uMsg: UINT; dwUser: DWORD; dw1, dw2: DWORD ) StdCall;
  Begin
  	//if uMsg = WOM_OPEN then Writeln( 'Device open.' );
  	If uMsg = WOM_DONE Then
  
negative.code: 		
  		{ Submit buffer to audio system. }
  		PWaveHeader := @WaveHeaders[ CurrentBuffer ];
  		CheckMMError( WaveOutUnprepareHeader( WaveOutHandle, PWaveHeader, SizeOf( TWaveHdr ) ) );
  		CheckMMError( WaveOutPrepareHeader( WaveOutHandle, PWaveHeader, SizeOf( TWaveHdr ) ) );
  		CheckMMError( WaveOutWrite( WaveOutHandle, PWaveHeader, SizeOf( TWaveHdr ) ) );
  		
  		{ Next buffer. }
  		CurrentBuffer := CurrentBuffer + 1;
  